RoutedPropertyChangedEventHandler<T> Delegate
Represents methods that will handle various routed events that track property value changes.
Assembly: PresentationFramework (in PresentationFramework.dll)
generic<typename T> public delegate void RoutedPropertyChangedEventHandler( Object^ sender, RoutedPropertyChangedEventArgs<T>^ e )
Parameters
- sender
-
Type:
System::Object^
The object where the event handler is attached.
- e
-
Type:
System.Windows::RoutedPropertyChangedEventArgs<T>^
The event data. Specific event definitions will constrain RoutedPropertyChangedEventArgs<T> to a type, with the type parameter of the constraint matching the type parameter constraint of a delegate implementation.
Type Parameters
- T
The type of the property value where changes in value are reported.
Examples of events that use type-constrained delegates based on RoutedPropertyChangedEventHandler<T> include TreeView::SelectedItemChanged and RangeBase::ValueChanged.
The following example defines and attaches a handler method for the ValueChanged event.
The handler is based on RoutedPropertyChangedEventHandler<T>, and is defined in the second segment of the code example, with the type parameter of the generic constrained to Double.
This particular example does not use the routed-event characteristic of the event; the event is handled on the same element that it is raised on. This is not always the case. For a routed event, it is possible that the source of the event is a different object than the object where the handler is attached.
Available since 3.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0