DependencyProperty
- Dependency Property is a property which register another property, It is depend on not itself but depend on (for e.g. xaml binding ) external inputs .
- Dependency Property is set to enable declarative code to alter the properties of an object which reduces the data requirements by providing a more powerful notification system regarding the change of data in a very specific way
- DependencyProperty.Register() method contain the Propertymetadata objects that stores the default value of the property. It may be also null.
- DependencyProperty should be register to the normal CLR property with Register() method by passing the property field that you use to store the data.
- Dependency Property can also contain the property changes notification . Using the CallBack() while registering the property can send the notification to user when the value has been chaged
CLR Property
- CLR Property Is a Classic .NET Class property. It is a normal property Which is nothing but a cross connection between fields & methods.
- CLR Property Is the normal property which doesn’t have more functionality like dependency property. It is wrapped only with get and set arrangement to be able to retrieve and update a private member.
- CLR Property Need not to carry any default value .
- CLR property Need to not to register with any property, it is straight forward.
- CLR Property Don’t have any Notification system.
No comments:
Post a Comment