DependencyPropertyChangedEventHandler Delegate

Definition

Represents the method that will handle events raised when a DependencyProperty is changed on a particular DependencyObject implementation.

public delegate void DependencyPropertyChangedEventHandler(System::Object ^ sender, DependencyPropertyChangedEventArgs e);
public delegate void DependencyPropertyChangedEventHandler(object sender, DependencyPropertyChangedEventArgs e);
type DependencyPropertyChangedEventHandler = delegate of obj * DependencyPropertyChangedEventArgs -> unit
Public Delegate Sub DependencyPropertyChangedEventHandler(sender As Object, e As DependencyPropertyChangedEventArgs)

Parameters

sender
Object

The source of the event.

Remarks

This delegate is the handler signature for particular events that report dependency property changes.

An event that uses this handler is exposed as a common language runtime (CLR) event, not as a routed event. Typically these events follow the naming pattern Is(PropertyName)Changed, where PropertyName is the DependencyProperty.Name of the property that changed. The arguments of the event are used to query the old and new value of the property, as reported by the particular event. Typically there is a 1:1 correspondence between properties that change and a particular event that reports the change. It is also possible, though uncommon, to have the same event report changes to more than one property. In this case, the DependencyPropertyChangedEventArgs should be checked to determine the property that changed.

The event data class DependencyPropertyChangedEventArgs has a wider usage than just this delegate. DependencyPropertyChangedEventArgs is also used to communicate data for PropertyChangedCallback implementations, which are part of the customization features and internals of the WPF property system, and by the OnPropertyChanged virtual method, which can be overridden to provide class-specific notifications whenever any dependency property on the object changes.

Extension Methods

GetMethodInfo(Delegate)

Gets an object that represents the method represented by the specified delegate.

Applies to

See also