Przeczytaj w języku angielskim

Udostępnij za pośrednictwem


SearchBox.PrepareForFocusOnKeyboardInput Event

Definition

Occurs when the FocusOnKeyboardInput property is true and the app receives textual keyboard input.

public event TypedEventHandler<SearchBox,RoutedEventArgs> PrepareForFocusOnKeyboardInput;
<SearchBox PrepareForFocusOnKeyboardInput="eventhandler"/>

Event Type

Remarks

This event occurs only if the FocusOnKeyboardInput property is true. If you wan to provide "type-to-search" behavior in your app, you should handle this event and synchronously ensure the SearchBox control is visible before the event call completes. After this event occurs, the control sets focus to itself.

When FocusOnKeyboardInput is true, keyboard input on the current thread is intercepted and textual input is redirected to the SearchBox. Only textual input will cause the SearchBox to receive focus. Non-text keys, such as arrows or Tab, are not redirected to the SearchBox. WIN/CTRL/ALT key combinations (except for Ctrl-V for paste) are also not redirected.

Applies to

See also