This documentation is archived and is not being maintained.

Keyboard.PreviewKeyDown Attached Event

Occurs when a key on the keyboard is pressed.

Namespace: System.Windows.Input
Assembly: PresentationCore (in PresentationCore.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

See Keyboard.AddPreviewKeyDownHandler, Keyboard.RemovePreviewKeyDownHandler
See Keyboard.AddPreviewKeyDownHandler, Keyboard.RemovePreviewKeyDownHandler
See Keyboard.AddPreviewKeyDownHandler, Keyboard.RemovePreviewKeyDownHandler
<object Keyboard.PreviewKeyDown="KeyEventHandler" .../>

Identifier field

PreviewKeyDownEvent

Routing strategy

Tunneling

Delegate

KeyEventHandler

  • The corresponding bubbling event is KeyDown.

Keyboard.PreviewKeyDown is an attached event. For more information, see Routed Events Overview.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Show: