For example, if I have a border with a style like this:
<Border>
<Border.Background>
<SolidColorBrush />
</Border.Background>
<Border.Style>
<Style TargetType="Border">
<Style.Triggers>
<DataTrigger Binding="{Binding StatusCode}"
Value="Status1">
<DataTrigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<ColorAnimation Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
From="Transparent"
To="Red"
Duration="0:0:0.9"
DecelerationRatio="0.1"
AccelerationRatio="0.9"
AutoReverse="False"
RepeatBehavior="Forever" />
</Storyboard>
</BeginStoryboard>
</DataTrigger.EnterActions>
</DataTrigger>
</Style.Triggers>
</Style>
</Border.Style>
</Border>
Is there any way to move all that stuff inside the datatrigger to a template?