private void Search_Click(object sender, RoutedEventArgs e) { // Opaccity can now be 1 because the storyboard handles all animation from here on out SearchField.Opacity = 1; // Monitors the state of the stackpanel and performs the appropriate action when the icon is clicked if (SearchStackpanel.Tag.ToString() == "Open") { SearchStackpanel.Tag = "Closed"; EnterStoryboard.Begin(); SearchField.Focus(FocusState.Programmatic); SearchStackpanel.Background = new SolidColorBrush(Color.FromArgb(0xFF, 00, 69, 0x5C)); SearchIcon.Foreground = new SolidColorBrush(Color.FromArgb(0xFF, 0xFF, 0xFF, 0xFF)); // track a custom event GoogleAnalytics.EasyTracker.GetTracker().SendEvent("ui_action", "searchOpen_click", "Search Open: from ShoppingList", 0); } else if (SearchStackpanel.Tag.ToString() == "Closed") { SearchStackpanel.Tag = "Open"; ExitStoryboard.Begin(); SearchStackpanel.Background = new SolidColorBrush(Color.FromArgb(00, 00, 69, 0x5C)); SearchIcon.Foreground = new SolidColorBrush(Color.FromArgb(0xFF, 00, 00, 00)); // track a custom event GoogleAnalytics.EasyTracker.GetTracker().SendEvent("ui_action", "searchClose_click", "Search Close: from ShoppingList", 0); } }
private void Search_Click(object sender, RoutedEventArgs e) { MainHeader.Visibility = Visibility.Collapsed; SearchField.Visibility = Visibility.Visible; SearchField.Focus(FocusState.Keyboard); }
private void Search_Click(object sender, RoutedEventArgs e) { SearchField.Opacity = 1; if (SearchStackpanel.Tag.ToString() == "Open") { SearchStackpanel.Tag = "Closed"; EnterStoryboard.Begin(); SearchField.Focus(FocusState.Programmatic); SearchStackpanel.Background = new SolidColorBrush(Color.FromArgb(0xFF, 00, 69, 0x5C)); SearchIcon.Foreground = new SolidColorBrush(Color.FromArgb(0xFF, 0xFF, 0xFF, 0xFF)); // track a custom event GoogleAnalytics.EasyTracker.GetTracker().SendEvent("ui_action", "searchOpen_click", "Search Open: from RecipeFeed", 0); } else if (SearchStackpanel.Tag.ToString() == "Closed") { SearchStackpanel.Tag = "Open"; ExitStoryboard.Begin(); SearchStackpanel.Background = new SolidColorBrush(Color.FromArgb(00, 00, 69, 0x5C)); SearchIcon.Foreground = new SolidColorBrush(Color.FromArgb(0xFF, 00, 00, 00)); // track a custom event GoogleAnalytics.EasyTracker.GetTracker().SendEvent("ui_action", "searchClose_click", "Search Close: from RecipeFeed", 0); } }
/// <summary> /// Populates the page with content passed during navigation. Any saved state is also /// provided when recreating a page from a prior session. /// </summary> /// <param name="navigationParameter">The parameter value passed to /// <see cref="Frame.Navigate(Type, Object)"/> when this page was initially requested. /// </param> /// <param name="pageState">A dictionary of state preserved by this page during an earlier /// session. This will be null the first time a page is visited.</param> protected override async void LoadState(Object navigationParameter, Dictionary <String, Object> pageState) { var term = navigationParameter as string; await SearchModel.Search(term); SearchField.Focus(Windows.UI.Xaml.FocusState.Keyboard); }
private void ListBox_PreviewKeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Up && ListBox.SelectedIndex == 0) { SearchField.Focus(); e.Handled = true; } }
public ExploreIconsView() { // keep reference to interactivity assembly var anchor = typeof(System.Windows.Interactivity.Behavior); if (anchor == null) { throw new Exception(); } InitializeComponent(); DataContext = new ExploreIconsViewModel( QuokkaExtensionVS2019Package.Instance.Resolve <IExtensionIconResolver>(), (a) => { Dispatcher.BeginInvoke(a); }); SearchField.Focus(); }
public void Search() { SearchField.StartBringIntoView(); SearchField.Focus(FocusState.Keyboard); }
private void Find(object sender, EventArgs e) { SearchField.Focus(); }
public void Search() { SearchField.Focus(FocusState.Keyboard); }