RoutedPropertyChangedEventArgs<T> 类

定义

提供有关依赖属性值更改的数据(由特定的路由事件报告),其中包含发生更改的属性的旧值和新值。Provides data about a change in value to a dependency property as reported by particular routed events, including the previous and current value of the property that changed.

generic <typename T>
public ref class RoutedPropertyChangedEventArgs : System::Windows::RoutedEventArgs
public class RoutedPropertyChangedEventArgs<T> : System.Windows.RoutedEventArgs
type RoutedPropertyChangedEventArgs<'T> = class
    inherit RoutedEventArgs
Public Class RoutedPropertyChangedEventArgs(Of T)
Inherits RoutedEventArgs

类型参数

T

发生更改的依赖属性的类型。The type of the dependency property that has changed.

继承
RoutedPropertyChangedEventArgs<T>

注解

这是一个泛型类, 其中类用于不同事件的事件数据。This is a generic class where the class is used for event data of different events. 不同的路由事件可以指定泛型的类型约束以生成特定于类型的事件数据类。Different routed events can specify the type constraint of the generic to produce a type-specific event data class. 类受约束后, 和OldValue NewValue属性也反映了这些类型约束; 因此, 你可以对不同的属性更改事件使用公用事件数据类, 而无需为每个可能的委托提供不同的委托属性类型。Once the class is constrained, the OldValue and NewValue properties also reflect these type constraints; thus you can use a common event data class for different property changed events without requiring different delegates for each possible property type.

用于报告属性更改的路由事件, 其中委托包含此事件数据类ValueChanged, 其中的类型约束 (以及在参数中传递的旧值和新值) 的类型Double为、和SelectedItemChanged, 其中类型约束为ObjectRouted events that reports a property change where the delegate incorporates this event data class include ValueChanged, where the type constraint (and old and new values passed in the arguments) is of type Double, and SelectedItemChanged, where the type constraint is Object.

构造函数

RoutedPropertyChangedEventArgs<T>(T, T)

使用提供的旧值和新值初始化 RoutedPropertyChangedEventArgs<T> 类的新实例。Initializes a new instance of the RoutedPropertyChangedEventArgs<T> class, with provided old and new values.

RoutedPropertyChangedEventArgs<T>(T, T, RoutedEvent)

使用提供的旧值和新值以及事件标识符初始化 RoutedPropertyChangedEventArgs<T> 类的新实例。Initializes a new instance of the RoutedPropertyChangedEventArgs<T> class, with provided old and new values, and an event identifier.

属性

Handled

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

(继承自 RoutedEventArgs)
NewValue

获取由属性更改事件报告的属性的新值。Gets the new value of a property as reported by a property changed event.

OldValue

获取由属性更改事件报告的属性的旧值。Gets the previous value of the property as reported by a property changed event.

OriginalSource

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

(继承自 RoutedEventArgs)
RoutedEvent

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

(继承自 RoutedEventArgs)
Source

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

(继承自 RoutedEventArgs)

方法

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)

以特定于类型的方式调用事件处理程序,这样做可以提高事件系统效率。Invokes event handlers in a type-specific way, which can increase event system efficiency.

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.

(继承自 RoutedEventArgs)
ToString()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)

适用于

另请参阅