why dependency property used in WPF what the impact if i used normal CLR property ?
what happend if i used normal property insted of dependency property Normal clr property can same work as dependency property then why needed dependency property
why dependency property used in WPF what the impact if i used normal CLR property ?
what happend if i used normal property insted of dependency property Normal clr property can same work as dependency property then why needed dependency property
Dependecy properties are special properties designed for Custom/UserControls in WPF. They are more powerful then normal CLR properties. E.g. they can be used as the target of databinding, their values can be inherited from parent controls, they can implement validation, register change callbacks, ...
from msdn:
The purpose of dependency properties is to provide a way to compute the value of a property based on the value of other inputs. These other inputs might include system properties such as themes and user preference, just-in-time property determination mechanisms such as data binding and animations/storyboards, multiple-use templates such as resources and styles, or values known through parent-child relationships with other elements in the element tree. In addition, a dependency property can be implemented to provide self-contained validation, default values, callbacks that monitor changes to other properties, and a system that can coerce property values based on potentially runtime information. Derived classes can also change some specific characteristics of an existing property by overriding dependency property metadata, rather than overriding the actual implementation of existing properties or creating new properties.
Check out this link for more information.