DependencyPropertyChangedEventArgs.NewValue Property


Gets the value of the property after the change.

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

Public ReadOnly Property NewValue As Object

Property Value

Type: System.Object

The property value after the change.

The type of the value provided should always be castable to the type of the dependency property being reported.

The following example uses the DependencyPropertyChangedEventArgs class in the context of a PropertyChangedCallback for a particular property of a custom class that also defines events. The callback takes the results of old and new values from the property system as communicated by DependencyPropertyChangedEventArgs, and repackages these into a different events arguments class RoutedPropertyChangedEventArgs(Of T). The new arguments are then used as the data for a "ValueChanged" event defined by and raised by the custom class.

.NET Framework
Available since 3.0
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft