Button.xaml 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578
  1. <ResourceDictionary
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:ctrl="http://OpenSEMI.Ctrlib.com/presentation"
  7. mc:Ignorable="d">
  8. <Style x:Key="ButtonFocusVisual">
  9. <Setter Property="Control.Template">
  10. <Setter.Value>
  11. <ControlTemplate>
  12. <Rectangle Margin="2" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
  13. </ControlTemplate>
  14. </Setter.Value>
  15. </Setter>
  16. </Style>
  17. <Style x:Key="Login_Btn" TargetType="{x:Type Button}">
  18. <Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
  19. <Setter Property="Background" Value="{DynamicResource Color_BG_Button}"/>
  20. <Setter Property="BorderBrush" Value="{DynamicResource Color_BD_Button}"/>
  21. <Setter Property="BorderThickness" Value="1"/>
  22. <Setter Property="FontFamily" Value="Arial"/>
  23. <Setter Property="FontSize" Value="17"/>
  24. <Setter Property="FontWeight" Value="Bold"/>
  25. <Setter Property="Foreground" Value="{DynamicResource Color_FG_Button}"/>
  26. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  27. <Setter Property="VerticalContentAlignment" Value="Center"/>
  28. <Setter Property="Padding" Value="1"/>
  29. <Setter Property="Template">
  30. <Setter.Value>
  31. <ControlTemplate TargetType="{x:Type Button}">
  32. <Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="True">
  33. <Grid>
  34. <Border BorderThickness="1" BorderBrush="{DynamicResource Color_BD_Button_InnerGrow}">
  35. <Border.Effect>
  36. <BlurEffect/>
  37. </Border.Effect>
  38. </Border>
  39. <Border x:Name="Highlight" BorderThickness="1" Background="{DynamicResource Color_BG_Button_Highlight}" Opacity="0">
  40. <Border.Effect>
  41. <BlurEffect/>
  42. </Border.Effect>
  43. </Border>
  44. <TextBlock Text="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" VerticalAlignment="Center" HorizontalAlignment="Center">
  45. <TextBlock.Effect>
  46. <DropShadowEffect BlurRadius="3" ShadowDepth="2" Color="#FF008A40"/>
  47. </TextBlock.Effect>
  48. </TextBlock>
  49. </Grid>
  50. </Border>
  51. <ControlTemplate.Triggers>
  52. <Trigger Property="IsMouseOver" Value="true">
  53. <Setter Property="Opacity" TargetName="Highlight" Value="0.5"/>
  54. </Trigger>
  55. <Trigger Property="IsPressed" Value="True">
  56. <Setter Property="Opacity" TargetName="Highlight" Value="0.5"/>
  57. </Trigger>
  58. <Trigger Property="IsEnabled" Value="false">
  59. <Setter Property="Foreground" Value="#ADADAD"/>
  60. </Trigger>
  61. </ControlTemplate.Triggers>
  62. </ControlTemplate>
  63. </Setter.Value>
  64. </Setter>
  65. </Style>
  66. <Style x:Key="SysBtnStyle" TargetType="{x:Type Button}">
  67. <Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
  68. <Setter Property="Background" Value="{DynamicResource Color_BG_LoginButton}"/>
  69. <Setter Property="BorderBrush" Value="{DynamicResource Color_BD_LoginButton}"/>
  70. <Setter Property="BorderThickness" Value="1"/>
  71. <Setter Property="FontFamily" Value="Arial"/>
  72. <Setter Property="FontWeight" Value="Bold"/>
  73. <Setter Property="FontSize" Value="14"/>
  74. <Setter Property="Foreground" Value="{DynamicResource Color_FG_Button_Window}"/>
  75. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  76. <Setter Property="VerticalContentAlignment" Value="Center"/>
  77. <Setter Property="Padding" Value="1"/>
  78. <Setter Property="Template">
  79. <Setter.Value>
  80. <ControlTemplate TargetType="{x:Type Button}">
  81. <Border x:Name="Bd" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true" BorderBrush="{DynamicResource Color_BD_WindowButton}" Cursor="Hand" Background="{DynamicResource Color_BG_WindowButton}">
  82. <Grid>
  83. <Border BorderThickness="1" BorderBrush="{DynamicResource Color_BD_WindowButton_InnerGrow}">
  84. <Border.Effect>
  85. <BlurEffect/>
  86. </Border.Effect>
  87. </Border>
  88. <Border x:Name="Highlight" BorderThickness="1" Background="{DynamicResource Color_BG_WindowButton_Highlight}" Opacity="0">
  89. <Border.Effect>
  90. <BlurEffect/>
  91. </Border.Effect>
  92. </Border>
  93. <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Cursor="Hand">
  94. </ContentPresenter>
  95. </Grid>
  96. </Border>
  97. <ControlTemplate.Triggers>
  98. <Trigger Property="IsKeyboardFocused" Value="true"/>
  99. <Trigger Property="IsMouseOver" Value="true">
  100. <Setter Property="Opacity" TargetName="Highlight" Value="1"/>
  101. </Trigger>
  102. <Trigger Property="IsEnabled" Value="false">
  103. <Setter Property="Foreground" Value="#ADADAD"/>
  104. </Trigger>
  105. </ControlTemplate.Triggers>
  106. </ControlTemplate>
  107. </Setter.Value>
  108. </Setter>
  109. </Style>
  110. <Style x:Key="SysCloseBtnStyle" TargetType="{x:Type Button}">
  111. <Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
  112. <Setter Property="Background" Value="{DynamicResource Color_BG_LoginButton}"/>
  113. <Setter Property="BorderBrush" Value="{DynamicResource Color_BD_LoginButton}"/>
  114. <Setter Property="BorderThickness" Value="1"/>
  115. <Setter Property="FontFamily" Value="Arial"/>
  116. <Setter Property="FontWeight" Value="Bold"/>
  117. <Setter Property="FontSize" Value="14"/>
  118. <Setter Property="Foreground" Value="{DynamicResource Color_FG_Button_Window}"/>
  119. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  120. <Setter Property="VerticalContentAlignment" Value="Center"/>
  121. <Setter Property="Padding" Value="1"/>
  122. <Setter Property="Template">
  123. <Setter.Value>
  124. <ControlTemplate TargetType="{x:Type Button}">
  125. <Border x:Name="Bd" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true" BorderBrush="{DynamicResource Color_BD_WindowButton}" Cursor="Hand" Background="{DynamicResource Color_BG_WindowButton}">
  126. <Grid>
  127. <Border BorderThickness="1" BorderBrush="{DynamicResource Color_BD_WindowButton_InnerGrow}">
  128. <Border.Effect>
  129. <BlurEffect/>
  130. </Border.Effect>
  131. </Border>
  132. <Border x:Name="Highlight" BorderThickness="1" Background="{DynamicResource Color_BG_WindowButton_Highlight}" Opacity="0">
  133. <Border.Effect>
  134. <BlurEffect/>
  135. </Border.Effect>
  136. </Border>
  137. <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Cursor="Hand">
  138. </ContentPresenter>
  139. </Grid>
  140. </Border>
  141. <ControlTemplate.Triggers>
  142. <Trigger Property="IsKeyboardFocused" Value="true"/>
  143. <Trigger Property="IsMouseOver" Value="true">
  144. <Setter Property="Opacity" TargetName="Highlight" Value="1"/>
  145. </Trigger>
  146. <Trigger Property="IsEnabled" Value="false">
  147. <Setter Property="Foreground" Value="#ADADAD"/>
  148. </Trigger>
  149. </ControlTemplate.Triggers>
  150. </ControlTemplate>
  151. </Setter.Value>
  152. </Setter>
  153. </Style>
  154. <RadialGradientBrush x:Key="highLight">
  155. <GradientStop Color="#FF64D7FF" Offset="1"></GradientStop>
  156. <GradientStop Color="White" Offset="0.2"></GradientStop>
  157. </RadialGradientBrush>
  158. <SolidColorBrush x:Key="OnOffButton_BD" Color="#FF004900"/>
  159. <RadialGradientBrush x:Key="OnOffButton_BG">
  160. <GradientStop Color="#FF003F0F" Offset="0.25"/>
  161. <GradientStop Color="#FF067421" Offset="1"/>
  162. </RadialGradientBrush>
  163. <RadialGradientBrush x:Key="OnOffButton_BG_Highlight">
  164. <GradientStop Color="#FF89FFA6" Offset="0"/>
  165. <GradientStop Color="#FF00FF3F" Offset="1"/>
  166. </RadialGradientBrush>
  167. <RadialGradientBrush x:Key="OnOffButton_BG_Unable">
  168. <GradientStop Color="#FF939393" Offset="0"/>
  169. <GradientStop Color="#FFCACACA" Offset="1"/>
  170. </RadialGradientBrush>
  171. <Style x:Key="Lamp-Button" TargetType="{x:Type ctrl:SwitchButton}">
  172. <Setter Property="Width" Value="16"/>
  173. <Setter Property="Height" Value="16"/>
  174. <Setter Property="Template">
  175. <Setter.Value>
  176. <ControlTemplate TargetType="{x:Type ctrl:SwitchButton}">
  177. <Grid>
  178. <Ellipse x:Name="BG" Stroke="{DynamicResource OnOffButton_BD}" StrokeThickness="1" Fill="{DynamicResource OnOffButton_BG}"/>
  179. <Ellipse x:Name="Highlight" Margin="1" Visibility="Collapsed" Fill="{DynamicResource OnOffButton_BG_Highlight}">
  180. <Ellipse.Effect>
  181. <BlurEffect Radius="5"/>
  182. </Ellipse.Effect>
  183. </Ellipse>
  184. <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" RecognizesAccessKey="True" Content=""/>
  185. </Grid>
  186. <ControlTemplate.Triggers>
  187. <Trigger Property="ON" Value="True">
  188. <Setter Property="Visibility" TargetName="Highlight" Value="Visible"/>
  189. </Trigger>
  190. <Trigger Property="ON" Value="False">
  191. <Setter Property="Visibility" TargetName="Highlight" Value="Collapsed"/>
  192. </Trigger>
  193. <Trigger Property="IsDefaulted" Value="True"/>
  194. <Trigger Property="IsEnabled" Value="False">
  195. <Setter Property="Fill" TargetName="BG" Value="{DynamicResource OnOffButton_BG_Unable}"/>
  196. </Trigger>
  197. </ControlTemplate.Triggers>
  198. </ControlTemplate>
  199. </Setter.Value>
  200. </Setter>
  201. </Style>
  202. <Style x:Key="Lamp-Button2" TargetType="{x:Type ctrl:SwitchButton}">
  203. <Setter Property="Width" Value="16"/>
  204. <Setter Property="Height" Value="16"/>
  205. <Setter Property="Template">
  206. <Setter.Value>
  207. <ControlTemplate TargetType="{x:Type ctrl:SwitchButton}">
  208. <Grid>
  209. <Ellipse x:Name="BG" Fill="{DynamicResource OnOffButton_BG}"/>
  210. <Ellipse x:Name="Highlight" Margin="1" Visibility="Collapsed" Fill="{DynamicResource OnOffButton_BG_Highlight}">
  211. <Ellipse.Effect>
  212. <BlurEffect Radius="5"/>
  213. </Ellipse.Effect>
  214. </Ellipse>
  215. <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" RecognizesAccessKey="True" Content=""/>
  216. </Grid>
  217. <ControlTemplate.Triggers>
  218. <Trigger Property="ON" Value="True">
  219. <Setter Property="Visibility" TargetName="Highlight" Value="Visible"/>
  220. </Trigger>
  221. <Trigger Property="ON" Value="False">
  222. <Setter Property="Visibility" TargetName="Highlight" Value="Collapsed"/>
  223. </Trigger>
  224. <Trigger Property="IsDefaulted" Value="True"/>
  225. <Trigger Property="IsEnabled" Value="False">
  226. <Setter Property="Fill" TargetName="BG" Value="{DynamicResource OnOffButton_BG_Unable}"/>
  227. </Trigger>
  228. </ControlTemplate.Triggers>
  229. </ControlTemplate>
  230. </Setter.Value>
  231. </Setter>
  232. </Style>
  233. <LinearGradientBrush x:Key="OperatioNButton_BG_Outer" EndPoint="0.238,0.239" StartPoint="0.85,0.864">
  234. <GradientStop Color="#FF3D3D3D" Offset="0"/>
  235. <GradientStop Color="White" Offset="1"/>
  236. </LinearGradientBrush>
  237. <SolidColorBrush x:Key="OperatioNButton_BD_Outer" Color="#FF545454"/>
  238. <LinearGradientBrush x:Key="OperatioNButton_BD_Inner" EndPoint="1.141,1.123" StartPoint="0.155,0.138">
  239. <GradientStop Color="Black" Offset="0"/>
  240. <GradientStop Color="White" Offset="1"/>
  241. </LinearGradientBrush>
  242. <RadialGradientBrush x:Key="OperatioNButton_BG" GradientOrigin="0.234,0.241">
  243. <GradientStop Color="#FF304E7E" Offset="0"/>
  244. <GradientStop Color="#FF110A6C" Offset="1"/>
  245. </RadialGradientBrush>
  246. <RadialGradientBrush x:Key="OperatioNButton_BG_Highlight" GradientOrigin="0.234,0.241">
  247. <GradientStop Color="#FFECEAFF" Offset="0"/>
  248. <GradientStop Color="#FF5B6EDA" Offset="1"/>
  249. </RadialGradientBrush>
  250. <LinearGradientBrush x:Key="OperatioNButton_BG_Outer_Unable" EndPoint="0.104,0.195" StartPoint="1.192,1.066">
  251. <GradientStop Color="Black" Offset="0"/>
  252. <GradientStop Color="#FFD0D0D0" Offset="1"/>
  253. </LinearGradientBrush>
  254. <SolidColorBrush x:Key="OperatioNButton_BD_Outer_Unable" Color="#FF939393"/>
  255. <LinearGradientBrush x:Key="OperatioNButton_BD_Inner_Unable" EndPoint="1.141,1.123" StartPoint="0.155,0.138">
  256. <GradientStop Color="Black" Offset="0"/>
  257. <GradientStop Color="#FFD0D0D0" Offset="1"/>
  258. </LinearGradientBrush>
  259. <RadialGradientBrush x:Key="OperatioNButton_BG_Unable" GradientOrigin="0.234,0.241">
  260. <GradientStop Color="#FF858585" Offset="0"/>
  261. <GradientStop Color="#FF4E4E4E" Offset="1"/>
  262. </RadialGradientBrush>
  263. <Style x:Key="OperationButton" TargetType="{x:Type ctrl:SwitchButton}">
  264. <Setter Property="Width" Value="18"/>
  265. <Setter Property="Height" Value="18"/>
  266. <Setter Property="Template">
  267. <Setter.Value>
  268. <ControlTemplate TargetType="{x:Type ctrl:SwitchButton}">
  269. <Grid>
  270. <Ellipse x:Name="BG" Fill="{DynamicResource OperatioNButton_BG_Outer}" Stroke="{DynamicResource OperatioNButton_BD_Outer}" StrokeThickness="0.5"/>
  271. <Ellipse x:Name="Inner_BG" Margin="2" Fill="{DynamicResource OperatioNButton_BD_Inner}"/>
  272. <Ellipse x:Name="Close" Margin="3" Cursor="Hand" Fill="{DynamicResource OperatioNButton_BG}" />
  273. <Ellipse x:Name="Open" Margin="3" Cursor="Hand" Visibility="Collapsed" Fill="{DynamicResource OperatioNButton_BG_Highlight}" >
  274. <Ellipse.Effect>
  275. <DropShadowEffect ShadowDepth="0" Color="White" BlurRadius="3"/>
  276. </Ellipse.Effect>
  277. </Ellipse>
  278. <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" RecognizesAccessKey="True" Content=""/>
  279. </Grid>
  280. <ControlTemplate.Triggers>
  281. <Trigger Property="ON" Value="True">
  282. <Setter Property="Visibility" TargetName="Open" Value="Visible"/>
  283. </Trigger>
  284. <Trigger Property="ON" Value="False">
  285. <Setter Property="Visibility" TargetName="Open" Value="Collapsed"/>
  286. </Trigger>
  287. <Trigger Property="IsDefaulted" Value="True"/>
  288. <Trigger Property="IsEnabled" Value="False">
  289. <Setter Property="Fill" TargetName="BG" Value="{DynamicResource OperatioNButton_BG_Outer_Unable}"/>
  290. <Setter Property="Stroke" TargetName="BG" Value="{DynamicResource OperatioNButton_BD_Outer_Unable}"/>
  291. <Setter Property="Fill" TargetName="Inner_BG" Value="{DynamicResource OperatioNButton_BD_Inner_Unable}"/>
  292. <Setter Property="Fill" TargetName="Close" Value="{DynamicResource OperatioNButton_BG_Unable}"/>
  293. </Trigger>
  294. </ControlTemplate.Triggers>
  295. </ControlTemplate>
  296. </Setter.Value>
  297. </Setter>
  298. </Style>
  299. <!-- Normal Button style -->
  300. <SolidColorBrush x:Key="Button_BG" Color="#FF376091"/>
  301. <SolidColorBrush x:Key="Button_BD" Color="#FF84B1E5"/>
  302. <SolidColorBrush x:Key="Button_BD_Shadow" Color="#FF004170"/>
  303. <SolidColorBrush x:Key="Button_BD_Shadow_Unable" Color="#FF6C6C6C"/>
  304. <SolidColorBrush x:Key="Button_InnerBG" Color="#FF217BBC"/>
  305. <SolidColorBrush x:Key="Button_BG_MouseOver" Color="#FF6394D0"/>
  306. <LinearGradientBrush x:Key="Button_InnerBG_MouseOver" EndPoint="0.5,1" StartPoint="0.5,0">
  307. <GradientStop Color="#FFD1E7ED" Offset="0"/>
  308. <GradientStop Color="#FF43BFE9" Offset="1"/>
  309. </LinearGradientBrush>
  310. <SolidColorBrush x:Key="Button_BG_Press" Color="#FFD8E7F5"/>
  311. <LinearGradientBrush x:Key="Button_InnerBG_Press" EndPoint="0.5,1" StartPoint="0.5,0">
  312. <GradientStop Color="#FFD8E7F5" Offset="0"/>
  313. <GradientStop Color="#FFA3C7E9" Offset="1"/>
  314. </LinearGradientBrush>
  315. <SolidColorBrush x:Key="Button_BG_Unable" Color="#FFD2D2D2"/>
  316. <SolidColorBrush x:Key="Button_BD_Unable" Color="#FFE5E5E5"/>
  317. <LinearGradientBrush x:Key="Button_InnerBG_Unable" EndPoint="0.5,1" StartPoint="0.5,0">
  318. <GradientStop Color="#FFD2D2D2" Offset="0"/>
  319. <GradientStop Color="#FFB2B2B2" Offset="1"/>
  320. </LinearGradientBrush>
  321. <Style TargetType="{x:Type Button}">
  322. <Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
  323. <Setter Property="Background" Value="{DynamicResource Button_BG}"/>
  324. <Setter Property="BorderBrush" Value="{DynamicResource Button_BD}"/>
  325. <Setter Property="BorderThickness" Value="2,2,0,0"/>
  326. <Setter Property="FontFamily" Value="Arial"/>
  327. <Setter Property="FontSize" Value="13"/>
  328. <Setter Property="Foreground" Value="{DynamicResource FG_White}"/>
  329. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  330. <Setter Property="VerticalContentAlignment" Value="Center"/>
  331. <Setter Property="Padding" Value="1"/>
  332. <Setter Property="SnapsToDevicePixels" Value="True"/>
  333. <Setter Property="Border.CornerRadius" Value="5"/>
  334. <Setter Property="Template">
  335. <Setter.Value>
  336. <ControlTemplate TargetType="{x:Type Button}">
  337. <Border x:Name="BG" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" CornerRadius="{TemplateBinding Border.CornerRadius}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" Cursor="Hand">
  338. <Border x:Name="InnerBD" BorderBrush="{DynamicResource Button_BD_Shadow}" CornerRadius="5" BorderThickness="0,0,2,2">
  339. <ContentPresenter x:Name="contentpresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Cursor="Hand">
  340. </ContentPresenter>
  341. </Border>
  342. </Border>
  343. <ControlTemplate.Triggers>
  344. <Trigger Property="IsMouseOver" Value="True">
  345. <Setter TargetName="BG" Property="Background" Value="{DynamicResource Button_BG_MouseOver}"/>
  346. </Trigger>
  347. <Trigger Property="IsPressed" Value="True">
  348. <Setter TargetName="BG" Property="Background" Value="{DynamicResource Button_BG_Press}"/>
  349. </Trigger>
  350. <Trigger Property="IsEnabled" Value="False">
  351. <Setter TargetName="BG" Property="Background" Value="{DynamicResource Button_BG_Unable}"/>
  352. <Setter TargetName="BG" Property="BorderBrush" Value="{DynamicResource Button_BD_Unable}"/>
  353. <Setter TargetName="InnerBD" Property="BorderBrush" Value="{DynamicResource Button_BD_Shadow_Unable}"/>
  354. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
  355. </Trigger>
  356. </ControlTemplate.Triggers>
  357. </ControlTemplate>
  358. </Setter.Value>
  359. </Setter>
  360. </Style>
  361. <Style x:Key="OverviewRadioButton" TargetType="{x:Type RadioButton}">
  362. <Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
  363. <Setter Property="Background" Value="{DynamicResource Button_BG}"/>
  364. <Setter Property="BorderBrush" Value="{DynamicResource Button_BD}"/>
  365. <Setter Property="BorderThickness" Value="2,2,0,0"/>
  366. <Setter Property="FontFamily" Value="Arial"/>
  367. <Setter Property="FontSize" Value="13"/>
  368. <Setter Property="Foreground" Value="{DynamicResource FG_White}"/>
  369. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  370. <Setter Property="VerticalContentAlignment" Value="Center"/>
  371. <Setter Property="Padding" Value="1"/>
  372. <Setter Property="SnapsToDevicePixels" Value="True"/>
  373. <Setter Property="Border.CornerRadius" Value="5"/>
  374. <Setter Property="Template">
  375. <Setter.Value>
  376. <ControlTemplate TargetType="{x:Type RadioButton}">
  377. <Grid Width="{TemplateBinding Width}" Cursor="Hand">
  378. <Grid.ColumnDefinitions>
  379. <ColumnDefinition Width="15"/>
  380. <ColumnDefinition/>
  381. </Grid.ColumnDefinitions>
  382. <Ellipse x:Name="radioImage" Fill="White" Stroke="{TemplateBinding Background}" Width="15" Height="15" HorizontalAlignment="Center" VerticalAlignment="Center" />
  383. <Border Grid.Column="1" x:Name="BG" Margin="2,0,0,0" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
  384. CornerRadius="{TemplateBinding Border.CornerRadius}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" >
  385. <Border x:Name="InnerBD" BorderBrush="{DynamicResource Button_BD_Shadow}" CornerRadius="5" BorderThickness="0,0,2,2">
  386. <ContentPresenter x:Name="contentpresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}"
  387. RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
  388. </Border>
  389. </Border>
  390. </Grid>
  391. <ControlTemplate.Triggers>
  392. <Trigger Property="IsChecked" Value="true">
  393. <Setter TargetName="radioImage" Property="Fill" Value="{DynamicResource Button_BG}"/>
  394. </Trigger>
  395. <Trigger Property="IsMouseOver" Value="True">
  396. <Setter TargetName="BG" Property="Background" Value="{DynamicResource Button_BG_MouseOver}"/>
  397. </Trigger>
  398. <Trigger Property="IsPressed" Value="True">
  399. <Setter TargetName="BG" Property="Background" Value="{DynamicResource Button_BG_Press}"/>
  400. </Trigger>
  401. <Trigger Property="IsEnabled" Value="False">
  402. <Setter TargetName="BG" Property="Background" Value="{DynamicResource Button_BG_Unable}"/>
  403. <Setter TargetName="BG" Property="BorderBrush" Value="{DynamicResource Button_BD_Unable}"/>
  404. <Setter TargetName="InnerBD" Property="BorderBrush" Value="{DynamicResource Button_BD_Shadow_Unable}"/>
  405. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
  406. </Trigger>
  407. </ControlTemplate.Triggers>
  408. </ControlTemplate>
  409. </Setter.Value>
  410. </Setter>
  411. </Style>
  412. <!-- Logout Button -->
  413. <LinearGradientBrush x:Key="LogoutBtn_InnerBG_MouseOver" EndPoint="0.5,1" StartPoint="0.5,0">
  414. <GradientStop Color="#FF75D5ED" Offset="0"/>
  415. <GradientStop Color="#FF03B5E2" Offset="1"/>
  416. <GradientStop Color="#FF45C8E9" Offset="0.49"/>
  417. <GradientStop Color="#FF00A0C8" Offset="0.5"/>
  418. </LinearGradientBrush>
  419. <SolidColorBrush x:Key="LogoutBtn_BG_MouseOver" Color="#FF005C8D"/>
  420. <SolidColorBrush x:Key="LogoutBtn_BD" Color="#FF9FBADE"/>
  421. <LinearGradientBrush x:Key="LogoutBtn_InnerBG_Press" EndPoint="0.5,1" StartPoint="0.5,0">
  422. <GradientStop Color="#FFBCE5EF" Offset="0"/>
  423. <GradientStop Color="#FF02C5F5" Offset="1"/>
  424. <GradientStop Color="#FF73D5ED" Offset="0.49"/>
  425. <GradientStop Color="#FF02C5F5" Offset="0.5"/>
  426. </LinearGradientBrush>
  427. <SolidColorBrush x:Key="LogoutBtn_BG_Press" Color="#FF02A6D0"/>
  428. <LinearGradientBrush x:Key="LogoutBtn_InnerBG" EndPoint="0.5,1" StartPoint="0.5,0">
  429. <GradientStop Color="#FF7EA5CD" Offset="0"/>
  430. <GradientStop Color="#FF305F9D" Offset="1"/>
  431. <GradientStop Color="#FF4D83B8" Offset="0.495"/>
  432. <GradientStop Color="#FF27549D" Offset="0.5"/>
  433. </LinearGradientBrush>
  434. <SolidColorBrush x:Key="LogoutBtn_BG" Color="#FF2C4566"/>
  435. <SolidColorBrush x:Key="LogoutBtn_Shadow" Color="#FF0C1F39"/>
  436. <Style x:Key="Logout_Button" TargetType="{x:Type Button}">
  437. <Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
  438. <Setter Property="Background" Value="{StaticResource LogoutBtn_BG}"/>
  439. <Setter Property="BorderBrush" Value="{StaticResource LogoutBtn_BD}"/>
  440. <Setter Property="BorderThickness" Value="2,2,0,0"/>
  441. <Setter Property="FontFamily" Value="Arial"/>
  442. <Setter Property="FontWeight" Value="Bold"/>
  443. <Setter Property="FontSize" Value="18"/>
  444. <Setter Property="Foreground" Value="{DynamicResource FG_Black}"/>
  445. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  446. <Setter Property="VerticalContentAlignment" Value="Center"/>
  447. <Setter Property="Padding" Value="1"/>
  448. <Setter Property="SnapsToDevicePixels" Value="True"/>
  449. <Setter Property="Border.CornerRadius" Value="4"/>
  450. <Setter Property="Template">
  451. <Setter.Value>
  452. <ControlTemplate TargetType="{x:Type Button}">
  453. <Border x:Name="BG" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" CornerRadius="{TemplateBinding Border.CornerRadius}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" Cursor="Hand">
  454. <Border x:Name="InnerBG" BorderBrush="{StaticResource LogoutBtn_Shadow}" BorderThickness="0,0,2,2" CornerRadius="{TemplateBinding Border.CornerRadius}">
  455. <Grid>
  456. <Rectangle x:Name="Inner_BG" Margin="3" RadiusX="1" RadiusY="1" Fill="{DynamicResource LogoutBtn_InnerBG}">
  457. <Rectangle.Effect>
  458. <BlurEffect Radius="8"/>
  459. </Rectangle.Effect>
  460. </Rectangle>
  461. <Rectangle x:Name="Highlight" Fill="White" Height="5" Margin="10,3,10,0" RadiusY="4" RadiusX="4" VerticalAlignment="Top" Opacity="0.8">
  462. <Rectangle.Effect>
  463. <BlurEffect Radius="3"/>
  464. </Rectangle.Effect>
  465. </Rectangle>
  466. <ContentPresenter x:Name="contentpresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Cursor="Hand">
  467. <ContentPresenter.Effect>
  468. <DropShadowEffect BlurRadius="0" Color="White" ShadowDepth="1" Direction="135"/>
  469. </ContentPresenter.Effect>
  470. </ContentPresenter>
  471. </Grid>
  472. </Border>
  473. </Border>
  474. <ControlTemplate.Triggers>
  475. <Trigger Property="IsMouseOver" Value="True">
  476. <Setter TargetName="BG" Property="Background" Value="{StaticResource LogoutBtn_BG_MouseOver}"/>
  477. <Setter TargetName="Inner_BG" Property="Fill" Value="{StaticResource LogoutBtn_InnerBG_MouseOver}"/>
  478. </Trigger>
  479. <Trigger Property="IsPressed" Value="True">
  480. <Setter TargetName="BG" Property="Background" Value="{StaticResource LogoutBtn_BG_Press}"/>
  481. <Setter TargetName="Inner_BG" Property="Fill" Value="{StaticResource LogoutBtn_InnerBG_Press}"/>
  482. </Trigger>
  483. <Trigger Property="IsEnabled" Value="False">
  484. <Setter TargetName="BG" Property="Background" Value="{StaticResource Button_BG_Unable}"/>
  485. <Setter TargetName="BG" Property="BorderBrush" Value="{StaticResource Button_BD_Unable}"/>
  486. <Setter TargetName="InnerBG" Property="BorderBrush" Value="{StaticResource Button_BD_Unable}"/>
  487. <Setter TargetName="Inner_BG" Property="Fill" Value="{StaticResource Button_InnerBG_Unable}"/>
  488. <Setter Property="Opacity" TargetName="Highlight" Value="0"/>
  489. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
  490. <Setter Property="Effect" TargetName="contentpresenter">
  491. <Setter.Value>
  492. <DropShadowEffect BlurRadius="0" Color="White" Direction="135" Opacity="0" ShadowDepth="1"/>
  493. </Setter.Value>
  494. </Setter>
  495. </Trigger>
  496. </ControlTemplate.Triggers>
  497. </ControlTemplate>
  498. </Setter.Value>
  499. </Setter>
  500. </Style>
  501. <!-- Login Button -->
  502. <SolidColorBrush x:Key="Login_Btn_BD_Highlight" Color="#FF84ADEB"/>
  503. <SolidColorBrush x:Key="Login_Btn_BD_Shadow" Color="#FF1E385B"/>
  504. <SolidColorBrush x:Key="Login_Btn_BG" Color="#FF005895"/>
  505. <SolidColorBrush x:Key="Login_Btn_BD_MouseOver_Highlight" Color="#FFA1E7FF"/>
  506. <SolidColorBrush x:Key="Login_Btn_BG_MouseOver" Color="DeepSkyBlue"/>
  507. <SolidColorBrush x:Key="Login_Btn_BD_MouseOver_Shadow" Color="#FF005B7A"/>
  508. <SolidColorBrush x:Key="Login_Btn_BG_Press" Color="#FF85E0FF"/>
  509. <Style x:Key="Login_Button" TargetType="{x:Type Button}">
  510. <Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
  511. <Setter Property="BorderThickness" Value="1"/>
  512. <Setter Property="FontFamily" Value="Arial"/>
  513. <Setter Property="FontSize" Value="24"/>
  514. <Setter Property="FontWeight" Value="Bold"/>
  515. <Setter Property="Foreground" Value="{DynamicResource FG_White}"/>
  516. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  517. <Setter Property="VerticalContentAlignment" Value="Center"/>
  518. <Setter Property="Padding" Value="1"/>
  519. <Setter Property="SnapsToDevicePixels" Value="True"/>
  520. <Setter Property="Border.CornerRadius" Value="5"/>
  521. <Setter Property="Template">
  522. <Setter.Value>
  523. <ControlTemplate TargetType="{x:Type Button}">
  524. <Border x:Name="BG" BorderThickness="2,2,0,0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" CornerRadius="{TemplateBinding Border.CornerRadius}" BorderBrush="{StaticResource Login_Btn_BD_Highlight}" Background="{StaticResource Login_Btn_BG}" Cursor="Hand">
  525. <Border x:Name="Inner_BD" BorderThickness="0,0,2,2" CornerRadius="{TemplateBinding Border.CornerRadius}" BorderBrush="{StaticResource Login_Btn_BD_Shadow}">
  526. <ContentPresenter x:Name="contentpresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Cursor="Hand">
  527. <ContentPresenter.Effect>
  528. <DropShadowEffect BlurRadius="0" ShadowDepth="1.5" Direction="315"/>
  529. </ContentPresenter.Effect>
  530. </ContentPresenter>
  531. </Border>
  532. </Border>
  533. <ControlTemplate.Triggers>
  534. <Trigger Property="IsMouseOver" Value="True">
  535. <Setter TargetName="BG" Property="Background" Value="{StaticResource Login_Btn_BG_MouseOver}"/>
  536. <Setter TargetName="BG" Property="BorderBrush" Value="{StaticResource Login_Btn_BD_MouseOver_Highlight}"/>
  537. <Setter TargetName="Inner_BD" Property="BorderBrush" Value="{StaticResource Login_Btn_BD_MouseOver_Shadow}"/>
  538. </Trigger>
  539. <Trigger Property="IsPressed" Value="True">
  540. <Setter TargetName="BG" Property="Background" Value="{StaticResource Login_Btn_BG_Press}"/>
  541. </Trigger>
  542. <Trigger Property="IsEnabled" Value="False">
  543. <Setter TargetName="BG" Property="Background" Value="{StaticResource Button_BG_Unable}"/>
  544. <Setter TargetName="BG" Property="BorderBrush" Value="{StaticResource Button_BD_Unable}"/>
  545. <Setter TargetName="Inner_BD" Property="BorderBrush" Value="{StaticResource Button_BD_Shadow_Unable}"/>
  546. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
  547. <Setter Property="Effect" TargetName="contentpresenter">
  548. <Setter.Value>
  549. <DropShadowEffect BlurRadius="0" Color="White" Direction="315" Opacity="0" ShadowDepth="1"/>
  550. </Setter.Value>
  551. </Setter>
  552. </Trigger>
  553. </ControlTemplate.Triggers>
  554. </ControlTemplate>
  555. </Setter.Value>
  556. </Setter>
  557. </Style>
  558. </ResourceDictionary>