DependencyPropertyChangedEventArgs Structure
Collapse the table of content
Expand the table of content

DependencyPropertyChangedEventArgs Structure

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Provides data for a PropertyChangedCallback implementation.

Namespace:  System.Windows
Assembly:  System.Windows (in System.Windows.dll)

public struct DependencyPropertyChangedEventArgs

The DependencyPropertyChangedEventArgs type exposes the following members.

Public propertyNewValueGets the value of the property after the change.
Public propertyOldValueGets the value of the property before the change.
Public propertyPropertyGets the identifier for the dependency property where the value change occurred.

Public methodEqualsIndicates whether this instance and a specified object are equal. (Inherited from ValueType.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeReturns the hash code for this instance. (Inherited from ValueType.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns the fully qualified type name of this instance. (Inherited from ValueType.)

The scenario for PropertyChangedCallback is to use the arguments to report old and new values that come from the property system evaluation of the property. A callback that processes old and new values might choose special handling depending on these values. Some example scenarios include:

  • Choosing to not respond to value changes that are deemed insignificant.

  • Rejecting property changes that fail a property-specific or circumstantial validation.

  • Checking/setting other property values that exist in a dependency relationship with the property that changed.

  • Raising an event from the class.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

© 2018 Microsoft