Ejemplo n.º 1
0
 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);
     }
 }
Ejemplo n.º 2
0
        private void UserControl_AccessKeyInvoked(UIElement sender, AccessKeyInvokedEventArgs args)
        {
            args.Handled = true;

            ButtonClicked?.Invoke(this, new RoutedEventArgs());
            ToggleMenu();
        }
Ejemplo n.º 3
0
        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();
     }
 }
Ejemplo n.º 5
0
 private void OnMenuBarItemAccessKeyInvoked(DependencyObject sender, AccessKeyInvokedEventArgs args)
 {
     ShowMenuFlyout();
     args.Handled = true;
 }
Ejemplo n.º 6
0
 private void AutoSuggestBox_AccessKeyInvoked(UIElement sender, AccessKeyInvokedEventArgs args)
 {
 }
Ejemplo n.º 7
0
 private void Button_AccessKeyInvoked(UIElement sender, AccessKeyInvokedEventArgs args)
 {
 }
Ejemplo n.º 8
0
 void OnAccessKeyInvoked(UIElement sender, AccessKeyInvokedEventArgs args)
 {
     args.Handled         = true;
     MyPivot.SelectedItem = sender as PivotItem;
 }
Ejemplo n.º 9
0
 void OnMemoryAccessKeyInvoked(UIElement sender, AccessKeyInvokedEventArgs args)
 {
     DockPivot.SelectedItem = MemoryPivotItem;
 }
Ejemplo n.º 10
0
        private void OnNumbersShortcut(UIElement sender, AccessKeyInvokedEventArgs args)
        {
            args.Handled = true;

            Numbers.Focus(FocusState.Programmatic);
        }
Ejemplo n.º 11
0
        private void OnNumbersShortcut(UIElement sender, AccessKeyInvokedEventArgs args)
        {
            args.Handled = true;

            Numbers.Focus(FocusState.Programmatic);
        }