Hi! I have 2 expanders side by side. Only 1 can be opened at a time.
I want to write Triggers for them directly in their definition like this:
<Expander x:Name="MenuOverView" ExpandDirection="Left">
<Expander.Triggers>
<Trigger Property="IsExpanded" Value="False" SourceName="MenuDetailed">
<Setter Property="IsExpanded" Value="True" TargetName="MenuOverView" />
</Trigger>
</Expander.Triggers>
</Expander>
<Expander x:Name="MenuDetailed" ExpandDirection="Right">
<Expander.Triggers>
<Trigger Property="IsExpanded" Value="False" SourceName="MenuOverView">
<Setter Property="IsExpanded" Value="True" TargetName="MenuDetailed" />
</Trigger>
</Expander.Triggers>
</Expander>
This is of course a bad code.. How can I do that please?