Lets say that I currently have two Comboboxes, one that displays the contents of the Productions list and one that displays the contents of the Seasons list from the viewmodel.
<ComboBox Grid.Column="1" Grid.Row="0" Margin="3" ItemsSource="{Binding Productions}" SelectedItem="{Binding SelectedProduction}" DisplayMemberPath="DisplayName" />
<ComboBox Grid.Column="1" Grid.Row="0" Margin="3" ItemsSource="{Binding Seasons}" SelectedItem="{Binding SelectedProduction}" DisplayMemberPath="DisplayName" />
What I need to do is combine these two Comboboxes into one. When clicking on the Combobox it should show a header saying Productions and below each production should appear and bellow all that it should do the same with the Seasons. So graphically it should look something like this:
Productions
production1
production2
production3
Seasons
season1
season2
season3
- I suppose that in order to use both lists as an ItemSource I could make a list which contains both Production and Season lists, but is there another way to bind them both in the same combobox?
- And then is it even possible to make it look like in the picture?