【发布时间】:2014-01-26 13:57:35
【问题描述】:
我正在尝试使用 ItemsControl - 而不是 ItemsPresenter- 来呈现 GroupItem 的项目,但找不到要绑定的正确属性。
<ControlTemplate TargetType="{x:Type GroupItem}">
<Expander Header="{Binding Name}">
<ItemsControl
ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent},Path=??}"/>
<!--<ItemsPresenter />-->
</Expander>
</ControlTemplate>
我使用的任何属性都不会显示任何内容 那么用作 ItemsSource 的 GroupItem 的属性是什么?
提前致谢。
【问题讨论】:
-
我现在无法检查,是
GroupItems吗? -
@Chris 试过但没用
标签: wpf data-binding controltemplate