[]
Invoked when an unhandled System.Windows.Input.Keyboard.PreviewKeyDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
protected override void OnPreviewKeyDown(KeyEventArgs e)
Protected Overrides Sub OnPreviewKeyDown(e As KeyEventArgs)
Type | Name | Description |
---|---|---|
KeyEventArgs | e | The KeyEventArgs that contains 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 OnPreviewKeyDown(KeyEventArgs) method is called before any event handler for the PreviewKeyDown event is called. This method allows derived classes to handle the PreviewKeyDown 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 PreviewKeyDown event data.
Notes to Inheritors
If you override OnPreviewKeyDown(KeyEventArgs), you can prevent registered delegates from receiving events by setting Handled to true.