Listen to changes of dependency property

Rasto picture Rasto · Jan 22, 2011 · Viewed 54.4k times · Source

Is there any way to listen to changes of a DependencyProperty? I want to be notified and perform some actions when the value changes but I cannot use binding. It is a DependencyProperty of another class.

Answer

H.B. picture H.B. · Aug 10, 2011

This method is definitely missing here:

DependencyPropertyDescriptor
    .FromProperty(RadioButton.IsCheckedProperty, typeof(RadioButton))
    .AddValueChanged(radioButton, (s,e) => { /* ... */ });