Add inline mouse-triggered search button in search field
This commit is contained in:
@@ -36,14 +36,21 @@ namespace C4IT_CustomerPanel.UserControls
|
||||
{
|
||||
if (e.Key == Key.Enter)
|
||||
{
|
||||
OnSearchClicked(sender, null);
|
||||
ExecuteSearch();
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnSearchClicked(object sender, MouseButtonEventArgs e)
|
||||
private void OnSearchButtonClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(TxtSearchTerm.Text.Trim()))
|
||||
ExecuteSearch();
|
||||
}
|
||||
|
||||
private void ExecuteSearch()
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(TxtSearchTerm.Text))
|
||||
return;
|
||||
|
||||
string searchTerm = WebUtility.UrlEncode(TxtSearchTerm.Text.Trim());
|
||||
if (MainWindow.MainInstance.ConfigSettings.GetConfig()._isUUX)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user