UIElement.GettingFocusEvent 属性

定义

获取 GettingFocus 路由事件的标识符。

public:
 static property RoutedEvent ^ GettingFocusEvent { RoutedEvent ^ get(); };
static RoutedEvent GettingFocusEvent();
public static RoutedEvent GettingFocusEvent { get; }
var routedEvent = UIElement.gettingFocusEvent;
Public Shared ReadOnly Property GettingFocusEvent As RoutedEvent

属性值

GettingFocus 路由事件的标识符。

Windows 要求

设备系列
Windows 10 Creators Update (在 10.0.15063.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v4.0 中引入)

注解

建议尽可能使用 UIElement 焦点路由事件而不是 FocusManager 事件。

一次只能有一个 UI 元素具有焦点。

当另一个控件失去焦点、应用程序视图更改、用户切换应用程序或用户与系统交互,使应用程序不再位于前台时,控件可以获得焦点。

适用于

另请参阅