RoutedEventArgs 类

定义

包含与路由事件相关联的状态信息和事件数据。Contains state information and event data associated with a routed event.

public ref class RoutedEventArgs : EventArgs
public class RoutedEventArgs : EventArgs
type RoutedEventArgs = class
    inherit EventArgs
Public Class RoutedEventArgs
Inherits EventArgs
继承
RoutedEventArgs
派生

注解

不同 RoutedEventArgs 可用于单个 RoutedEventDifferent RoutedEventArgs can be used with a single RoutedEvent. 此类负责将 RoutedEvent的事件数据打包,同时提供额外的事件状态信息,并由事件系统用于调用与路由事件关联的处理程序。This class is responsible for packaging the event data for a RoutedEvent, providing extra event state information, and is used by the event system for invoking the handler associated with the routed event.

构造函数

RoutedEventArgs()

初始化 RoutedEventArgs 类的新实例。Initializes a new instance of the RoutedEventArgs class.

RoutedEventArgs(RoutedEvent)

使用提供的路由事件标识符初始化 RoutedEventArgs 类的一个新实例。Initializes a new instance of the RoutedEventArgs class, using the supplied routed event identifier.

RoutedEventArgs(RoutedEvent, Object)

使用提供的路由事件标识符初始化 RoutedEventArgs 类的一个新实例,同时提供为事件另外声明一个源的机会。Initializes a new instance of the RoutedEventArgs class, using the supplied routed event identifier, and providing the opportunity to declare a different source for the event.

属性

Handled

获取或设置一个值,该值指示针对路由事件(在其经过路由时)的事件处理的当前状态。Gets or sets a value that indicates the present state of the event handling for a routed event as it travels the route.

OriginalSource

在父类进行任何可能的 Source 调整之前,获取由纯命中测试确定的原始报告源。Gets the original reporting source as determined by pure hit testing, before any possible Source adjustment by a parent class.

RoutedEvent

获取或设置与此 RoutedEventArgs 实例关联的 RoutedEventGets or sets the RoutedEvent associated with this RoutedEventArgs instance.

Source

获取或设置对引发事件的对象的引用。Gets or sets a reference to the object that raised the event.

方法

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
InvokeEventHandler(Delegate, Object)

当在派生类中重写时,提供特定于类型的调用事件处理程序的方式,该方式与基实现相比可提高效率。When overridden in a derived class, provides a way to invoke event handlers in a type-specific way, which can increase efficiency over the base implementation.

MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
OnSetSource(Object)

在派生类中重写时,每当实例的 Source 属性的值发生更改,则提供一个通知回调入口点。When overridden in a derived class, provides a notification callback entry point whenever the value of the Source property of an instance changes.

ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

适用于

另请参阅