Answer the question
In order to leave comments, you need to log in
What are dependency properties for?
I read the chapter in the book twice, but I still did not understand why these properties are needed. All examples of ue are painfully out of practice and context. Can someone explain in simple terms what it is and why?
Answer the question
In order to leave comments, you need to log in
Everything is extremely simple - dependency properties is an attempt to get reactive programming specifically within the framework of WPF and at minimal cost (without modifications at the level of languages / .net platform).
Have you ever used formulas in Excel? View =A1+A2+A3? When you update cell A1, all values calculated by formulas that contain A1 are automatically updated. Here it is about the same. Why is this so important in WPF? Because a) this is a natural way of communicating the properties of visual components with each other and with the ViewModel - without dependency properties, updating dependent values turns into hellish chains of Refresh, Recalcs and other things, and God forbid, do not forget to call all the necessary recalculations. b) it gives a mechanism for abstract processing and changing the properties of objects (usually - controls), more productive and highly specialized compared to standard reflection. This, in turn, makes it possible to write classes like DoubleAnimation without too much trouble,
This mechanism extends the functionality of field-based properties.
Everything is explained here - https://msdn.microsoft.com/en-us/library/ms752914%...
In the software section there is a mention of the OS, but no more. It is unlikely that you will find detailed information. https://ru.wikipedia.org/wiki/%D0%AD%D0%BB%D1%8C%D...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question