FocusManager.GetFocusedElement 方法

定义

重载

GetFocusedElement()

检索 UI 中具有焦点的元素。

GetFocusedElement(XamlRoot)

检索 Xaml 岛容器中的焦点元素。

GetFocusedElement()

检索 UI 中具有焦点的元素。

public:
 static Platform::Object ^ GetFocusedElement();
 static IInspectable GetFocusedElement();
public static object GetFocusedElement();
function getFocusedElement()
Public Shared Function GetFocusedElement () As Object

返回

Object

Platform::Object

IInspectable

具有焦点的 对象。 通常,这是 一个 Control 类。

适用于

GetFocusedElement(XamlRoot)

检索 Xaml 岛容器中的焦点元素。

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

参数

xamlRoot
XamlRoot

返回

Object

Platform::Object

IInspectable

具有焦点的 对象。 通常,这是 一个 Control 类。

属性

Windows 要求

设备系列
Windows 10, version 1903 (在 10.0.18362.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v8.0 中引入)

另请参阅

适用于