Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Well, I just went with a somewhat diabolical workaround. The mouse-over stuff works with a dummy background Path/image, while the check &amp; uncheck work with the main Path/image.</p> <p><strong>Kaxaml Code dump:</strong></p> <pre><code>&lt;Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"&gt; &lt;Grid&gt; &lt;Grid.Resources&gt; &lt;Style x:Key="{x:Type CheckBox}" TargetType="{x:Type CheckBox}"&gt; &lt;Setter Property="SnapsToDevicePixels" Value="true" /&gt; &lt;Setter Property="OverridesDefaultStyle" Value="true" /&gt; &lt;Setter Property="FocusVisualStyle" Value="{DynamicResource CheckBoxFocusVisual}" /&gt; &lt;Setter Property="Template"&gt; &lt;Setter.Value&gt; &lt;ControlTemplate TargetType="{x:Type CheckBox}"&gt; &lt;BulletDecorator Background="Transparent"&gt; &lt;BulletDecorator.Bullet&gt; &lt;Border x:Name="Border" Width="80" Height="80" CornerRadius="0" BorderThickness="1"&gt; &lt;Grid&gt; &lt;Path Visibility="Visible" Width="100" Height="100" x:Name="Dummy" SnapsToDevicePixels="False" StrokeThickness="9" Opacity="0" Data="M 0 30 C 2,29 10,30 14,39 M 15,40 C 5,31 55,10 45,20 "&gt; &lt;Path.Stroke&gt; &lt;SolidColorBrush Color="#FF224502" /&gt; &lt;/Path.Stroke&gt; &lt;/Path&gt; &lt;Path Visibility="Visible" Width="100" Height="100" x:Name="CheckBorder" SnapsToDevicePixels="False" StrokeThickness="9" Opacity="0" Data="M 0 30 C 2,29 10,30 14,39 M 15,40 C 5,31 55,10 45,20 "&gt; &lt;Path.Stroke&gt; &lt;SolidColorBrush Color="Black" /&gt; &lt;/Path.Stroke&gt; &lt;/Path&gt; &lt;Path Visibility="Visible" Width="100" Height="100" x:Name="CheckMark" Opacity="0" SnapsToDevicePixels="False" StrokeThickness="6" Data="M 1 30 C 2,29 10,30 14,39 M 15,39 C 5,31 55,10 45,20 "&gt; &lt;Path.Stroke&gt; &lt;SolidColorBrush Color="#FF0C9D0C" /&gt; &lt;/Path.Stroke&gt; &lt;/Path&gt; &lt;Path Visibility="Collapsed" Width="100" Height="100" x:Name="InderminateMark" SnapsToDevicePixels="False" StrokeThickness="5" Data="M 0 0 L 50 50"&gt; &lt;Path.Stroke&gt; &lt;SolidColorBrush Color="{DynamicResource GlyphColor}" /&gt; &lt;/Path.Stroke&gt; &lt;/Path&gt; &lt;/Grid&gt; &lt;/Border&gt; &lt;/BulletDecorator.Bullet&gt; &lt;/BulletDecorator&gt; &lt;ControlTemplate.Triggers&gt; &lt;MultiTrigger&gt; &lt;MultiTrigger.Conditions&gt; &lt;Condition Property="IsMouseOver" Value="True"/&gt; &lt;Condition Property="IsChecked" Value="False"/&gt; &lt;/MultiTrigger.Conditions&gt; &lt;MultiTrigger.EnterActions&gt; &lt;BeginStoryboard&gt; &lt;Storyboard&gt; &lt;DoubleAnimation Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Dummy" To="0.3" Duration="0:0:0.1"/&gt; &lt;/Storyboard&gt; &lt;/BeginStoryboard&gt; &lt;/MultiTrigger.EnterActions&gt; &lt;MultiTrigger.ExitActions&gt; &lt;BeginStoryboard&gt; &lt;Storyboard&gt; &lt;DoubleAnimation Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Dummy" To="0" Duration="0:0:0.1"/&gt; &lt;/Storyboard&gt; &lt;/BeginStoryboard&gt; &lt;/MultiTrigger.ExitActions&gt; &lt;/MultiTrigger&gt; &lt;Trigger Property="IsChecked" Value="True"&gt; &lt;Setter TargetName="CheckBorder" Property="Opacity" Value="1"/&gt; &lt;Setter TargetName="CheckMark" Property="Opacity" Value="1"/&gt; &lt;/Trigger&gt; &lt;Trigger Property="IsChecked" Value="False"&gt; &lt;Setter TargetName="CheckBorder" Property="Opacity" Value="0"/&gt; &lt;Setter TargetName="CheckMark" Property="Opacity" Value="0"/&gt; &lt;/Trigger&gt; &lt;/ControlTemplate.Triggers&gt; &lt;/ControlTemplate&gt; &lt;/Setter.Value&gt; &lt;/Setter&gt; &lt;/Style&gt; &lt;/Grid.Resources&gt; &lt;CheckBox Width="100" Height="100"&gt;Hello&lt;/CheckBox&gt; &lt;/Grid&gt; &lt;/Page&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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