Button.xaml 36 KB

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