【问题标题】:When to use AttachedProperties in wpf何时在 wpf 中使用 AttachedProperties
【发布时间】:2011-04-14 12:35:22
【问题描述】:

这是我的疑问,

  1. 何时使用 wpf 中的 AttachedProperties
  2. 我是否应该仅将 AttachedProperties 与 ContentControls(如面板)一起使用,其中有一个或多个孩子
  3. AttachedProperties 的用途是什么
  4. 我能否使用 AttachedProperties 来扩展控件的属性,即不存在但我想在不修改该控件的对象层次结构的情况下添加到控件的属性

P.S.:我已经阅读了 AttachedProperties 上的 MSDN 链接,但我仍然希望从 stackoverflow 用户那里听到最好的消息

谢谢

【问题讨论】:

  • 这个问题很笼统,随便搜索一下关于AttachedProperties的介绍信息,大概就能得到解答。

标签: c# wpf properties wpf-controls attached-properties


【解决方案1】:
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-06-04
  • 2011-03-31
  • 2011-08-31
  • 1970-01-01
  • 2016-03-31
  • 1970-01-01
相关资源
最近更新 更多