【发布时间】:2011-04-14 12:35:22
【问题描述】:
这是我的疑问,
- 何时使用 wpf 中的 AttachedProperties
- 我是否应该仅将 AttachedProperties 与 ContentControls(如面板)一起使用,其中有一个或多个孩子
- AttachedProperties 的用途是什么
- 我能否使用 AttachedProperties 来扩展控件的属性,即不存在但我想在不修改该控件的对象层次结构的情况下添加到控件的属性
P.S.:我已经阅读了 AttachedProperties 上的 MSDN 链接,但我仍然希望从 stackoverflow 用户那里听到最好的消息
谢谢
【问题讨论】:
-
这个问题很笼统,随便搜索一下关于AttachedProperties的介绍信息,大概就能得到解答。
标签: c# wpf properties wpf-controls attached-properties