DefaultCheckBoxStyle.xaml 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395
  1. <ResourceDictionary
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:UI="clr-namespace:CustomUI">
  5. <SolidColorBrush x:Key="Border.Normal.Color">#C9D2D4</SolidColorBrush>
  6. <SolidColorBrush x:Key="Border.MouseOver.Color">#6452A4</SolidColorBrush>
  7. <SolidColorBrush x:Key="IsChecked.Background">#6452A4</SolidColorBrush>
  8. <SolidColorBrush x:Key="OptionMark.Static.Background" Color="#FFFFFFFF" />
  9. <SolidColorBrush x:Key="OptionMark.Static.Border" Color="#D7DDE4" />
  10. <SolidColorBrush x:Key="OptionMark.MouseOver.Background" Color="#FFF3F9FF" />
  11. <SolidColorBrush x:Key="OptionMark.MouseOver.Border" Color="#6452A4" />
  12. <SolidColorBrush x:Key="OptionMark.MouseOver.Glyph" Color="#FF212121" />
  13. <SolidColorBrush x:Key="OptionMark.Disabled.Background" Color="#FFE6E6E6" />
  14. <SolidColorBrush x:Key="OptionMark.Disabled.Border" Color="#FFBCBCBC" />
  15. <SolidColorBrush x:Key="OptionMark.Disabled.Glyph" Color="#FF707070" />
  16. <SolidColorBrush x:Key="OptionMark.Pressed.Background" Color="#FFD9ECFF" />
  17. <SolidColorBrush x:Key="OptionMark.Pressed.Border" Color="#6452A4" />
  18. <SolidColorBrush x:Key="OptionMark.Pressed.Glyph" Color="#FF212121" />
  19. <SolidColorBrush x:Key="OptionMark.Static.Glyph" Color="#FFFFFF" />
  20. <PathGeometry x:Key="Icon_Checked" Figures="M403.738809 825.236074c-10.027377 0-20.049638-4.052293-27.698852-12.156878L80.563362 500.022201c-15.300474-16.20917-15.300474-42.484603 0-58.69275 15.297404-16.208147 40.098253-16.208147 55.395658 0l267.779789 283.711644 489.358327-518.445806c15.298428-16.210193 40.10337-16.210193 55.402821 0 15.292288 16.207124 15.292288 42.484603-0.00614 58.690704l-517.056156 547.793204C423.788447 821.183781 413.76107 825.236074 403.738809 825.236074L403.738809 825.236074zM403.738809 825.236074" />
  21. <PathGeometry x:Key="Icon_对勾" Figures="M498.337684 793.195789 194.937263 479.797895 256 498.526316l215.578947 80.842105c71.895579-86.824421 183.996632-240.235789 404.210526-377.263158l53.894737-26.947368C727.552 363.708632 550.777263 657.515789 498.337684 793.195789L498.337684 793.195789 498.337684 793.195789zM881.448421 450.991158c3.233684 19.860211 4.985263 40.232421 4.985263 61.008842 0 206.794105-167.639579 374.433684-374.433684 374.433684-206.767158 0-374.406737-167.639579-374.406737-374.433684 0-206.767158 167.639579-374.406737 374.406737-374.406737 49.960421 0 97.549474 9.781895 141.096421 27.540211l0-74.913684C607.797895 75.048421 560.478316 67.368421 512 67.368421c-59.984842 0-118.218105 11.776-173.082947 34.950737-52.951579 22.420211-100.486737 54.487579-141.312 95.258947-40.798316 40.825263-72.865684 88.333474-95.258947 141.338947C79.144421 393.781895 67.368421 451.988211 67.368421 512s11.776 118.245053 34.977684 173.109895c22.420211 52.951579 54.460632 100.486737 95.258947 141.312 40.825263 40.798316 88.360421 72.838737 141.312 95.258947C393.781895 944.855579 452.015158 956.631579 512 956.631579c60.011789 0 118.272-11.776 173.109895-34.950737 52.951579-22.420211 100.486737-54.460632 141.285053-95.258947 40.825263-40.825263 72.865684-88.360421 95.258947-141.312C944.882526 630.245053 956.631579 572.011789 956.631579 512c0-20.560842-1.374316-40.906105-4.122947-61.008842L881.448421 450.991158 881.448421 450.991158z" />
  22. <ControlTemplate x:Key="DefaultSquare" TargetType="{x:Type UI:FlatCheckBox}">
  23. <Grid
  24. x:Name="templateRoot"
  25. Background="Transparent"
  26. SnapsToDevicePixels="True">
  27. <Grid.ColumnDefinitions>
  28. <ColumnDefinition Width="Auto" />
  29. <ColumnDefinition Width="*" />
  30. </Grid.ColumnDefinitions>
  31. <Border
  32. x:Name="checkBoxBorder"
  33. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  34. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  35. Background="{TemplateBinding Background}"
  36. BorderBrush="{TemplateBinding BorderBrush}"
  37. BorderThickness="{TemplateBinding BorderThickness}"
  38. CornerRadius="2">
  39. <Grid x:Name="markGrid">
  40. <Border
  41. x:Name="borderMark"
  42. Background="{TemplateBinding CheckedColor}"
  43. CornerRadius="1"
  44. SnapsToDevicePixels="True"
  45. UseLayoutRounding="True" />
  46. <Path
  47. x:Name="optionMark"
  48. Width="12"
  49. Height="{Binding Width, RelativeSource={RelativeSource Self}}"
  50. Margin="1"
  51. HorizontalAlignment="Center"
  52. VerticalAlignment="Center"
  53. Data="M329.625346 860.782661 17.275455 548.433794 74.584696 491.124554 329.625346 746.165204 949.415304 126.374222 1006.724545 183.683463Z"
  54. Fill="{StaticResource OptionMark.Static.Glyph}"
  55. RenderTransformOrigin="0.5,0.5"
  56. Stretch="Uniform">
  57. <Path.RenderTransform>
  58. <TransformGroup>
  59. <ScaleTransform />
  60. <SkewTransform />
  61. <RotateTransform />
  62. <TranslateTransform />
  63. </TransformGroup>
  64. </Path.RenderTransform>
  65. </Path>
  66. <Rectangle
  67. x:Name="indeterminateMark"
  68. Margin="2"
  69. Fill="{StaticResource OptionMark.Static.Glyph}"
  70. RenderTransformOrigin="0.5,0.5">
  71. <Rectangle.RenderTransform>
  72. <TransformGroup>
  73. <ScaleTransform />
  74. <SkewTransform />
  75. <RotateTransform />
  76. <TranslateTransform />
  77. </TransformGroup>
  78. </Rectangle.RenderTransform>
  79. </Rectangle>
  80. </Grid>
  81. </Border>
  82. <ContentPresenter
  83. x:Name="contentPresenter"
  84. Grid.Column="1"
  85. Margin="{TemplateBinding Padding}"
  86. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  87. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  88. Focusable="False"
  89. RecognizesAccessKey="True"
  90. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  91. <VisualStateManager.VisualStateGroups>
  92. <VisualStateGroup x:Name="CheckStates">
  93. <VisualState x:Name="Checked">
  94. <Storyboard>
  95. <DoubleAnimation
  96. Storyboard.TargetName="optionMark"
  97. Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"
  98. From="0.2"
  99. To="1"
  100. Duration="0:0:0.2" />
  101. <DoubleAnimation
  102. Storyboard.TargetName="optionMark"
  103. Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)"
  104. From="0.2"
  105. To="1"
  106. Duration="0:0:0.2" />
  107. <ColorAnimation
  108. Storyboard.TargetName="borderMark"
  109. Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
  110. From="Transparent"
  111. To="#6452A4"
  112. Duration="0:0:0.2" />
  113. </Storyboard>
  114. </VisualState>
  115. <VisualState x:Name="Unchecked">
  116. <Storyboard>
  117. <DoubleAnimationUsingKeyFrames Storyboard.TargetName="optionMark" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
  118. <EasingDoubleKeyFrame KeyTime="0" Value="1" />
  119. <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="0.2" />
  120. </DoubleAnimationUsingKeyFrames>
  121. <DoubleAnimationUsingKeyFrames Storyboard.TargetName="optionMark" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
  122. <EasingDoubleKeyFrame KeyTime="0" Value="1" />
  123. <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="0.2" />
  124. </DoubleAnimationUsingKeyFrames>
  125. <ColorAnimation
  126. Storyboard.TargetName="borderMark"
  127. Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
  128. From="#3399FF"
  129. To="Transparent"
  130. Duration="0:0:0.2" />
  131. </Storyboard>
  132. </VisualState>
  133. <VisualState x:Name="Indeterminate">
  134. <Storyboard>
  135. <DoubleAnimationUsingKeyFrames Storyboard.TargetName="indeterminateMark" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
  136. <EasingDoubleKeyFrame KeyTime="0" Value="0" />
  137. <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="1" />
  138. </DoubleAnimationUsingKeyFrames>
  139. <DoubleAnimationUsingKeyFrames Storyboard.TargetName="indeterminateMark" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
  140. <EasingDoubleKeyFrame KeyTime="0" Value="0" />
  141. <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="1" />
  142. </DoubleAnimationUsingKeyFrames>
  143. </Storyboard>
  144. </VisualState>
  145. </VisualStateGroup>
  146. </VisualStateManager.VisualStateGroups>
  147. </Grid>
  148. <ControlTemplate.Triggers>
  149. <Trigger Property="HasContent" Value="true">
  150. <Setter Property="Padding" Value="4,0,0,0" />
  151. </Trigger>
  152. <Trigger Property="IsMouseOver" Value="true">
  153. <Setter TargetName="checkBoxBorder" Property="BorderBrush" Value="{StaticResource OptionMark.MouseOver.Border}" />
  154. <Setter TargetName="indeterminateMark" Property="Fill" Value="{StaticResource OptionMark.MouseOver.Glyph}" />
  155. </Trigger>
  156. <Trigger Property="IsEnabled" Value="false">
  157. <Setter Property="Cursor" Value="No" />
  158. <Setter TargetName="checkBoxBorder" Property="Background" Value="{StaticResource OptionMark.Disabled.Background}" />
  159. <Setter TargetName="checkBoxBorder" Property="BorderBrush" Value="{StaticResource OptionMark.Disabled.Border}" />
  160. <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource OptionMark.Disabled.Glyph}" />
  161. <Setter TargetName="indeterminateMark" Property="Fill" Value="{StaticResource OptionMark.Disabled.Glyph}" />
  162. </Trigger>
  163. <Trigger Property="IsPressed" Value="true">
  164. <!--<Setter TargetName="checkBoxBorder" Property="BorderBrush" Value="{StaticResource OptionMark.Pressed.Border}" />-->
  165. <Setter TargetName="indeterminateMark" Property="Fill" Value="{StaticResource OptionMark.Pressed.Glyph}" />
  166. </Trigger>
  167. <Trigger Property="IsChecked" Value="true">
  168. <Setter TargetName="optionMark" Property="Opacity" Value="1" />
  169. <Setter TargetName="indeterminateMark" Property="Opacity" Value="0" />
  170. <Setter TargetName="checkBoxBorder" Property="BorderBrush" Value="{StaticResource OptionMark.MouseOver.Border}" />
  171. </Trigger>
  172. <Trigger Property="IsChecked" Value="false">
  173. <Setter TargetName="indeterminateMark" Property="Opacity" Value="0" />
  174. </Trigger>
  175. <Trigger Property="IsChecked" Value="{x:Null}">
  176. <Setter TargetName="optionMark" Property="Opacity" Value="0" />
  177. <Setter TargetName="borderMark" Property="Opacity" Value="0" />
  178. <Setter TargetName="indeterminateMark" Property="Opacity" Value="1" />
  179. </Trigger>
  180. </ControlTemplate.Triggers>
  181. </ControlTemplate>
  182. <ControlTemplate x:Key="DefaultEllipse" TargetType="{x:Type UI:FlatCheckBox}">
  183. <Grid
  184. x:Name="templateRoot"
  185. Background="Transparent"
  186. SnapsToDevicePixels="True">
  187. <Grid.ColumnDefinitions>
  188. <ColumnDefinition Width="Auto" />
  189. <ColumnDefinition Width="*" />
  190. </Grid.ColumnDefinitions>
  191. <Border
  192. x:Name="borderMark"
  193. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  194. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  195. Background="{TemplateBinding Background}"
  196. BorderBrush="{TemplateBinding BorderBrush}"
  197. BorderThickness="{TemplateBinding BorderThickness}"
  198. CornerRadius="100">
  199. <Path
  200. x:Name="optionMark"
  201. Width="12"
  202. Height="{Binding Width, RelativeSource={RelativeSource Self}}"
  203. Margin="2"
  204. HorizontalAlignment="Center"
  205. VerticalAlignment="Center"
  206. Data="M329.625346 860.782661 17.275455 548.433794 74.584696 491.124554 329.625346 746.165204 949.415304 126.374222 1006.724545 183.683463Z"
  207. Fill="{StaticResource OptionMark.Static.Glyph}"
  208. RenderTransformOrigin="0.5,0.5"
  209. Stretch="Uniform">
  210. <Path.RenderTransform>
  211. <TransformGroup>
  212. <ScaleTransform />
  213. <SkewTransform />
  214. <RotateTransform />
  215. <TranslateTransform />
  216. </TransformGroup>
  217. </Path.RenderTransform>
  218. </Path>
  219. </Border>
  220. <ContentPresenter
  221. x:Name="contentPresenter"
  222. Grid.Column="1"
  223. Margin="{TemplateBinding Padding}"
  224. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  225. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  226. Focusable="False"
  227. RecognizesAccessKey="True"
  228. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  229. <VisualStateManager.VisualStateGroups>
  230. <!--<VisualStateGroup x:Name="CommonStates">
  231. <VisualState x:Name="Normal">
  232. <Storyboard>
  233. <ColorAnimation Storyboard.TargetName="borderMark"
  234. Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)"
  235. Duration="00:00:0.3" To="#D7DDE4"/>
  236. </Storyboard>
  237. </VisualState>
  238. <VisualState x:Name="MouseOver">
  239. <Storyboard>
  240. <ColorAnimation Storyboard.TargetName="borderMark"
  241. Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)"
  242. Duration="00:00:0.3" To="#3399FF"/>
  243. </Storyboard>
  244. </VisualState>
  245. </VisualStateGroup>-->
  246. <VisualStateGroup x:Name="CheckStates">
  247. <VisualState x:Name="Checked">
  248. <Storyboard>
  249. <DoubleAnimation
  250. Storyboard.TargetName="optionMark"
  251. Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"
  252. From="0.2"
  253. To="1"
  254. Duration="0:0:0.2" />
  255. <DoubleAnimation
  256. Storyboard.TargetName="optionMark"
  257. Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)"
  258. From="0.2"
  259. To="1"
  260. Duration="0:0:0.2" />
  261. <ColorAnimation
  262. Storyboard.TargetName="borderMark"
  263. Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
  264. From="Transparent"
  265. To="#3399FF"
  266. Duration="0:0:0.2" />
  267. </Storyboard>
  268. </VisualState>
  269. <VisualState x:Name="Unchecked">
  270. <Storyboard>
  271. <DoubleAnimationUsingKeyFrames Storyboard.TargetName="optionMark" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
  272. <EasingDoubleKeyFrame KeyTime="0" Value="1" />
  273. <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="0.2" />
  274. </DoubleAnimationUsingKeyFrames>
  275. <DoubleAnimationUsingKeyFrames Storyboard.TargetName="optionMark" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
  276. <EasingDoubleKeyFrame KeyTime="0" Value="1" />
  277. <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="0.2" />
  278. </DoubleAnimationUsingKeyFrames>
  279. <ColorAnimation
  280. Storyboard.TargetName="borderMark"
  281. Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
  282. From="#3399FF"
  283. To="Transparent"
  284. Duration="0:0:0.2" />
  285. </Storyboard>
  286. </VisualState>
  287. <VisualState x:Name="Indeterminate">
  288. <Storyboard>
  289. <DoubleAnimationUsingKeyFrames Storyboard.TargetName="indeterminateMark" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
  290. <EasingDoubleKeyFrame KeyTime="0" Value="0" />
  291. <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="1" />
  292. </DoubleAnimationUsingKeyFrames>
  293. <DoubleAnimationUsingKeyFrames Storyboard.TargetName="indeterminateMark" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
  294. <EasingDoubleKeyFrame KeyTime="0" Value="0" />
  295. <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="1" />
  296. </DoubleAnimationUsingKeyFrames>
  297. </Storyboard>
  298. </VisualState>
  299. </VisualStateGroup>
  300. </VisualStateManager.VisualStateGroups>
  301. </Grid>
  302. <ControlTemplate.Triggers>
  303. <Trigger Property="HasContent" Value="true">
  304. <Setter Property="Padding" Value="4,0,0,0" />
  305. </Trigger>
  306. <Trigger Property="IsMouseOver" Value="true">
  307. <Setter TargetName="borderMark" Property="BorderBrush" Value="{StaticResource OptionMark.MouseOver.Border}" />
  308. </Trigger>
  309. <Trigger Property="IsEnabled" Value="false">
  310. <Setter Property="Cursor" Value="No" />
  311. <Setter TargetName="borderMark" Property="Background" Value="{StaticResource OptionMark.Disabled.Background}" />
  312. <Setter TargetName="borderMark" Property="BorderBrush" Value="{StaticResource OptionMark.Disabled.Border}" />
  313. <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource OptionMark.Disabled.Glyph}" />
  314. </Trigger>
  315. <Trigger Property="IsPressed" Value="true">
  316. <Setter TargetName="borderMark" Property="BorderBrush" Value="{StaticResource OptionMark.Pressed.Border}" />
  317. </Trigger>
  318. <Trigger Property="IsChecked" Value="true">
  319. <Setter TargetName="optionMark" Property="Opacity" Value="1" />
  320. <Setter TargetName="borderMark" Property="BorderBrush" Value="#6452A4" />
  321. </Trigger>
  322. <Trigger Property="IsChecked" Value="{x:Null}">
  323. <Setter TargetName="optionMark" Property="Opacity" Value="0" />
  324. <Setter TargetName="borderMark" Property="Opacity" Value="0" />
  325. </Trigger>
  326. </ControlTemplate.Triggers>
  327. </ControlTemplate>
  328. <ControlTemplate x:Key="EllipseSkin1" TargetType="{x:Type UI:FlatCheckBox}">
  329. <!-- 使用BulletDecorator可以解决CheckBox样式重写后只能点击文字或者边缘才能选中CheckBox的问题 -->
  330. <BulletDecorator VerticalAlignment="Center" Background="Transparent">
  331. <BulletDecorator.Bullet>
  332. <Path
  333. x:Name="cp"
  334. Width="18"
  335. HorizontalAlignment="Center"
  336. VerticalAlignment="Center"
  337. Data="{StaticResource Icon_对勾}"
  338. Fill="{TemplateBinding UnCheckedColor}"
  339. SnapsToDevicePixels="True"
  340. Stretch="Uniform"
  341. UseLayoutRounding="True" />
  342. </BulletDecorator.Bullet>
  343. <ContentPresenter
  344. Margin="5,0,0,0"
  345. HorizontalAlignment="Center"
  346. VerticalAlignment="Center" />
  347. </BulletDecorator>
  348. <ControlTemplate.Triggers>
  349. <Trigger Property="IsMouseOver" Value="True">
  350. <Setter Property="Cursor" Value="Hand" />
  351. </Trigger>
  352. <Trigger Property="IsChecked" Value="True">
  353. <Setter TargetName="cp" Property="Fill" Value="{Binding CheckedColor, RelativeSource={RelativeSource TemplatedParent}}" />
  354. </Trigger>
  355. <Trigger Property="IsEnabled" Value="False">
  356. <Setter Property="Cursor" Value="No" />
  357. <Setter TargetName="cp" Property="Fill" Value="#DDDBD5" />
  358. </Trigger>
  359. </ControlTemplate.Triggers>
  360. </ControlTemplate>
  361. <Style TargetType="{x:Type UI:FlatCheckBox}">
  362. <Setter Property="Background" Value="{StaticResource OptionMark.Static.Background}" />
  363. <Setter Property="BorderBrush" Value="{StaticResource OptionMark.Static.Border}" />
  364. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
  365. <Setter Property="BorderThickness" Value="1" />
  366. <Setter Property="VerticalContentAlignment" Value="Center" />
  367. <Setter Property="SnapsToDevicePixels" Value="True" />
  368. <Setter Property="UseLayoutRounding" Value="True" />
  369. <Setter Property="UnCheckedColor" Value="{StaticResource Border.Normal.Color}" />
  370. <Setter Property="CheckedColor" Value="{StaticResource IsChecked.Background}" />
  371. <Setter Property="Template" Value="{StaticResource DefaultSquare}" />
  372. <Style.Triggers>
  373. <Trigger Property="Skins" Value="DefaultEllipse">
  374. <Setter Property="Template" Value="{StaticResource DefaultEllipse}" />
  375. </Trigger>
  376. <Trigger Property="Skins" Value="EllipseSkin1">
  377. <Setter Property="UnCheckedColor" Value="#D9D9D9" />
  378. <Setter Property="CheckedColor" Value="#ED5435" />
  379. <Setter Property="Template" Value="{StaticResource EllipseSkin1}" />
  380. </Trigger>
  381. </Style.Triggers>
  382. </Style>
  383. </ResourceDictionary>