Need a short and clear definition for “Dependency Properties”

前端 未结 6 858
没有蜡笔的小新
没有蜡笔的小新 2021-02-02 13:42

I\'m trying to figure out what exactly Dependency Properties are, but when I look anywhere for a definition, I only find \"how to use\" but not \"what it is\". Imagine you are

6条回答
  •  南笙
    南笙 (楼主)
    2021-02-02 14:36

    A dependency property is a property where the current value is dependent (hence the name) on other aspects such as default values, validation, coercion, value inheritance or animation.

    Also a depedency property has inbuilt support for change notifications, data binding and styling.

    What are they?

    A bunch of classes and defined ways to use them that provide the above functionality to be used on classes that inherit from DependencyObject.

    They are not a language feature. They are a feature of the .NET Framework.

提交回复
热议问题