Я показываю список элементов расширителя внутри элемента ItemsControl и привязываю список элементов к нему. Структура XAML я НижеСвернуть расширитель внутри ItemsControl WPF
<ItemsControl ItemsSource="{Binding}" >
<ItemsControl.ItemTemplate>
<DataTemplate>
<Expander ExpandDirection="Down" Style="{StaticResource ResourceKey=ExpanderItemStyle}" >
<Expander.Header>
<BulletDecorator>
//Expander header by default its collapsed
<Label Style="{StaticResource ResourceKey=ChapterHeadStyle}" Content="{Binding name}"></Label>
</BulletDecorator>
</Expander.Header>
<StackPanel> // Expander body want to collapse it when some some other items of ItemsControl is expanded
</StackPanel>
</Expander>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
Могу ли я сделать содержание расширитель colpased автоматически, когда некоторые другие элементы в ItemsControl является selcted
IsExpanded = "{Binding Mode = TwoWay, Path = IsSelected, RelativeSource = {RelativeSource AncestorType = ListBoxItem, Mode = FindAncestor}}" Таким образом, это сработало для меня Спасибо за помощь :) –