现在正在学习WPF。今天发现了.Net依赖项财产的新功能。他们带来的是
- Support for Callbacks (Validation, Change, etc)
- Property inheritance
- Attached properties
在其他中。
但我的问题是,为什么它们需要在包含类中声明为静态?建议的方法是为它们添加实例包装器属性。为什么?
edit: @Matt, but doesn t that also mandate that the property value is also shared across instances - unless of course it is a derived value ?