private void DeleteSearchHistoryButton_Click(object sender, RoutedEventArgs e) { SearchHistoryFlyout.Hide(); var searchHistory = (sender as FrameworkElement)?.DataContext as string; if (searchHistory == null) { return; } ViewModel.DeleteSearchHistoryCommand.Execute(searchHistory); }
private void SearchHistoryItem_Click(object sender, RoutedEventArgs e) { SearchHistoryFlyout.Hide(); var searchHistory = (sender as FrameworkElement)?.DataContext as string; if (searchHistory == null) { return; } SearchBox.Text = searchHistory; ViewModel.SearchCommand.Execute(searchHistory); }
private void DeleteAllSearchHistoriesButton_Click(object sender, RoutedEventArgs e) { SearchHistoryFlyout.Hide(); ViewModel.DeleteAllSearchHistoriesCommand.Execute(null); }