DependencyPropertyChangedEventArgs.NewValue Property

 

Gets the value of the property after the change.

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

member NewValue : Object with get

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<'T>. The new arguments are then used as the data for a "ValueChanged" event defined by and raised by the custom class.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show: