Raise event when property is changed
问题 I need to raise an event when the value of the property is changed. In my case this is when webView.Source is changed. I can't make a derived class because the class is marked as sealed. Is there any way to raise an event ? Thank you. 回答1: Raise event when property is changed For this scenario, you could create a DependencyPropertyWatcher to detect DependencyProperty changed event. The follow is tool class that you could use directly. public class DependencyPropertyWatcher<T> :