ModifierKeys Enumeration
Specifies the set of modifier keys.
This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.
Namespace: System.Windows.InputAssembly: WindowsBase (in WindowsBase.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
The Modifiers property on the Keyboard class is the set of the modifier keys that are currently pressed.
Some APIs in Windows Presentation Foundation (WPF) that make use of the ModifierKeys enumeration are the Modifiers properties on the Keyboard, KeyBinding, KeyGesture, and MouseGesture classes.
The following example shows how to create a KeyBinding that associates a KeyGesture with a RoutedCommand. The KeyBinding uses the ModifierKeys enumeration to specify the modifier key of the gesture.
<Window.InputBindings> <KeyBinding Command="ApplicationCommands.Open" Gesture="CTRL+R" /> </Window.InputBindings>
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.