OnKeyDown Method

ComboBox.OnKeyDown Method

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Provides handling for the KeyDown event.

Namespace:  System.Windows.Controls
Assembly:  System.Windows (in System.Windows.dll)

'Declaration
Protected Overrides Sub OnKeyDown ( _
	e As KeyEventArgs _
)

Parameters

e
Type: System.Windows.Input.KeyEventArgs
The event data

This implementation routes the key down event to the main content of the combo box, or the drop-down, depending on which is currently active.

The OnKeyDown method is called before any event handler for the KeyDown event is called. This method allows derived classes to handle the KeyDown event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

This implementation does not change the handled state (the Handled property) of the KeyDown event data.

Notes to Inheritors

If you override OnKeyDown, you can prevent registered delegates from receiving events by setting Handled to true. For more information about routed events and the Handled property, see Events for Windows Phone 8.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft