-api-id | -api-type |
---|---|
T:Microsoft.UI.Input.InputFocusController |
winrt class |
Represents an object that supports the handling and management of focus events on a ContentIsland.
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.
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.
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.