<Style x:Key="playBtn" TargetType="{x:Type control:ButtonWithIcon}">
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Width" Value="28"/>
<Setter Property="Height" Value="28"/>
<Setter Property="IconWidth" Value="28"/>
<Setter Property="IconHeight" Value="28"/>
<Setter Property="IconPath" Value="/QuJiao;component/Resource/Image/Prepare/LevelReading/bh_pla_icon_play.png"/>
<Setter Property="SecondIconPath" Value="/QuJiao;component/Resource/Image/Prepare/LevelReading/bh_pla_icon_pause.png"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type control:ButtonWithIcon}">
<Grid Width="{TemplateBinding Width}" Height="{TemplateBinding Height}">
<Image x:Name="img"
Stretch="Uniform"
HorizontalAlignment="Center" VerticalAlignment="Center"
Width="{TemplateBinding IconWidth}"
Height="{TemplateBinding IconHeight}"
Source="{TemplateBinding IconPath}"/>
</Grid>
<ControlTemplate.Triggers>
<DataTrigger Binding="{你VM里的触发变量}" Value="True">
<Setter Property="Source" TargetName="img" Value="{Binding Path=SecondIconPath, RelativeSource={RelativeSource AncestorType={x:Type control:ButtonWithIcon}}}"/>
</DataTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>