Reputation: 6471
Check this:
Can I add ListViewGroup
in WPF? Or a equivalent to that?
Upvotes: 0
Views: 518
Reputation: 184441
Grouping in WPF is usually done using collection views (example), how those groups are represented in an items control dependes on the GroupStyle
which can be adjusted to look like what you want.
Upvotes: 2
Reputation: 19416
Grouping can be used in WPF, for example:
<GroupBox Header="Example">
<GroupBox.Resources>
<CollectionViewSource x:Key="GroupedSource" Source="{Binding Items}">
<CollectionViewSource.GroupDescriptions>
<PropertyGroupDescription PropertyName="PropertyToGroupOn" />
</CollectionViewSource.GroupDescriptions>
</CollectionViewSource>
</GroupBox.Resources>
<ListBox ItemsSource="{StaticResource GroupedItemsSource}" />
</GroupBox>
This will show a ListBox with its items grouped based on the property PropertyToGroupOn
.
Upvotes: 3
Reputation: 8613
You can host WinForms control inside WPF controls using the WindowsFormsHost
control. Alternately, a quick Google search revealed a CodeProject sample that may do what you want in WPF.
Upvotes: 2