Class KeyboardFocusController
A Manipulator that adds a class to the target element when it is keyboard focused. This is useful for accessibility purposes.
Implements
Inherited Members
Namespace: Unity.AppUI.UI
Assembly: Unity.AppUI.dll
Syntax
public class KeyboardFocusController : Manipulator, IManipulator
Constructors
KeyboardFocusController(EventCallback<FocusInEvent>, EventCallback<FocusInEvent>, EventCallback<FocusOutEvent>)
Construct a KeyboardFocusController.
Declaration
public KeyboardFocusController(EventCallback<FocusInEvent> keyboardFocusInEventCallback = null, EventCallback<FocusInEvent> otherFocusInEventCallback = null, EventCallback<FocusOutEvent> focusedOutCallback = null)
Parameters
Type | Name | Description |
---|---|---|
EventCallback<FocusInEvent> | keyboardFocusInEventCallback | A callback invoked when the target element receives keyboard focus. |
EventCallback<FocusInEvent> | otherFocusInEventCallback | A callback invoked when the target element receives focus from another source. |
EventCallback<FocusOutEvent> | focusedOutCallback | A callback invoked when the target element loses focus. |
Properties
keyboardFocused
Check if the target element is keyboard focused.
Declaration
public bool keyboardFocused { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
RegisterCallbacksOnTarget()
Called to register event callbacks on the target element.
Declaration
protected override void RegisterCallbacksOnTarget()
Overrides
UnregisterCallbacksFromTarget()
Called to unregister event callbacks from the target element.
Declaration
protected override void UnregisterCallbacksFromTarget()