I am working in WPF C# and noticed that my expander will expand and collapse when when I click on the button or header (words) of the expander but will not expand when I click on the part of the expander beside the header.
The weird part is that it will collapse the expander when clicking on the same spot beside the expander.
So does anyone know how to allow the entire expander to be clicked on to expand and collapse it?
Any help is greatly appreciated!
<Expander ExpandDirection="Down" Width="Auto" Padding="4" Expanded="Expander_Expanded">
<Expander.Style>
<Style TargetType="Expander">
<!--<Setter Property="IsExpanded" Value="{Binding XPath=@Name, Converter={StaticResource ExpandConverter}}" />-->
<Setter Property="IsExpanded" Value="{Binding XPath=@Expand}" />
<Setter Property="Header">
<Setter.Value>
<MultiBinding Converter="{StaticResource NameConverter}">
<Binding XPath="@Name" />
</MultiBinding>
</Setter.Value>
</Setter>
<Setter Property="FontWeight" Value="Bold" />
<Style.Triggers>
<DataTrigger Binding="{Binding IsExpanded,RelativeSource={RelativeSource Self}}" Value="True">
</DataTrigger>
</Style.Triggers>
</Style>
</Expander.Style>
<ListBox Name="itemsList"
ItemsSource="{Binding XPath=UpgradeAction}"
ItemTemplate="{StaticResource dtListItemTemplate}"
SelectionChanged="listItems_SelectionChanged"
Style="{StaticResource styleListBoxUpgradeAction}"
ItemContainerStyle="{StaticResource styleListBoxItemUpgradeAction}"
MouseDoubleClick="itemsList_MouseDoubleClick">
</ListBox>
</Expander>