Hi
I have a stackpanel with multiple expanders:
<StackPanel Margin="0,10,0,0">
<Expander Header="Test 1">
<ListBox>
<ListBoxItem Content="Unit 1"/>
<ListBoxItem Content="Unit 2"/>
</ListBox>
</Expander>
<Expander Header="Test 2">
<ListBox>
<ListBoxItem Content="Unit 3"/>
<ListBoxItem Content="Unit 4"/>
</ListBox>
</Expander>
</StackPanel>
And i want to implement these behaviors:
- one or both expander(s) could be expanded
- only one expander could be active (change header background)
- the active expander will change if i select another expander inside the panel however if i select other expander or other controls outside of the panel the active expander stays
How can i achieve this?