Skip to content

Latest commit

 

History

History
45 lines (26 loc) · 2.22 KB

inputfocuscontroller.md

File metadata and controls

45 lines (26 loc) · 2.22 KB
-api-id -api-type
T:Microsoft.UI.Input.InputFocusController
winrt class

Microsoft.UI.Input.InputFocusController

-description

Represents an object that supports the handling and management of focus events on a ContentIsland.

-remarks

A ContentIsland has an underlying HWND that can interact with Win32 APIs and receive Win32 messages (such as various input messages).

A ContentIsland has focus if its underlying HWND has Win32 focus.

When A ContentIsland has focus, it will receive keyboard input messages from the system. Keyboard input events can be handled by an InputKeyboardSource object, which is retrieved through the InputKeyboardSource.GetForIsland(Microsoft.UI.Content.ContentIsland) method.

Note

For more details about Win32 focus and keyboard input see the Keyboard Focus and Activation section of the Keyboard Input Overview.

Behavior when disposed

An InputFocusController is associated with a specific ContentIsland. If the InputFocusController is disposed then it loses that association and all event handlers are unregistered.

If the associated ContentIsland is disposed, then the associated InputFocusController is also disposed.

For more details, see Microsoft.UI.Input.InputObject.

Threading model

An InputFocusController can only be from the thread where it was created. Any property access or function call on a different thread will return RPC_E_WRONG_THREAD (or the equivalent projected error type).

For more details, see Microsoft.UI.Input.InputObject.

-see-also

FocusChangedEventArgs, Windows (Windows and Messages)

-examples