SearchBox.PrepareForFocusOnKeyboardInput event

Applies to Windows only

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

Syntax


public event TypedEventHandler<SearchBox, RoutedEventArgs> PrepareForFocusOnKeyboardInput


<SearchBox PrepareForFocusOnKeyboardInput="eventhandler"/>

Event information

Delegate TypedEventHandler<SearchBox, RoutedEventArgs>

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.

Requirements

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

None supported

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.winmd

See also

SearchBox
FocusOnKeyboardInput

 

 

Show:
© 2014 Microsoft