For instance I am setting the Visibility on and off for a certain element. I have a Trigger that listens to the Visibility being set to Visible and plays out a Storyboard that fades in the element.
So on the flip side, when the element is set to Hidden, I want the element to fade out, and then have the property set to Visibility = false. Is this possible and if so how? Currently I have something like:
<Style.Triggers>
<Trigger Property="Visibility" Value="Visible">
<Trigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:0.5" />
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:0.5" />
</Storyboard>
</BeginStoryboard>
</Trigger.ExitActions>
</Trigger>
</Style.Triggers>