How to explain DependencyProperty using real world analogy?Why is it needed?
How to explain DependencyProperty using real world analogy?
c#
I like Dave's answer, but I will say that this is how I usually think about DependencyProperties, at least with Silverlight (I think WPF is similar):If you want to create something that can be target of a binding, you want to create a class that implements INotifyPropertyChanged.If you want to create something that you can define in XAML and be bound to something, you want to create a derivative of DependencyObject with DependencyProperties.Gaining that understanding was a turning point in my ability to design things in Silverlight appropriately.