终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

614 rivejä
35 KiB

  1. <Application x:Class="BPASmart.RecipeManagement.App"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:local="clr-namespace:BPASmart.RecipeManagement" xmlns:Themes1="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic"
  5. StartupUri="MainWindow.xaml">
  6. <Application.Resources>
  7. <SolidColorBrush x:Key="menufont" Color="#B7C5DA"/>
  8. <!--#region ScrollViewer -->
  9. <ControlTemplate x:Key="MyScrollViewer" TargetType="{x:Type ScrollViewer}">
  10. <!--View区域背景色-->
  11. <Grid x:Name="Grid" Background="{TemplateBinding Background}">
  12. <Grid.ColumnDefinitions>
  13. <ColumnDefinition Width="*"/>
  14. <ColumnDefinition Width="Auto"/>
  15. </Grid.ColumnDefinitions>
  16. <Grid.RowDefinitions>
  17. <RowDefinition Height="*"/>
  18. <RowDefinition Height="Auto"/>
  19. </Grid.RowDefinitions>
  20. <Rectangle x:Name="Corner" Grid.Column="1" Fill="White" Grid.Row="1"/>
  21. <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" CanContentScroll="{TemplateBinding CanContentScroll}" CanHorizontallyScroll="False" CanVerticallyScroll="False" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Grid.Column="0" Margin="{TemplateBinding Padding}" Grid.Row="0"/>
  22. <ScrollBar x:Name="PART_VerticalScrollBar" AutomationProperties.AutomationId="VerticalScrollBar" Cursor="Arrow" Grid.Column="1" Maximum="{TemplateBinding ScrollableHeight}" Minimum="0" Grid.Row="0" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}" Style="{DynamicResource MyScrollBarStyle}"/>
  23. <ScrollBar x:Name="PART_HorizontalScrollBar" AutomationProperties.AutomationId="HorizontalScrollBar" Cursor="Arrow" Grid.Column="0" Maximum="{TemplateBinding ScrollableWidth}" Minimum="0" Orientation="Horizontal" Grid.Row="1" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportWidth}" Style="{DynamicResource MyScrollBarStyle}"/>
  24. </Grid>
  25. </ControlTemplate>
  26. <SolidColorBrush x:Key="ScrollBarDisabledBackground" Color="#F4F4F4"/>
  27. <Style x:Key="VerticalScrollBarPageButton" TargetType="{x:Type RepeatButton}">
  28. <Setter Property="OverridesDefaultStyle" Value="true"/>
  29. <Setter Property="Background" Value="Transparent"/>
  30. <Setter Property="Focusable" Value="false"/>
  31. <Setter Property="IsTabStop" Value="false"/>
  32. <Setter Property="Template">
  33. <Setter.Value>
  34. <ControlTemplate TargetType="{x:Type RepeatButton}">
  35. <Rectangle Fill="{TemplateBinding Background}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}"/>
  36. </ControlTemplate>
  37. </Setter.Value>
  38. </Setter>
  39. </Style>
  40. <!--#endregion-->
  41. <!--#region Combox-->
  42. <ControlTemplate x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
  43. <Grid Height="25" HorizontalAlignment="Stretch" Background="Transparent">
  44. <Grid.ColumnDefinitions>
  45. <ColumnDefinition Width="*" />
  46. <ColumnDefinition Width="30" />
  47. </Grid.ColumnDefinitions>
  48. <Border
  49. Grid.ColumnSpan="2"
  50. Background="White"
  51. Opacity="0" />
  52. <Path
  53. x:Name="Arrow"
  54. Grid.Column="1"
  55. HorizontalAlignment="Center"
  56. VerticalAlignment="Center"
  57. Data="M 0 0 6 6 12 0 Z"
  58. Fill="#FF2AB2E7"
  59. Stretch="None">
  60. <Path.Effect>
  61. <DropShadowEffect
  62. BlurRadius="10"
  63. Direction="90"
  64. Opacity="1"
  65. RenderingBias="Quality"
  66. ShadowDepth="0"
  67. Color="Transparent" />
  68. </Path.Effect>
  69. </Path>
  70. </Grid>
  71. <ControlTemplate.Triggers>
  72. <Trigger Property="IsChecked" Value="true">
  73. <Setter TargetName="Arrow" Property="RenderTransform">
  74. <Setter.Value>
  75. <RotateTransform Angle="180" CenterX="6" CenterY="3" />
  76. </Setter.Value>
  77. </Setter>
  78. <Setter TargetName="Arrow" Property="Margin" Value="0,0,0,2" />
  79. </Trigger>
  80. </ControlTemplate.Triggers>
  81. </ControlTemplate>
  82. <Style TargetType="{x:Type ComboBox}">
  83. <Setter Property="BorderThickness" Value="1" />
  84. <Setter Property="Background" Value=" #041039"/>
  85. <Setter Property="BorderBrush" Value="#FF2AB2E7"/>
  86. <Setter Property="BorderThickness" Value="1"/>
  87. <Setter Property="ItemContainerStyle">
  88. <Setter.Value>
  89. <Style TargetType="ComboBoxItem">
  90. <Setter Property="Height" Value="25" />
  91. <Setter Property="Template">
  92. <Setter.Value>
  93. <ControlTemplate TargetType="{x:Type ComboBoxItem}">
  94. <Grid Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" >
  95. <Border x:Name="_borderbg" Background=" #041039" BorderBrush="#FF2AB2E7" BorderThickness="0"/>
  96. <ContentPresenter
  97. x:Name="_txt"
  98. Margin="5,0,3,0"
  99. HorizontalAlignment="Left"
  100. VerticalAlignment="Center"
  101. />
  102. <Border
  103. x:Name="_border"
  104. Background="Transparent"
  105. Opacity="0" />
  106. </Grid>
  107. <ControlTemplate.Triggers>
  108. <MultiTrigger>
  109. <MultiTrigger.Conditions>
  110. <Condition Property="IsSelected" Value="false" />
  111. <Condition Property="IsMouseOver" Value="true" />
  112. </MultiTrigger.Conditions>
  113. <Setter TargetName="_borderbg" Property="Background" Value="#37405E" />
  114. <Setter TargetName="_borderbg" Property="BorderBrush" Value="white" />
  115. <Setter TargetName="_borderbg" Property="BorderThickness" Value="1" />
  116. <!--<Setter TargetName="_txt" Property="Foreground" Value="white" />-->
  117. </MultiTrigger>
  118. <MultiTrigger>
  119. <MultiTrigger.Conditions>
  120. <Condition Property="IsSelected" Value="true" />
  121. </MultiTrigger.Conditions>
  122. <Setter TargetName="_borderbg" Property="Background" Value="#022352" />
  123. <Setter TargetName="_borderbg" Property="BorderBrush" Value=" #00BFFF" />
  124. <Setter TargetName="_borderbg" Property="BorderThickness" Value="1" />
  125. <!--<Setter TargetName="_txt" Property="Foreground" Value="white" />-->
  126. </MultiTrigger>
  127. </ControlTemplate.Triggers>
  128. </ControlTemplate>
  129. </Setter.Value>
  130. </Setter>
  131. </Style>
  132. </Setter.Value>
  133. </Setter>
  134. <Setter Property="Template">
  135. <Setter.Value>
  136. <ControlTemplate TargetType="{x:Type ComboBox}">
  137. <Grid>
  138. <Grid.ColumnDefinitions>
  139. <ColumnDefinition Width="0.7*" />
  140. <ColumnDefinition Width="0.3*" MaxWidth="30" />
  141. </Grid.ColumnDefinitions>
  142. <Border
  143. x:Name="_prybr"
  144. Grid.Column="0"
  145. Grid.ColumnSpan="2"
  146. BorderBrush="{TemplateBinding BorderBrush}"
  147. BorderThickness="{TemplateBinding BorderThickness}"
  148. CornerRadius="0" />
  149. <ContentPresenter
  150. x:Name="ContentSite"
  151. Margin="3,3,0,3"
  152. HorizontalAlignment="Center"
  153. VerticalAlignment="Center"
  154. Content="{TemplateBinding SelectionBoxItem}"
  155. ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
  156. ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
  157. IsHitTestVisible="False" />
  158. <!-- ToggleButton 已数据绑定到 ComboBox 本身以切换 IsDropDownOpen -->
  159. <ToggleButton
  160. Background="Transparent"
  161. x:Name="ToggleButton"
  162. Grid.Column="0"
  163. Grid.ColumnSpan="2"
  164. ClickMode="Press"
  165. Focusable="false"
  166. IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
  167. Template="{StaticResource ComboBoxToggleButton}" />
  168. <!-- 必须将 TextBox 命名为 PART_EditableTextBox,否则 ComboBox 将无法识别它 -->
  169. <TextBox
  170. x:Name="PART_EditableTextBox"
  171. Margin="2,0,0,0"
  172. VerticalAlignment="Center"
  173. Background="Transparent"
  174. BorderThickness="0"
  175. CaretBrush="{TemplateBinding Foreground}"
  176. Focusable="True"
  177. Foreground="{TemplateBinding Foreground}"
  178. IsReadOnly="{TemplateBinding IsReadOnly}"
  179. Visibility="Hidden" />
  180. <!-- Popup 可显示 ComboBox 中的项列表。IsOpen 已数据绑定到通过 ComboBoxToggleButton 来切换的 IsDropDownOpen -->
  181. <Popup
  182. x:Name="Popup"
  183. AllowsTransparency="True"
  184. Focusable="False"
  185. IsOpen="{TemplateBinding IsDropDownOpen}"
  186. Placement="Bottom"
  187. PopupAnimation="Slide">
  188. <Grid
  189. x:Name="DropDown"
  190. MinWidth="{TemplateBinding ActualWidth}"
  191. MaxHeight="150"
  192. SnapsToDevicePixels="True">
  193. <Border
  194. x:Name="DropDownBorder"
  195. BorderBrush="Black"
  196. BorderThickness="0" />
  197. <ScrollViewer
  198. Margin="1"
  199. CanContentScroll="True"
  200. HorizontalScrollBarVisibility="Hidden"
  201. SnapsToDevicePixels="True"
  202. VerticalScrollBarVisibility="Auto"
  203. Template="{DynamicResource MyScrollViewer }">
  204. <!-- StackPanel 用于显示子级,方法是将 IsItemsHost 设置为 True -->
  205. <!-- 一下可以设置列表背景色 -->
  206. <StackPanel
  207. Background="{TemplateBinding Background}"
  208. IsItemsHost="True"
  209. KeyboardNavigation.DirectionalNavigation="Contained">
  210. </StackPanel>
  211. </ScrollViewer>
  212. </Grid>
  213. </Popup>
  214. </Grid>
  215. <ControlTemplate.Triggers>
  216. <Trigger Property="IsEditable" Value="true">
  217. <Setter TargetName="PART_EditableTextBox" Property="Visibility" Value="Visible" />
  218. </Trigger>
  219. <Trigger Property="IsMouseOver" Value="True">
  220. <Setter TargetName="_prybr" Property="BorderBrush" Value="#aa3ba7f2" />
  221. </Trigger>
  222. <Trigger Property="IsEnabled" Value="False">
  223. <Setter TargetName="ContentSite" Property="Opacity" Value="0.6" />
  224. </Trigger>
  225. </ControlTemplate.Triggers>
  226. </ControlTemplate>
  227. </Setter.Value>
  228. </Setter>
  229. </Style>
  230. <!--滚动条颜色、圆角等设置-->
  231. <Style x:Key="ScrollBarThumb" TargetType="{x:Type Thumb}">
  232. <Setter Property="OverridesDefaultStyle" Value="true"/>
  233. <Setter Property="IsTabStop" Value="false"/>
  234. <Setter Property="Template">
  235. <Setter.Value>
  236. <ControlTemplate TargetType="{x:Type Thumb}">
  237. <!--滚动条颜色和圆角设置-->
  238. <Rectangle Name="thumbRect" Fill="#03ffea" RadiusX="3" RadiusY="3"/>
  239. <!--鼠标拉动滚动条时的颜色-->
  240. <ControlTemplate.Triggers>
  241. <Trigger Property="IsMouseOver" Value="True">
  242. <Setter Property="Fill" Value="CornflowerBlue" TargetName="thumbRect" />
  243. </Trigger>
  244. </ControlTemplate.Triggers>
  245. </ControlTemplate>
  246. </Setter.Value>
  247. </Setter>
  248. </Style>
  249. <Style x:Key="HorizontalScrollBarPageButton" TargetType="{x:Type RepeatButton}">
  250. <Setter Property="OverridesDefaultStyle" Value="true"/>
  251. <Setter Property="Background" Value="Transparent"/>
  252. <Setter Property="Focusable" Value="false"/>
  253. <Setter Property="IsTabStop" Value="false"/>
  254. <Setter Property="Template">
  255. <Setter.Value>
  256. <ControlTemplate TargetType="{x:Type RepeatButton}">
  257. <Rectangle Fill="{TemplateBinding Background}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}"/>
  258. </ControlTemplate>
  259. </Setter.Value>
  260. </Setter>
  261. </Style>
  262. <Style x:Key="MyScrollBarStyle" TargetType="{x:Type ScrollBar}">
  263. <Setter Property="Background" Value="AliceBlue"/>
  264. <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
  265. <Setter Property="Stylus.IsFlicksEnabled" Value="false"/>
  266. <!--滚动条宽度-->
  267. <Setter Property="Width" Value="8"/>
  268. <Setter Property="MinWidth" Value="6"/>
  269. <Setter Property="Template">
  270. <Setter.Value>
  271. <ControlTemplate TargetType="{x:Type ScrollBar}">
  272. <!--滚动条背景色-->
  273. <Grid x:Name="Bg" Background="#001f55" SnapsToDevicePixels="true" Width="8">
  274. <Grid.RowDefinitions>
  275. <RowDefinition />
  276. </Grid.RowDefinitions>
  277. <Track x:Name="PART_Track" IsDirectionReversed="true" IsEnabled="{TemplateBinding IsMouseOver}">
  278. <Track.DecreaseRepeatButton>
  279. <RepeatButton Command="{x:Static ScrollBar.PageUpCommand}" Style="{StaticResource VerticalScrollBarPageButton}"/>
  280. </Track.DecreaseRepeatButton>
  281. <Track.IncreaseRepeatButton>
  282. <RepeatButton Command="{x:Static ScrollBar.PageDownCommand}" Style="{StaticResource VerticalScrollBarPageButton}"/>
  283. </Track.IncreaseRepeatButton>
  284. <Track.Thumb>
  285. <Thumb Style="{StaticResource ScrollBarThumb}"/>
  286. </Track.Thumb>
  287. </Track>
  288. </Grid>
  289. <ControlTemplate.Triggers>
  290. <Trigger Property="IsEnabled" Value="false">
  291. <Setter Property="Background" TargetName="Bg" Value="{StaticResource ScrollBarDisabledBackground}"/>
  292. </Trigger>
  293. </ControlTemplate.Triggers>
  294. </ControlTemplate>
  295. </Setter.Value>
  296. </Setter>
  297. <Style.Triggers>
  298. <Trigger Property="Orientation" Value="Horizontal">
  299. <Setter Property="Width" Value="Auto"/>
  300. <Setter Property="MinWidth" Value="0"/>
  301. <Setter Property="Height" Value="6"/>
  302. <Setter Property="MinHeight" Value="6"/>
  303. <Setter Property="Background" Value="AliceBlue"/>
  304. <Setter Property="Template">
  305. <Setter.Value>
  306. <ControlTemplate TargetType="{x:Type ScrollBar}">
  307. <Grid x:Name="Bg" Background="Red" SnapsToDevicePixels="true">
  308. <Grid.ColumnDefinitions>
  309. <ColumnDefinition />
  310. </Grid.ColumnDefinitions>
  311. <Track x:Name="PART_Track" IsEnabled="{TemplateBinding IsMouseOver}">
  312. <Track.DecreaseRepeatButton>
  313. <RepeatButton Command="{x:Static ScrollBar.PageLeftCommand}" Style="{StaticResource HorizontalScrollBarPageButton}"/>
  314. </Track.DecreaseRepeatButton>
  315. <Track.IncreaseRepeatButton>
  316. <RepeatButton Command="{x:Static ScrollBar.PageRightCommand}" Style="{StaticResource HorizontalScrollBarPageButton}"/>
  317. </Track.IncreaseRepeatButton>
  318. <Track.Thumb>
  319. <Thumb Style="{StaticResource ScrollBarThumb}" />
  320. </Track.Thumb>
  321. </Track>
  322. </Grid>
  323. <ControlTemplate.Triggers>
  324. <Trigger Property="IsEnabled" Value="false">
  325. <Setter Property="Background" TargetName="Bg" Value="{StaticResource ScrollBarDisabledBackground}"/>
  326. </Trigger>
  327. </ControlTemplate.Triggers>
  328. </ControlTemplate>
  329. </Setter.Value>
  330. </Setter>
  331. </Trigger>
  332. </Style.Triggers>
  333. </Style>
  334. <!--#endregion-->
  335. <!--#region右键菜单-->
  336. <Style TargetType="{x:Type ContextMenu}">
  337. <Setter Property="Template">
  338. <Setter.Value>
  339. <ControlTemplate TargetType="{x:Type ContextMenu}">
  340. <Border x:Name="Border" CornerRadius="4" Background="#1E2D45" BorderThickness="1" Margin="0"
  341. Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
  342. <Border.BorderBrush>
  343. <SolidColorBrush Color="#104E8B" />
  344. </Border.BorderBrush>
  345. <ItemsPresenter/>
  346. </Border>
  347. <ControlTemplate.Triggers>
  348. <MultiTrigger>
  349. <MultiTrigger.Conditions>
  350. <Condition Property="IsMouseOver" Value="True"/>
  351. </MultiTrigger.Conditions>
  352. <MultiTrigger.EnterActions>
  353. <BeginStoryboard>
  354. <Storyboard>
  355. <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(FrameworkElement.Width)">
  356. <SplineDoubleKeyFrame KeyTime="00:00:00.0020000" Value="0"/>
  357. <SplineDoubleKeyFrame KeyTime="00:00:00.20000" Value="130"/>
  358. </DoubleAnimationUsingKeyFrames>
  359. <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(FrameworkElement.Height)">
  360. <SplineDoubleKeyFrame KeyTime="00:00:00.0020000" Value="0"/>
  361. <SplineDoubleKeyFrame KeyTime="00:00:00.20000" Value="100"/>
  362. </DoubleAnimationUsingKeyFrames>
  363. </Storyboard>
  364. </BeginStoryboard>
  365. </MultiTrigger.EnterActions>
  366. </MultiTrigger>
  367. </ControlTemplate.Triggers>
  368. </ControlTemplate>
  369. </Setter.Value>
  370. </Setter>
  371. </Style>
  372. <Style TargetType="{x:Type MenuItem}">
  373. <Setter Property="Template">
  374. <Setter.Value>
  375. <ControlTemplate TargetType="{x:Type MenuItem}">
  376. <Border Margin="0,5,0,0" CornerRadius="5" >
  377. <Border.Background>
  378. <SolidColorBrush x:Name="MyAnimatedBrushBackground" Color="Transparent" />
  379. </Border.Background>
  380. <StackPanel Orientation="Horizontal">
  381. <TextBlock Text=" "/>
  382. <ContentPresenter ContentSource="Icon" HorizontalAlignment="Center" VerticalAlignment="Center" />
  383. <TextBlock Text=" "/>
  384. <ContentPresenter ContentSource="Header" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  385. </StackPanel>
  386. </Border>
  387. <ControlTemplate.Triggers>
  388. <MultiTrigger>
  389. <MultiTrigger.Conditions>
  390. <Condition Property="IsMouseOver" Value="True"/>
  391. </MultiTrigger.Conditions>
  392. <MultiTrigger.EnterActions>
  393. <BeginStoryboard>
  394. <Storyboard>
  395. <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MyAnimatedBrushBackground" Storyboard.TargetProperty="Color">
  396. <LinearColorKeyFrame Value="#1E2D45" KeyTime="00:00:00.0020000" />
  397. <LinearColorKeyFrame Value="#05173B" KeyTime="00:00:00.332" />
  398. </ColorAnimationUsingKeyFrames>
  399. </Storyboard>
  400. </BeginStoryboard>
  401. </MultiTrigger.EnterActions>
  402. <MultiTrigger.ExitActions>
  403. <BeginStoryboard>
  404. <Storyboard>
  405. <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MyAnimatedBrushBackground" Storyboard.TargetProperty="Color">
  406. <LinearColorKeyFrame Value="#05173B" KeyTime="00:00:00.0020000" />
  407. <LinearColorKeyFrame Value="#1E2D45" KeyTime="00:00:00.30000" />
  408. </ColorAnimationUsingKeyFrames>
  409. </Storyboard>
  410. </BeginStoryboard>
  411. </MultiTrigger.ExitActions>
  412. </MultiTrigger>
  413. </ControlTemplate.Triggers>
  414. </ControlTemplate>
  415. </Setter.Value>
  416. </Setter>
  417. </Style>
  418. <!--#endregion-->
  419. <Style x:Key="TextBoxStyle" TargetType="{x:Type TextBox}">
  420. <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
  421. <Setter Property="BorderBrush" Value="#FFABAdB3"/>
  422. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
  423. <Setter Property="BorderThickness" Value="1"/>
  424. <Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
  425. <Setter Property="HorizontalContentAlignment" Value="Left"/>
  426. <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
  427. <Setter Property="AllowDrop" Value="true"/>
  428. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
  429. <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
  430. <Setter Property="Template">
  431. <Setter.Value>
  432. <ControlTemplate TargetType="{x:Type TextBox}">
  433. <Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="True">
  434. <ScrollViewer x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
  435. </Border>
  436. <ControlTemplate.Triggers>
  437. <Trigger Property="IsEnabled" Value="false">
  438. <Setter Property="Opacity" TargetName="border" Value="0.56"/>
  439. </Trigger>
  440. <Trigger Property="IsMouseOver" Value="true">
  441. <Setter Property="BorderBrush" TargetName="border" Value="#FF7EB4EA"/>
  442. </Trigger>
  443. <Trigger Property="IsKeyboardFocused" Value="true">
  444. <Setter Property="BorderBrush" TargetName="border" Value="#FF569DE5"/>
  445. </Trigger>
  446. </ControlTemplate.Triggers>
  447. </ControlTemplate>
  448. </Setter.Value>
  449. </Setter>
  450. <Style.Triggers>
  451. <MultiTrigger>
  452. <MultiTrigger.Conditions>
  453. <Condition Property="IsInactiveSelectionHighlightEnabled" Value="true"/>
  454. <Condition Property="IsSelectionActive" Value="false"/>
  455. </MultiTrigger.Conditions>
  456. <Setter Property="SelectionBrush" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}"/>
  457. </MultiTrigger>
  458. </Style.Triggers>
  459. </Style>
  460. <Style x:Key="ComboBoxEditableTextBox" TargetType="{x:Type TextBox}">
  461. <Setter Property="OverridesDefaultStyle" Value="true" />
  462. <Setter Property="AllowDrop" Value="true" />
  463. <Setter Property="MinWidth" Value="0" />
  464. <Setter Property="Foreground" Value="#a2c2e8" />
  465. <Setter Property="MinHeight" Value="0" />
  466. <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  467. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
  468. <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
  469. <Setter Property="Template">
  470. <Setter.Value>
  471. <ControlTemplate TargetType="{x:Type TextBox}">
  472. <ScrollViewer
  473. x:Name="PART_ContentHost"
  474. Background="Transparent"
  475. Focusable="false"
  476. HorizontalScrollBarVisibility="Hidden"
  477. VerticalScrollBarVisibility="Hidden" />
  478. </ControlTemplate>
  479. </Setter.Value>
  480. </Setter>
  481. </Style>
  482. <Style x:Key="menuText" TargetType="TextBlock">
  483. <Setter Property="FontFamily" Value="pack://application:,,,/Font/#iconfont"/>
  484. <Setter Property="Foreground" Value="{DynamicResource menufont}"/>
  485. <Setter Property="FontSize" Value="16"/>
  486. <Setter Property="Margin" Value="2,0"/>
  487. <Setter Property="VerticalAlignment" Value="Center"/>
  488. <Setter Property="HorizontalAlignment" Value="Center"/>
  489. </Style>
  490. <Style x:Key="CommonTextBox" TargetType="{x:Type TextBox}">
  491. <Setter Property="Foreground" Value="Orange"/>
  492. <Setter Property="Background" Value="Transparent"/>
  493. <Setter Property="BorderBrush" Value="#FF2AB2E7"/>
  494. <Setter Property="VerticalContentAlignment" Value="Center"/>
  495. </Style>
  496. <!--#region Button-->
  497. <Style x:Key="CommonButton" TargetType="{x:Type Button}">
  498. <Setter Property="Background" Value="Transparent"/>
  499. <Setter Property="Foreground" Value="#FF2AB2E7"/>
  500. <Setter Property="BorderBrush" Value="#FF2AB2E7"/>
  501. <Setter Property="FontSize" Value="14"/>
  502. <Setter Property="Template">
  503. <Setter.Value>
  504. <ControlTemplate TargetType="{x:Type Button}">
  505. <Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
  506. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
  507. </Border>
  508. <ControlTemplate.Triggers>
  509. <Trigger Property="IsMouseOver" Value="True">
  510. <Setter TargetName="border" Property="Background" Value="#442AB2E7"/>
  511. </Trigger>
  512. </ControlTemplate.Triggers>
  513. </ControlTemplate>
  514. </Setter.Value>
  515. </Setter>
  516. </Style>
  517. <Style x:Key="ButtonStyle" TargetType="Button">
  518. <Setter Property="Background" Value="#2219b7ec" />
  519. <Setter Property="BorderBrush" Value="#ff19b7ec" />
  520. <Setter Property="BorderThickness" Value="2" />
  521. <Setter Property="Foreground" Value="Aqua"/>
  522. <Setter Property="Template">
  523. <Setter.Value>
  524. <ControlTemplate TargetType="{x:Type Button}">
  525. <Border x:Name="border" BorderBrush="#ff19b7ec" BorderThickness="1">
  526. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
  527. </Border>
  528. <ControlTemplate.Triggers>
  529. <Trigger Property="IsMouseOver" Value="True">
  530. <Setter TargetName="border" Property="Background" Value="#442AB2E7"/>
  531. </Trigger>
  532. </ControlTemplate.Triggers>
  533. </ControlTemplate>
  534. </Setter.Value>
  535. </Setter>
  536. </Style>
  537. <Style x:Key="DeleteButton" TargetType="{x:Type Button}">
  538. <Setter Property="Foreground" Value="#FFF53F62"/>
  539. <Setter Property="Background" Value="#44F53F62"/>
  540. <Setter Property="Opacity" Value="0.9"/>
  541. <Setter Property="BorderBrush" Value="Transparent" />
  542. <Setter Property="BorderThickness" Value="0" />
  543. <Setter Property="Foreground" Value="#FFF53F62"/>
  544. <Setter Property="Template">
  545. <Setter.Value>
  546. <ControlTemplate TargetType="{x:Type Button}">
  547. <Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
  548. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
  549. </Border>
  550. <ControlTemplate.Triggers>
  551. <Trigger Property="IsMouseOver" Value="True">
  552. <Setter TargetName="border" Property="Background" Value="#77F53F62"/>
  553. </Trigger>
  554. </ControlTemplate.Triggers>
  555. </ControlTemplate>
  556. </Setter.Value>
  557. </Setter>
  558. </Style>
  559. <Style x:Key="GreenButton" TargetType="{x:Type Button}">
  560. <Setter Property="Foreground" Value="#ff2bd06f"/>
  561. <Setter Property="Background" Value="#332bd06f"/>
  562. <Setter Property="Opacity" Value="0.9"/>
  563. <Setter Property="BorderBrush" Value="Transparent" />
  564. <Setter Property="BorderThickness" Value="0" />
  565. <Setter Property="Template">
  566. <Setter.Value>
  567. <ControlTemplate TargetType="{x:Type Button}">
  568. <Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}">
  569. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
  570. </Border>
  571. <ControlTemplate.Triggers>
  572. <Trigger Property="IsMouseOver" Value="True">
  573. <Setter TargetName="border" Property="Background" Value="#772bd06f"/>
  574. </Trigger>
  575. </ControlTemplate.Triggers>
  576. </ControlTemplate>
  577. </Setter.Value>
  578. </Setter>
  579. </Style>
  580. <!--#endregion-->
  581. </Application.Resources>
  582. </Application>