Exemplo n.º 1
0
        private static void OnKeyDown(object sender, KeyEventArgs e)
        {
            if (e.OriginalSource == sender && e.Key == Key.Space)
            {
                // ignore alt + space which invokes the system menu
                if ((Keyboard.Modifiers & ModifierKeys.Alt) == ModifierKeys.Alt)
                {
                    return;
                }

                VirtualToggleButton.UpdateIsChecked((DependencyObject)sender);
                e.Handled = true;
            }
        }
Exemplo n.º 2
0
 private static void OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
 {
     e.Handled = true;
     VirtualToggleButton.UpdateIsChecked((DependencyObject)sender);
 }