允许将多个集合和项作为一个列表显示
<ListBox Name="myListBox" Height="300" Width="200" Background="White"> <ListBox.ItemsSource> <CompositeCollection> <CollectionContainer Collection="{Binding Source={StaticResource GreekGodsData}}" /> <CollectionContainer Collection="{Binding Source={StaticResource GreekHeroesData}}" /> <ListBoxItem Foreground="Red">Other Listbox Item 1</ListBoxItem> <ListBoxItem Foreground="Red">Other Listbox Item 2</ListBoxItem> </CompositeCollection> </ListBox.ItemsSource> </ListBox>