private void OnAccessKeyInvoked(UIElement sender, AccessKeyInvokedEventArgs args) { // If RadioButtons is an AccessKeyScope then we do not want to handle the access // key invoked event because the user has (probably) set up access keys for the // RadioButton elements. if (!IsAccessKeyScope) { if (m_selectedIndex != 0) { var repeater = m_repeater; if (repeater != null) { var selectedItem = repeater.TryGetElement(m_selectedIndex); if (selectedItem != null) { var selectedItemAsControl = selectedItem as Control; if (selectedItemAsControl != null) { args.Handled = selectedItemAsControl.Focus(FocusState.Programmatic); return; } } } } // If we don't have a selected index, focus the RadioButton's which under normal // circumstances will put focus on the first radio button. args.Handled = this.Focus(FocusState.Programmatic); } }
private void UserControl_AccessKeyInvoked(UIElement sender, AccessKeyInvokedEventArgs args) { args.Handled = true; ButtonClicked?.Invoke(this, new RoutedEventArgs()); ToggleMenu(); }
void AccessKeyInvokedForTab(UIElement sender, AccessKeyInvokedEventArgs arg) { var tab = sender as TextBlock; if (tab != null && tab.DataContext is Page page) { Element.CurrentPage = page; } }
private async void txtPassword_AccessKeyInvoked(UIElement sender, AccessKeyInvokedEventArgs args) { if (Benutzer.Login(txtUser.Text, txtPassword.Password)) { //Gehe zu Profil bearbeiten Frame.Navigate(typeof(MainPage)); } else { var message = new MessageDialog("Einloggen fehlgeschlagen"); await message.ShowAsync(); } }
private void OnMenuBarItemAccessKeyInvoked(DependencyObject sender, AccessKeyInvokedEventArgs args) { ShowMenuFlyout(); args.Handled = true; }
private void AutoSuggestBox_AccessKeyInvoked(UIElement sender, AccessKeyInvokedEventArgs args) { }
private void Button_AccessKeyInvoked(UIElement sender, AccessKeyInvokedEventArgs args) { }
void OnAccessKeyInvoked(UIElement sender, AccessKeyInvokedEventArgs args) { args.Handled = true; MyPivot.SelectedItem = sender as PivotItem; }
void OnMemoryAccessKeyInvoked(UIElement sender, AccessKeyInvokedEventArgs args) { DockPivot.SelectedItem = MemoryPivotItem; }
private void OnNumbersShortcut(UIElement sender, AccessKeyInvokedEventArgs args) { args.Handled = true; Numbers.Focus(FocusState.Programmatic); }
private void OnNumbersShortcut(UIElement sender, AccessKeyInvokedEventArgs args) { args.Handled = true; Numbers.Focus(FocusState.Programmatic); }