Skip to content

Instantly share code, notes, and snippets.

@gyuwon
Created November 29, 2013 01:09
Show Gist options
  • Save gyuwon/7700227 to your computer and use it in GitHub Desktop.
Save gyuwon/7700227 to your computer and use it in GitHub Desktop.
<Storyboard x:Key="FlickerAnimation">
<DoubleAnimation Storyboard.TargetProperty="Opacity" AutoReverse="True" RepeatBehavior="Forever" Duration="0:0:0.5" From="0.0" To="1.0"/>
</Storyboard>
<!-- ... -->
<Style.Triggers>
<DataTrigger Binding="{Binding SomeProperty}" Value="SomeValue">
<DataTrigger.EnterActions>
<BeginStoryboard Name="Flicker" Storyboard="{StaticResource FlickerAnimation}" />
</DataTrigger.EnterActions>
<DataTrigger.ExitActions>
<StopStoryboard BeginStoryboardName="Flicker" />
</DataTrigger.ExitActions>
</DataTrigger>
</Style.Triggers>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment