Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 1.48 KB

searchbox_prepareforfocusonkeyboardinput.md

File metadata and controls

29 lines (20 loc) · 1.48 KB
-api-id -api-type
E:Windows.UI.Xaml.Controls.SearchBox.PrepareForFocusOnKeyboardInput
winrt event

Windows.UI.Xaml.Controls.SearchBox.PrepareForFocusOnKeyboardInput

-description

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

-xaml-syntax

<SearchBox PrepareForFocusOnKeyboardInput="eventhandler"/>

-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.

-examples

-see-also

FocusOnKeyboardInput