RoutedEvent.OwnerType 属性

定义

获取路由事件的已注册所有者类型。Gets the registered owner type of the routed event.

public:
 property Type ^ OwnerType { Type ^ get(); };
public Type OwnerType { get; }
member this.OwnerType : Type
Public ReadOnly Property OwnerType As Type

属性值

路由事件的所有者类型。The owner type of the routed event.

注解

此类型可以是任何对象类型, 不一定限于DependencyObjectThis type can be any object type, not necessarily limited to DependencyObject. 如果已添加所有者的路由事件, 则此属性将返回第一个声明的所有者。In cases of routed events that have owners added, this property will return the first declared owner.

此属性的值源自RegisterRoutedEvent定义的RoutedEvent方法。The value of this property originates from the RegisterRoutedEvent method that defines a RoutedEvent. 具体而言, 的值OwnerType ownerType是传递给RegisterRoutedEvent的参数值。Specifically, the value of OwnerType is the ownerType parameter value that was passed to RegisterRoutedEvent.

适用于

另请参阅