Gets the value of the dependency property after the reported change.
Syntax
Property value
Type: System.Object [.NET] | Platform::Object [C++]
The dependency property value after the change.
Remarks
A PropertyChangedCallback implementation is an optional part of the property metadata that you provide when you register a dependency property. The callback is invoked by the dependency property system internally. For more info on dependency properties in general, see Custom dependency properties and Dependency properties overview.
Examples
This example shows a PropertyChangedCallback implementation that uses the DependencyPropertyChangedEventArgs event data. In particular, it uses NewValue to set a related property, which displays the underlying numeric DependencyProperty as a string in a TextBlock part of a composite control.
private static void ValueChangedCallback(DependencyObject obj, DependencyPropertyChangedEventArgs args) { NumericUpDown ctl = (NumericUpDown)obj; Int32 newValue = (Int32)args.NewValue; // Update the TextElement to the new value. if (ctl.TextElement != null) { ctl.TextElement.Text = newValue.ToString(); }
Requirements
|
Minimum supported client | Windows 8 |
|---|---|
|
Minimum supported server | Windows Server 2012 |
|
Namespace |
|
|
Metadata |
|
See also
Build date: 1/31/2013