【问题标题】:Can I toggle expandability of a expander?我可以切换扩展器的可扩展性吗?
【发布时间】:2019-07-31 03:47:16
【问题描述】:

我可以在扩展器对象上设置任何属性或状态,使其无法扩展但仍然可以选择?

例如,我正在考虑 TreeView 中的最后一个 Child,我不希望 Expander 具有扩展按钮。但其他用途可能是如果某人无权访问标题或该行的其他内容。

【问题讨论】:

    标签: wpf xaml expander


    【解决方案1】:

    我知道的唯一方法是为扩展器创建自定义控件模板,从中删除扩展器按钮并禁用扩展。

    请参阅WPF Expander: Reversing the icon direction while keeping the content location (ExpandDirection) the same,了解如何为扩展器创建自定义模板。

    【讨论】:

      猜你喜欢
      • 2020-09-10
      • 1970-01-01
      • 2018-07-31
      • 2010-09-27
      • 2011-11-21
      • 2021-12-25
      • 2022-01-26
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多