<Window x:Class="TestResourcesTriggle.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Window.Resources>
<Style TargetType="CheckBox" >
<Style.Triggers>
<Trigger Property="IsChecked" Value="true" >
<Trigger.Setters >
<Setter Property="FontSize" Value="20" />
<Setter Property="Foreground" Value="Orange" />
</Trigger.Setters>
</Trigger>
</Style.Triggers>
</Style>
</Window.Resources>
<StackPanel >
<CheckBox Content="悄悄的我走了" Margin="5" />
<CheckBox Content="正如我悄悄的来" Margin="5,0" />
<CheckBox Content="我挥一挥衣袖" Margin="5" />
<CheckBox Content="不带走一片云彩" Margin="5,0" Width="496" />
</StackPanel>
</Window>
转载于:https://www.cnblogs.com/wjchang/archive/2013/04/19/3671530.html