Skip to content

Latest commit

 

History

History
44 lines (25 loc) · 1.66 KB

focusstate.md

File metadata and controls

44 lines (25 loc) · 1.66 KB
-api-id -api-type
T:Microsoft.UI.Xaml.FocusState
winrt enum

FocusState

-description

Describes how an element obtained focus.

-enum-fields

-field Unfocused:0

Element is not currently focused.

-field Pointer:1

Element obtained focus through a pointer action.

-field Keyboard:2

Element obtained focus through a keyboard action, such as tab sequence traversal.

-field Programmatic:3

Element obtained focus through a deliberate call to UIElement.Focus(Microsoft.UI.Xaml.FocusState) or a related API.

-remarks

If used as an input parameter for UIElement.Focus(Microsoft.UI.Xaml.FocusState), you can't use Unfocused. The FocusState value to pass to a UIElement.Focus(Microsoft.UI.Xaml.FocusState) call depends on the input scenario and which user interaction your control or app code is responding to.

The exact meaning of the FocusState values depends on whether you're reading it from UIElement.FocusState, or using a value to send to UIElement.Focus(Microsoft.UI.Xaml.FocusState). If you are setting UIElement.Focus(Microsoft.UI.Xaml.FocusState) you're informing other callers (like the control templates) about how that control obtained focus.

-examples

-see-also

UIElement.FocusState, Hyperlink.FocusState, Keyboard interactions