我有一个切换按钮:
<Label x:Name="Text" FontWeight="Bold" Foreground="#FF1B6625" Margin="30,0,0,0"
FontSize="15" Background="#0016792C" Content="pause"
FontFamily="/UIapp;component/Resources/Fonts/#Arial"
VerticalAlignment="Top" Height="40"
HorizontalAlignment="Left"/>
<Image x:Name="Icon"
Width="14" Height="14"
Margin="10,8,0,0" HorizontalAlignment="Left" VerticalAlignment="Top"
Source="{DynamicResource PlayIcon}">
</Image>
在ControlTemplate.Triggers中我有:
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="Icon" Property="Source" Value="{DynamicResource PauseIcon}" />
<Setter TargetName="Text" Property="Content" Value="play"/>
<Setter TargetName="Text" Property="Margin" Value="25,0,0,0" />
</Trigger>
</ControlTemplate.Triggers>
但是出于某种原因,当我点击按钮时,我得到的字体与点击前的字体不同。
任何想法的原因?
感谢