Collapse all the expanders and expand one of them by default
问题 I have multiple expanders, and I was looking for a way to collapse all others the expanders when one of them is expanded. And I found this solution here XAML: <StackPanel Name="StackPanel1"> <StackPanel.Resources> <local:ExpanderToBooleanConverter x:Key="ExpanderToBooleanConverter" /> </StackPanel.Resources> <Expander Header="Expander 1" IsExpanded="{Binding SelectedExpander, Mode=TwoWay, Converter={StaticResource ExpanderToBooleanConverter}, ConverterParameter=1}"> <TextBlock>Expander 1<