why we are declaring dependency property as static ?
+1
A:
The field you declare as static is only the identifier of a dependency property, not the value of the property. It is shared across all instances of the class, and is used to get/set the value of the property for each instance.
Thomas Levesque
2010-06-07 12:34:24
+2
A:
When you declare a DependencyProperty
, you are declaring the definition of that property, rather than the storage space for the property's value (as would be the case with the regular property declaration). There is only one definition of the property for the whole class - as opposed to one definition per instance of the class - and so it is static.
Dan Puzey
2010-06-07 12:35:20