UIElement.Focus(FocusState) Method

Definition

Attempts to set focus to this element.

public:
 virtual bool Focus(FocusState value) = Focus;
bool Focus(FocusState const& value);
public bool Focus(FocusState value);
Public Function Focus (value As FocusState) As Boolean

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