¿Le resultó útil esta página?
Sus comentarios sobre este contenido son muy importantes. Háganos saber su opinión.
¿Tiene comentarios adicionales?
Caracteres restantes: 1500
Exportar (0) Imprimir
Expandir todo

KeyBinding.Modifiers (Propiedad)

Gets or sets the ModifierKeys of the KeyGesture associated with this KeyBinding.

Espacio de nombres: System.Windows.Input
Ensamblado: PresentationCore (en presentationcore.dll)
Espacio de nombres XML:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

public ModifierKeys Modifiers { get; set; }
/** @property */
public ModifierKeys get_Modifiers ()

/** @property */
public void set_Modifiers (ModifierKeys value)

public function get Modifiers () : ModifierKeys

public function set Modifiers (value : ModifierKeys)

<object Modifiers="oneOrMoreModifierKeys"/>

 oneOrMoreModifierKeys  One or more modifier keys, defined by the ModifierKeys enumeration, delimited with a "+" character.   

Valor de propiedad

The modifier keys of the KeyGesture. The default value is None.

With the exception of the function keys and the numeric keypad keys, a KeyGesture must contain a Key and one or more ModifierKeys.

The following example creates a KeyBinding and adds it to the InputBindingCollection of the root window.

<Window.InputBindings>
  <KeyBinding Command="ApplicationCommands.Open"
              Modifiers="Control"
              Key="R" />
</Window.InputBindings>

// Creating a KeyBinding between the Open command and Ctrl-R
KeyBinding OpenCmdKeyBinding = new KeyBinding(
    ApplicationCommands.Open, 
    Key.R, 
    ModifierKeys.Control);

this.InputBindings.Add(OpenCmdKeyBinding);

Microsoft .NET Framework 3.0 es compatible con Windows Vista, Microsoft Windows XP SP2 y Windows Server 2003 SP1.

.NET Framework

Compatible con: 3.0

Adiciones de comunidad

AGREGAR
Mostrar:
© 2015 Microsoft