UIElement.PreviewKeyDown Event

Definition

Occurs when a keyboard key is pressed while the UIElement has focus.

C#
public event KeyEventHandler PreviewKeyDown;
XAML
<uiElement PreviewKeyDown="eventhandler"/>

Event Type

Remarks

PreviewKeyDown is a routed event. For more info on the routed event concept, see Events and routed events overview.

This event uses the tunneling routing strategy. The corresponding bubbling event is KeyDown.

Applies to

Product Versions
Windows App SDK 0.8, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6

See also