UIElement.Focus(FocusState) Method

Definition

Attempts to set focus to this element.

C#
public bool Focus(FocusState value);

Parameters

value
FocusState

How this element obtains focus.

Returns

Boolean

True if keyboard focus and logical focus were set to this element. False if only logical focus was set to this element, or if the call to this method did not force the focus to change.

Applies to

Produkt Verzie
Windows App SDK 0.8, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6