Share via


FocusManager.GetFocusedElement Method

Definition

Overloads

GetFocusedElement()

Retrieves the element in the UI that has focus.

GetFocusedElement(XamlRoot)

Retrieves the focused element within the XAML island container.

GetFocusedElement()

Retrieves the element in the UI that has focus.

public:
 static Platform::Object ^ GetFocusedElement();
/// [Windows.Foundation.Metadata.Overload("GetFocusedElement")]
 static IInspectable GetFocusedElement();
[Windows.Foundation.Metadata.Overload("GetFocusedElement")]
public static object GetFocusedElement();
function getFocusedElement()
Public Shared Function GetFocusedElement () As Object

Returns

Object

Platform::Object

IInspectable

The object that has focus. Typically, this is a Control class.

Attributes

Applies to

GetFocusedElement(XamlRoot)

Retrieves the focused element within the XAML island container.

public:
 static Platform::Object ^ GetFocusedElement(XamlRoot ^ xamlRoot);
/// [Windows.Foundation.Metadata.Overload("GetFocusedElementWithRoot")]
 static IInspectable GetFocusedElement(XamlRoot const& xamlRoot);
[Windows.Foundation.Metadata.Overload("GetFocusedElementWithRoot")]
public static object GetFocusedElement(XamlRoot xamlRoot);
function getFocusedElement(xamlRoot)
Public Shared Function GetFocusedElement (xamlRoot As XamlRoot) As Object

Parameters

xamlRoot
XamlRoot

Returns

Object

Platform::Object

IInspectable

The object that has focus. Typically, this is a Control class.

Attributes

See also

Applies to