终端一体化运控平台
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

BeveledRadioButtonStyle.xaml 13 KiB

il y a 4 mois
il y a 4 mois
il y a 4 mois
il y a 4 mois
il y a 4 mois
il y a 4 mois
il y a 4 mois
il y a 4 mois
il y a 4 mois
il y a 4 mois
il y a 4 mois
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  1. <ResourceDictionary
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls">
  5. <!--#region 右斜边按钮-->
  6. <Style x:Key="BeveledRadioButtonStyle" TargetType="{x:Type RadioButton}">
  7. <Setter Property="FontFamily" Value="楷体" />
  8. <Setter Property="Width" Value="100" />
  9. <Setter Property="Height" Value="30" />
  10. <Setter Property="IsChecked" Value="False" />
  11. <Setter Property="FontSize" Value="13" />
  12. <Setter Property="Foreground" Value="#ddd" />
  13. <Setter Property="Template">
  14. <Setter.Value>
  15. <ControlTemplate TargetType="{x:Type RadioButton}">
  16. <Grid x:Name="gr" SnapsToDevicePixels="True">
  17. <pry:BeveledButton
  18. x:Name="bb"
  19. FillColor="#4B8EC4"
  20. IsParallelogram="False"
  21. StrokeThickness="1" />
  22. <ContentPresenter
  23. x:Name="contentPresenter"
  24. Margin="0,0,10,0"
  25. HorizontalAlignment="Center"
  26. VerticalAlignment="Center"
  27. Content="{TemplateBinding Content}"
  28. ContentStringFormat="{TemplateBinding ContentStringFormat}"
  29. ContentTemplate="{TemplateBinding ContentTemplate}"
  30. Focusable="False"
  31. RecognizesAccessKey="True"
  32. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  33. </Grid>
  34. <ControlTemplate.Triggers>
  35. <Trigger Property="IsChecked" Value="False">
  36. <Setter TargetName="bb" Property="FillColor" Value="#55007acc" />
  37. </Trigger>
  38. </ControlTemplate.Triggers>
  39. </ControlTemplate>
  40. </Setter.Value>
  41. </Setter>
  42. </Style>
  43. <!--#endregion-->
  44. <!--#region 右斜边按钮1-->
  45. <Style x:Key="Beveledcheck" TargetType="{x:Type CheckBox}">
  46. <Setter Property="FontFamily" Value="楷体" />
  47. <Setter Property="Width" Value="100" />
  48. <Setter Property="Height" Value="30" />
  49. <Setter Property="IsChecked" Value="False" />
  50. <Setter Property="FontSize" Value="13" />
  51. <Setter Property="Foreground" Value="White" />
  52. <Setter Property="Template">
  53. <Setter.Value>
  54. <ControlTemplate TargetType="{x:Type CheckBox}">
  55. <Grid x:Name="gr" SnapsToDevicePixels="True">
  56. <pry:BeveledButton
  57. x:Name="bb"
  58. FillColor="#F14129"
  59. IsParallelogram="False"
  60. StrokeThickness="1" />
  61. <ContentPresenter
  62. x:Name="contentPresenter"
  63. Margin="0,0,10,0"
  64. HorizontalAlignment="Center"
  65. VerticalAlignment="Center"
  66. Content="{TemplateBinding Content}"
  67. ContentStringFormat="{TemplateBinding ContentStringFormat}"
  68. ContentTemplate="{TemplateBinding ContentTemplate}"
  69. Focusable="False"
  70. RecognizesAccessKey="True"
  71. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  72. </Grid>
  73. <ControlTemplate.Triggers>
  74. <Trigger Property="IsChecked" Value="False">
  75. <Setter TargetName="bb" Property="FillColor" Value="#F14129" />
  76. </Trigger>
  77. <Trigger Property="IsChecked" Value="True">
  78. <Setter TargetName="bb" Property="FillColor" Value="#50EB53" />
  79. </Trigger>
  80. </ControlTemplate.Triggers>
  81. </ControlTemplate>
  82. </Setter.Value>
  83. </Setter>
  84. </Style>
  85. <!--#endregion-->
  86. <!--#region 平行四边形按钮-->
  87. <Style x:Key="ParallelogramRadioButtonStyle" TargetType="{x:Type RadioButton}">
  88. <Setter Property="FontFamily" Value="楷体" />
  89. <Setter Property="Width" Value="100" />
  90. <Setter Property="IsChecked" Value="False" />
  91. <Setter Property="FontSize" Value="13" />
  92. <Setter Property="Foreground" Value="#ddd" />
  93. <Setter Property="Template">
  94. <Setter.Value>
  95. <ControlTemplate TargetType="{x:Type RadioButton}">
  96. <Grid SnapsToDevicePixels="True">
  97. <pry:BeveledButton
  98. x:Name="bb"
  99. FillColor="#4B8EC4"
  100. IsParallelogram="True"
  101. StrokeThickness="1" />
  102. <ContentPresenter
  103. x:Name="contentPresenter"
  104. Margin="0,0,10,0"
  105. HorizontalAlignment="Center"
  106. VerticalAlignment="Center"
  107. Content="{TemplateBinding Content}"
  108. ContentStringFormat="{TemplateBinding ContentStringFormat}"
  109. ContentTemplate="{TemplateBinding ContentTemplate}"
  110. Focusable="False"
  111. RecognizesAccessKey="True"
  112. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  113. </Grid>
  114. <ControlTemplate.Triggers>
  115. <Trigger Property="IsChecked" Value="False">
  116. <Setter TargetName="bb" Property="FillColor" Value="#55007acc" />
  117. </Trigger>
  118. </ControlTemplate.Triggers>
  119. </ControlTemplate>
  120. </Setter.Value>
  121. </Setter>
  122. </Style>
  123. <!--#endregion-->
  124. <!--#region 长方形按钮-->
  125. <Style x:Key="RectangleRadioButtonStyle" TargetType="{x:Type RadioButton}">
  126. <Setter Property="FontFamily" Value="楷体" />
  127. <Setter Property="Width" Value="100" />
  128. <Setter Property="IsChecked" Value="False" />
  129. <Setter Property="FontSize" Value="16" />
  130. <Setter Property="Foreground" Value="White" />
  131. <Setter Property="Template">
  132. <Setter.Value>
  133. <ControlTemplate TargetType="{x:Type RadioButton}">
  134. <Grid SnapsToDevicePixels="True">
  135. <Border
  136. x:Name="bb"
  137. BorderBrush="#4B8EC4"
  138. BorderThickness="2,2,2,0" />
  139. <ContentControl
  140. x:Name="contentPresenter"
  141. Margin="10"
  142. HorizontalAlignment="Center"
  143. VerticalAlignment="Center"
  144. Content="{TemplateBinding Content}"
  145. ContentStringFormat="{TemplateBinding ContentStringFormat}"
  146. ContentTemplate="{TemplateBinding ContentTemplate}"
  147. Foreground="{TemplateBinding Foreground}" />
  148. </Grid>
  149. <ControlTemplate.Triggers>
  150. <Trigger Property="IsChecked" Value="True">
  151. <!--<Setter TargetName="bb" Property="Background" Value="#4B8EC4" />-->
  152. <Setter TargetName="bb" Property="Visibility" Value="Visible" />
  153. <Setter TargetName="contentPresenter" Property="Foreground" Value="#ff2AB2E7" />
  154. </Trigger>
  155. <Trigger Property="IsChecked" Value="False">
  156. <Setter TargetName="bb" Property="Visibility" Value="Hidden" />
  157. <Setter TargetName="contentPresenter" Property="Foreground" Value="white" />
  158. <!--<Setter TargetName="bb" Property="Background" Value="Transparent" />-->
  159. </Trigger>
  160. </ControlTemplate.Triggers>
  161. </ControlTemplate>
  162. </Setter.Value>
  163. </Setter>
  164. </Style>
  165. <!--#endregion-->
  166. <!--#region 长方形左侧按钮-->
  167. <Style x:Key="RectangleLeftRadioButtonStyle" TargetType="{x:Type RadioButton}">
  168. <Setter Property="FontFamily" Value="楷体" />
  169. <Setter Property="Width" Value="100" />
  170. <Setter Property="IsChecked" Value="False" />
  171. <Setter Property="FontSize" Value="16" />
  172. <Setter Property="Foreground" Value="#ff2AB2E7" />
  173. <Setter Property="Template">
  174. <Setter.Value>
  175. <ControlTemplate TargetType="{x:Type RadioButton}">
  176. <Grid SnapsToDevicePixels="True">
  177. <Border x:Name="bb">
  178. <Border.Background>
  179. <ImageBrush ImageSource="../Image/leftImageSub.png" />
  180. </Border.Background>
  181. </Border>
  182. <ContentPresenter
  183. x:Name="contentPresenter"
  184. Margin="10"
  185. HorizontalAlignment="Center"
  186. VerticalAlignment="Center"
  187. Content="{TemplateBinding Content}"
  188. ContentStringFormat="{TemplateBinding ContentStringFormat}"
  189. ContentTemplate="{TemplateBinding ContentTemplate}"
  190. Focusable="False"
  191. RecognizesAccessKey="True"
  192. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  193. </Grid>
  194. <ControlTemplate.Triggers>
  195. <Trigger Property="IsChecked" Value="True">
  196. <Setter TargetName="bb" Property="Visibility" Value="Visible" />
  197. <!--<Setter TargetName="bb" Property="Background" Value="#4B8EC4" />-->
  198. </Trigger>
  199. <Trigger Property="IsChecked" Value="False">
  200. <Setter TargetName="bb" Property="Visibility" Value="Hidden" />
  201. <!--<Setter TargetName="bb" Property="Background" Value="Transparent" />-->
  202. </Trigger>
  203. </ControlTemplate.Triggers>
  204. </ControlTemplate>
  205. </Setter.Value>
  206. </Setter>
  207. </Style>
  208. <!--#endregion-->
  209. <!--#region 长方形左侧按钮-->
  210. <Style x:Key="MenuRadioButtonStyle" TargetType="{x:Type RadioButton}">
  211. <Setter Property="FontFamily" Value="楷体" />
  212. <Setter Property="Width" Value="130" />
  213. <Setter Property="IsChecked" Value="False" />
  214. <Setter Property="FontSize" Value="18" />
  215. <Setter Property="Foreground" Value="White" />
  216. <Setter Property="Template">
  217. <Setter.Value>
  218. <ControlTemplate TargetType="{x:Type RadioButton}">
  219. <Grid SnapsToDevicePixels="True">
  220. <Image x:Name="im" />
  221. <ContentPresenter
  222. x:Name="contentPresenter"
  223. Margin="10"
  224. HorizontalAlignment="Center"
  225. VerticalAlignment="Center"
  226. Content="{TemplateBinding Content}"
  227. ContentStringFormat="{TemplateBinding ContentStringFormat}"
  228. ContentTemplate="{TemplateBinding ContentTemplate}"
  229. Focusable="False"
  230. RecognizesAccessKey="True"
  231. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  232. </Grid>
  233. <ControlTemplate.Triggers>
  234. <Trigger Property="IsChecked" Value="True">
  235. <Setter TargetName="im" Property="Source" Value="../Image/窗体样式/Tab/Tab4_Select.png" />
  236. </Trigger>
  237. <Trigger Property="IsChecked" Value="False">
  238. <Setter TargetName="im" Property="Source" Value="../Image/窗体样式/Tab/Tab4_No.png" />
  239. </Trigger>
  240. </ControlTemplate.Triggers>
  241. </ControlTemplate>
  242. </Setter.Value>
  243. </Setter>
  244. </Style>
  245. <!--#endregion-->
  246. </ResourceDictionary>