你好,
对于你的需求,应该是需要自定义控件去实现,以下是我的模板:
<Style x:Key="CustomCheckBox" TargetType="{x:Type CheckBox}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type CheckBox}">
<StackPanel Orientation="Horizontal" Height="15">
<Border BorderBrush="Black" BorderThickness="1">
<Image x:Name="imageCheckBox" Source="/WpfCheckBoxThreeState;component/Images/CheckboxUnChecked.png" Width="15" Height="15" />
</Border>
<ContentPresenter VerticalAlignment="Center" />
</StackPanel>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="False">
<Setter TargetName="imageCheckBox" Property="Source" Value="/WpfCheckBoxThreeState;component/Images/CheckboxUnChecked.png" />
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="imageCheckBox" Property="Source" Value="/WpfCheckBoxThreeState;component/Images/CheckboxChecked.png" />
</Trigger>
<Trigger Property="IsChecked" Value="{x:Null}" >
<Setter TargetName="imageCheckBox" Property="Source" Value="/WpfCheckBoxThreeState;component/Images/SomethingElse.png" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
对于IsChecked为null, True, False的三种不同情况,设置不同的Source做为背景, 如下图:

We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.