Hello, I want skin the checkbox, but the text don't show:
<Style TargetType="{x:Type CheckBox}">
<Setter Property="FontFamily" Value="Verdana" />
<Setter Property="FontSize" Value="14" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type CheckBox}">
<BulletDecorator Background="Transparent" SnapsToDevicePixels="true">
<BulletDecorator.Bullet>
<TextBlock Name="MyPin" Text="" FontFamily="Segoe UI Symbol" Foreground="{StaticResource scbBlue}" FontSize="14" />
</BulletDecorator.Bullet>
<TextBlock Text="{TemplateBinding ContentPresenter.Content}" TextWrapping="Wrap"
HorizontalAlignment="{TemplateBinding HorizontalAlignment}" Margin="{TemplateBinding Padding}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalAlignment}"/>
</BulletDecorator>
<ControlTemplate.Triggers>
<Trigger Property="HasContent" Value="true">
<Setter Property="FocusVisualStyle" Value="{StaticResource CheckRadioFocusVisual}"/>
<Setter Property="Padding" Value="4,0,0,0"/>
</Trigger>
<Trigger Property="IsChecked" Value="False">
<Setter TargetName="MyPin" Property="Text" Value="" />
<Setter TargetName="MyPin" Property="Foreground" Value="{StaticResource scbBlack}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Set
↧