i am learning silverlight recently and find its difficult to understand the essence of the dependency property system. can I make a analogy between silverlight’s dependency property and javascript’s object property? both of them are implemented by a hashtable-like data structure and can be add/remove at run time , am i right?
i am learning silverlight recently and find its difficult to understand the essence of
Share
Think of DependencyProperties as Pointers or Addresses. Instead of setting a property to a value, you are setting it to a an address which points to another value.
For example, instead of saying a TextBox’s text is equal to SomeValue, you are saying it is pointing to a string value in the ViewModel. Or it is pointing to the Name property of some object. Or pointing to a specified ComboBox’s SelectedText. Of course, you could always say it points directly to a string of “SomeValue”
Basically, it is a property that is dependent on some other value.