EyeCheckBoxStyle.xaml 5.4 KB

1234567891011121314151617181920212223242526272829303132
  1. <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  3. <Style TargetType="CheckBox" x:Key="EyeCheckBoxStyle">
  4. <Setter Property="Cursor" Value="Hand"></Setter>
  5. <Setter Property="Template">
  6. <Setter.Value>
  7. <ControlTemplate TargetType="{x:Type CheckBox}">
  8. <Grid>
  9. <Border Background="Transparent"
  10. BorderBrush="White"
  11. BorderThickness="1"
  12. CornerRadius="0"
  13. VerticalAlignment="Center">
  14. <Grid Name="Grid" Height="{TemplateBinding Height}"
  15. Width="{Binding ActualHeight,RelativeSource={RelativeSource Self}}">
  16. <Path Name="Path" SnapsToDevicePixels="False" Data="M1.46967 1.5304L13.4699 13.5304L14.5306 12.4697L2.53032 0.469727L1.46967 1.5304ZM9.99623 11.1174L11.1401 12.2613C10.176 12.7137 9.11463 13.0001 8 13.0001C3.58172 13.0001 0 8.50006 0 7.00006C0 6.2525 0.889611 4.75982 2.32903 3.45038L3.39107 4.5124L3.35064 4.54885C2.71795 5.12245 2.22043 5.72507 1.89225 6.23808C1.62112 6.66189 1.53702 6.91174 1.51122 6.98839L1.50727 7.00006L1.51122 7.01173C1.53702 7.08838 1.62112 7.33823 1.89225 7.76205C2.22043 8.27505 2.71795 8.87768 3.35064 9.45128C4.63846 10.6188 6.29481 11.5001 8 11.5001C8.67993 11.5001 9.3521 11.3599 9.99623 11.1174ZM8 1.00006C6.88543 1.00006 5.82409 1.28643 4.86006 1.73876L6.00394 2.88262C6.64802 2.64015 7.32013 2.50006 8 2.50006C9.70519 2.50006 11.3615 3.3813 12.6494 4.54885C13.2821 5.12245 13.7796 5.72507 14.1078 6.23808C14.3789 6.66189 14.463 6.91174 14.4888 6.98839L14.4927 7.00006L14.4888 7.01173C14.463 7.08838 14.3789 7.33823 14.1078 7.76205C13.7796 8.27505 13.2821 8.87768 12.6494 9.45128L12.6091 9.48762L13.6711 10.5496C15.1104 9.24022 16 7.7476 16 7.00006C16 5.50006 12.4183 1.00006 8 1.00006ZM5 7.00006C5 6.7313 5.03534 6.47079 5.10163 6.22293L6.92836 8.04962C6.93565 8.05707 6.94301 8.06444 6.95046 8.07172L8.77718 9.89842C8.52931 9.96472 8.26878 10.0001 8 10.0001C6.34315 10.0001 5 8.65692 5 7.00006ZM7.223 4.10166L10.8984 7.77701C10.9647 7.5292 11 7.26876 11 7.00006C11 5.34321 9.65685 4.00006 8 4.00006C7.73128 4.00006 7.47082 4.03539 7.223 4.10166Z" Fill="#616469"/>
  17. </Grid>
  18. </Border>
  19. </Grid>
  20. <ControlTemplate.Triggers>
  21. <Trigger Property="IsChecked" Value="True">
  22. <Setter TargetName="Path" Property="Data" Value="M14.4888 7.98833L14.4927 8L14.4888 8.01167C14.463 8.08832 14.3789 8.33817 14.1078 8.76198C13.7796 9.27499 13.2821 9.87762 12.6494 10.4512C11.3615 11.6188 9.70519 12.5 8 12.5C6.29481 12.5 4.63846 11.6188 3.35064 10.4512C2.71795 9.87762 2.22043 9.27499 1.89225 8.76198C1.62112 8.33817 1.53702 8.08832 1.51122 8.01167L1.50727 8L1.51122 7.98833C1.53702 7.91168 1.62112 7.66183 1.89225 7.23802C2.22043 6.72501 2.71795 6.12238 3.35064 5.54879C4.63846 4.38124 6.29481 3.5 8 3.5C9.70519 3.5 11.3615 4.38124 12.6494 5.54879C13.2821 6.12238 13.7796 6.72501 14.1078 7.23802C14.3789 7.66183 14.463 7.91168 14.4888 7.98833ZM16 8C16 9.5 12.4183 14 8 14C3.58172 14 0 9.5 0 8C0 6.5 3.58172 2 8 2C12.4183 2 16 6.5 16 8ZM9.5 8C9.5 8.82843 8.82843 9.5 8 9.5C7.17157 9.5 6.5 8.82843 6.5 8C6.5 7.17157 7.17157 6.5 8 6.5C8.82843 6.5 9.5 7.17157 9.5 8ZM11 8C11 9.65685 9.65685 11 8 11C6.34315 11 5 9.65685 5 8C5 6.34315 6.34315 5 8 5C9.65685 5 11 6.34315 11 8Z"></Setter>
  23. </Trigger>
  24. <Trigger Property="IsChecked" Value="False">
  25. <Setter TargetName="Path" Property="Data" Value="M1.46967 1.5304L13.4699 13.5304L14.5306 12.4697L2.53032 0.469727L1.46967 1.5304ZM9.99623 11.1174L11.1401 12.2613C10.176 12.7137 9.11463 13.0001 8 13.0001C3.58172 13.0001 0 8.50006 0 7.00006C0 6.2525 0.889611 4.75982 2.32903 3.45038L3.39107 4.5124L3.35064 4.54885C2.71795 5.12245 2.22043 5.72507 1.89225 6.23808C1.62112 6.66189 1.53702 6.91174 1.51122 6.98839L1.50727 7.00006L1.51122 7.01173C1.53702 7.08838 1.62112 7.33823 1.89225 7.76205C2.22043 8.27505 2.71795 8.87768 3.35064 9.45128C4.63846 10.6188 6.29481 11.5001 8 11.5001C8.67993 11.5001 9.3521 11.3599 9.99623 11.1174ZM8 1.00006C6.88543 1.00006 5.82409 1.28643 4.86006 1.73876L6.00394 2.88262C6.64802 2.64015 7.32013 2.50006 8 2.50006C9.70519 2.50006 11.3615 3.3813 12.6494 4.54885C13.2821 5.12245 13.7796 5.72507 14.1078 6.23808C14.3789 6.66189 14.463 6.91174 14.4888 6.98839L14.4927 7.00006L14.4888 7.01173C14.463 7.08838 14.3789 7.33823 14.1078 7.76205C13.7796 8.27505 13.2821 8.87768 12.6494 9.45128L12.6091 9.48762L13.6711 10.5496C15.1104 9.24022 16 7.7476 16 7.00006C16 5.50006 12.4183 1.00006 8 1.00006ZM5 7.00006C5 6.7313 5.03534 6.47079 5.10163 6.22293L6.92836 8.04962C6.93565 8.05707 6.94301 8.06444 6.95046 8.07172L8.77718 9.89842C8.52931 9.96472 8.26878 10.0001 8 10.0001C6.34315 10.0001 5 8.65692 5 7.00006ZM7.223 4.10166L10.8984 7.77701C10.9647 7.5292 11 7.26876 11 7.00006C11 5.34321 9.65685 4.00006 8 4.00006C7.73128 4.00006 7.47082 4.03539 7.223 4.10166Z"></Setter>
  26. </Trigger>
  27. </ControlTemplate.Triggers>
  28. </ControlTemplate>
  29. </Setter.Value>
  30. </Setter>
  31. </Style>
  32. </ResourceDictionary>