Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>For that you will have to go into the checkboxes template and modify that. Specifically you should go in and remove the ContentPresenter which is what displays the text. Since you have no text, it is not a problem. The end result will look something like this. Just add that style to your checkbox.</p> <p>The default templates ContentPresenter is housed under the Bullet. Because of this, clicking on that content presenter (even if empty, I think it has a default size) will activate the controls click logic.</p> <pre><code>&lt;Style x:Key="CheckBoxStyle1" TargetType="{x:Type CheckBox}"&gt; &lt;Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/&gt; &lt;Setter Property="Background" Value="{StaticResource CheckRadioFillNormal}"/&gt; &lt;Setter Property="BorderBrush" Value="{StaticResource CheckRadioStrokeNormal}"/&gt; &lt;Setter Property="BorderThickness" Value="1"/&gt; &lt;Setter Property="FocusVisualStyle" Value="{StaticResource EmptyCheckBoxFocusVisual}"/&gt; &lt;Setter Property="Template"&gt; &lt;Setter.Value&gt; &lt;ControlTemplate TargetType="{x:Type CheckBox}"&gt; &lt;BulletDecorator Background="Transparent" SnapsToDevicePixels="true"&gt; &lt;BulletDecorator.Bullet&gt; &lt;Microsoft_Windows_Themes:BulletChrome BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" IsChecked="{TemplateBinding IsChecked}" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsPressed}"/&gt; &lt;/BulletDecorator.Bullet&gt; &lt;/BulletDecorator&gt; &lt;ControlTemplate.Triggers&gt; &lt;Trigger Property="HasContent" Value="true"&gt; &lt;Setter Property="FocusVisualStyle" Value="{StaticResource CheckRadioFocusVisual}"/&gt; &lt;Setter Property="Padding" Value="2,0,0,0"/&gt; &lt;/Trigger&gt; &lt;Trigger Property="IsEnabled" Value="false"&gt; &lt;Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/&gt; &lt;/Trigger&gt; &lt;/ControlTemplate.Triggers&gt; &lt;/ControlTemplate&gt; &lt;/Setter.Value&gt; &lt;/Setter&gt; &lt;/Style&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload