WPF ListBox的组面板
我有一个列表框,使用GroupStyle对项目进行分组。我想在stackpanel的底部添加一个控件来保存所有组。此附加控件需要是滚动内容的一部分,以便用户滚动到列表的底部以查看控件。如果我使用的是没有组的列表框,则通过修改ListBox模板可以轻松完成此任务。但是,对于分组的项目,ListBox模板似乎仅适用于每个组。我可以修改GroupStyle.Panel,但这不允许我向该面板添加项目。
<ListBox>
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.GroupStyle>
<GroupStyle>
<GroupStyle.Panel>
<ItemsPanelTemplate>
<VirtualizingStackPanel/> **<----- I would like to add a control to this stackpanel**
</ItemsPanelTemplate>
</GroupStyle.Panel>
<GroupStyle.ContainerStyle>
<Style TargetType="{x:Type GroupItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type GroupItem}">
<Grid>
<ItemsPresenter />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</GroupStyle.ContainerStyle>
</GroupStyle>
</ListBox.GroupStyle>
这应该让我知道我需要做什么:
没有找到相关结果
已邀请:
1 个回复
降女陷费券
,而只需使用
。如果你将这个XAML添加到你的
,它将添加一个组结尾
:
编辑: 以下是一个完整的仅限XAML的分组列表示例,其中包含滚动条以及添加到滚动区域末尾的其他内容: