FocusManager.SetFocus method (1 of 2)
Sets focus to the specified element after resolving its default focus target; returns false when the element cannot take focus.
public bool SetFocus(UIElement? element)See Also
Section titled “See Also”- class UIElement
- class FocusManager
- namespace Aprillz.MewUI.Input
FocusManager.SetFocus method (2 of 2)
Section titled “FocusManager.SetFocus method (2 of 2)”Sets focus to the specified element; returns false when the element cannot take focus.
public bool SetFocus(UIElement? element, bool resolveDefault)| parameter | description |
|---|---|
| element | The element to focus. |
| resolveDefault | When true, applies GetDefaultFocusTarget redirection (e.g. a container forwards focus to its first focusable child). Programmatic and keyboard-driven focus should use this path. Mouse-click-driven focus should pass false - the click already expresses a precise location, so silently redirecting focus elsewhere (possibly off-screen) violates user intent and can trigger unwanted scroll-into-view. |
See Also
Section titled “See Also”- class UIElement
- class FocusManager
- namespace Aprillz.MewUI.Input