I've a list box with list of group items enclosed each group item in 'Expander' and it's collapsed always at first instance. When an item is added to the list box to a particular group then at that time the respective expander for that group should be expanded(IsExpanded=true).
Below is the style I've tried so far. Am i missing anything here?
<Style x:Key="GroupContainerStyleA" TargetType="{x:Type GroupItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Expander IsExpanded="False" Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<Border>
<TextBlock Text="{Binding Path=Name}" FontWeight="Bold" Foreground="White"/>
</Border>
</Expander.Header>
<Border Background="White" Margin="1.5,0,1.5,1.5" BorderBrush="{StaticResource SideButtonBackgroundBrushKey}" BorderThickness="0.5">
<ItemsPresenter Margin="5,0,0,5"/>
</Border>
</Expander>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>