PageRenderTime 57ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/V4/StockTrader RI/Desktop/StockTraderRI/Resources/Styles.xaml

#
XAML | 1240 lines | 1133 code | 84 blank | 23 comment | 0 complexity | 5d25584c8d8cd3720f7d988a893a6494 MD5 | raw file
  1. <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  3. <!-- Focus Visual -->
  4. <Style x:Key="ButtonFocusVisual">
  5. <Setter Property="Control.Template">
  6. <Setter.Value>
  7. <ControlTemplate>
  8. <Border>
  9. <Rectangle Margin="2" StrokeThickness="1" Stroke="#60000000" StrokeDashArray="1 2"/>
  10. </Border>
  11. </ControlTemplate>
  12. </Setter.Value>
  13. </Setter>
  14. </Style>
  15. <!-- Fill Brushes -->
  16. <LinearGradientBrush x:Key="NormalBrush" StartPoint="0,0" EndPoint="0,1">
  17. <GradientBrush.GradientStops>
  18. <GradientStopCollection>
  19. <GradientStop Color="#FFF" Offset="0.0"/>
  20. <GradientStop Color="#CCC" Offset="1.0"/>
  21. </GradientStopCollection>
  22. </GradientBrush.GradientStops>
  23. </LinearGradientBrush>
  24. <LinearGradientBrush x:Key="headerBarBG" EndPoint="0.5,1" StartPoint="0.5,0">
  25. <GradientStop Color="#FF284292"/>
  26. <GradientStop Color="#FF2175B8" Offset="0.26499998569488525"/>
  27. </LinearGradientBrush>
  28. <LinearGradientBrush x:Key="sideBarHeaderBarBG" EndPoint="0.5,1" StartPoint="0.5,0">
  29. <GradientStop Color="#FF4A5470"/>
  30. <GradientStop Color="#FF576F82" Offset="0.25"/>
  31. </LinearGradientBrush>
  32. <LinearGradientBrush x:Key="HorizontalNormalBrush" StartPoint="0,0" EndPoint="1,0">
  33. <GradientBrush.GradientStops>
  34. <GradientStopCollection>
  35. <GradientStop Color="#FFF" Offset="0.0"/>
  36. <GradientStop Color="#CCC" Offset="1.0"/>
  37. </GradientStopCollection>
  38. </GradientBrush.GradientStops>
  39. </LinearGradientBrush>
  40. <LinearGradientBrush x:Key="LightBrush" StartPoint="0,0" EndPoint="0,1">
  41. <GradientBrush.GradientStops>
  42. <GradientStopCollection>
  43. <GradientStop Color="#FFF" Offset="0.0"/>
  44. <GradientStop Color="#444" Offset="1.0"/>
  45. </GradientStopCollection>
  46. </GradientBrush.GradientStops>
  47. </LinearGradientBrush>
  48. <LinearGradientBrush x:Key="HorizontalLightBrush" StartPoint="0,0" EndPoint="1,0">
  49. <GradientBrush.GradientStops>
  50. <GradientStopCollection>
  51. <GradientStop Color="#FFF" Offset="0.0"/>
  52. <GradientStop Color="#EEE" Offset="1.0"/>
  53. </GradientStopCollection>
  54. </GradientBrush.GradientStops>
  55. </LinearGradientBrush>
  56. <LinearGradientBrush x:Key="DarkBrush" StartPoint="0,0" EndPoint="0,1">
  57. <GradientBrush.GradientStops>
  58. <GradientStopCollection>
  59. <GradientStop Color="#FFF" Offset="0.0"/>
  60. <GradientStop Color="#AAA" Offset="1.0"/>
  61. </GradientStopCollection>
  62. </GradientBrush.GradientStops>
  63. </LinearGradientBrush>
  64. <LinearGradientBrush x:Key="PressedBrush" StartPoint="0,0" EndPoint="0,1">
  65. <GradientBrush.GradientStops>
  66. <GradientStopCollection>
  67. <GradientStop Color="#BBB" Offset="0.0"/>
  68. <GradientStop Color="#EEE" Offset="0.1"/>
  69. <GradientStop Color="#EEE" Offset="0.9"/>
  70. <GradientStop Color="#FFF" Offset="1.0"/>
  71. </GradientStopCollection>
  72. </GradientBrush.GradientStops>
  73. </LinearGradientBrush>
  74. <SolidColorBrush x:Key="DisabledForegroundBrush" Color="#888" />
  75. <SolidColorBrush x:Key="DisabledBackgroundBrush" Color="#EEE" />
  76. <SolidColorBrush x:Key="WindowBackgroundBrush" Color="#FFF" />
  77. <SolidColorBrush x:Key="SelectedBackgroundBrush" Color="#CCC" />
  78. <!-- Border Brushes -->
  79. <LinearGradientBrush x:Key="NormalBorderBrush" StartPoint="0,0" EndPoint="0,1">
  80. <GradientBrush.GradientStops>
  81. <GradientStopCollection>
  82. <GradientStop Color="#CCC" Offset="0.0"/>
  83. <GradientStop Color="#444" Offset="1.0"/>
  84. </GradientStopCollection>
  85. </GradientBrush.GradientStops>
  86. </LinearGradientBrush>
  87. <LinearGradientBrush x:Key="HorizontalNormalBorderBrush" StartPoint="0,0" EndPoint="1,0">
  88. <GradientBrush.GradientStops>
  89. <GradientStopCollection>
  90. <GradientStop Color="#CCC" Offset="0.0"/>
  91. <GradientStop Color="#444" Offset="1.0"/>
  92. </GradientStopCollection>
  93. </GradientBrush.GradientStops>
  94. </LinearGradientBrush>
  95. <LinearGradientBrush x:Key="DefaultedBorderBrush" StartPoint="0,0" EndPoint="0,1">
  96. <GradientBrush.GradientStops>
  97. <GradientStopCollection>
  98. <GradientStop Color="#777" Offset="0.0"/>
  99. <GradientStop Color="#000" Offset="1.0"/>
  100. </GradientStopCollection>
  101. </GradientBrush.GradientStops>
  102. </LinearGradientBrush>
  103. <LinearGradientBrush x:Key="PressedBorderBrush" StartPoint="0,0" EndPoint="0,1">
  104. <GradientBrush.GradientStops>
  105. <GradientStopCollection>
  106. <GradientStop Color="#444" Offset="0.0"/>
  107. <GradientStop Color="#888" Offset="1.0"/>
  108. </GradientStopCollection>
  109. </GradientBrush.GradientStops>
  110. </LinearGradientBrush>
  111. <SolidColorBrush x:Key="DisabledBorderBrush" Color="#AAA" />
  112. <SolidColorBrush x:Key="SolidBorderBrush" Color="#888" />
  113. <SolidColorBrush x:Key="LightBorderBrush" Color="#AAA" />
  114. <!-- Miscellaneous Brushes -->
  115. <SolidColorBrush x:Key="GlyphBrush" Color="#444" />
  116. <SolidColorBrush x:Key="LightColorBrush" Color="#DDD" />
  117. <!-- Button -->
  118. <Style TargetType="{x:Type Button}">
  119. <Setter Property="SnapsToDevicePixels" Value="true"/>
  120. <Setter Property="OverridesDefaultStyle" Value="true"/>
  121. <Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
  122. <Setter Property="MinHeight" Value="23"/>
  123. <Setter Property="MinWidth" Value="75"/>
  124. <Setter Property="Template">
  125. <Setter.Value>
  126. <ControlTemplate TargetType="{x:Type Button}">
  127. <Border
  128. x:Name="Border"
  129. CornerRadius="2"
  130. BorderThickness="1"
  131. Background="{StaticResource NormalBrush}"
  132. BorderBrush="{StaticResource NormalBorderBrush}">
  133. <ContentPresenter
  134. Margin="2"
  135. HorizontalAlignment="Center"
  136. VerticalAlignment="Center"
  137. RecognizesAccessKey="True"/>
  138. </Border>
  139. <ControlTemplate.Triggers>
  140. <Trigger Property="IsKeyboardFocused" Value="true">
  141. <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DefaultedBorderBrush}" />
  142. </Trigger>
  143. <Trigger Property="IsDefaulted" Value="true">
  144. <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DefaultedBorderBrush}" />
  145. </Trigger>
  146. <Trigger Property="IsMouseOver" Value="true">
  147. <Setter TargetName="Border" Property="Background" Value="{StaticResource DarkBrush}" />
  148. </Trigger>
  149. <Trigger Property="IsPressed" Value="true">
  150. <Setter TargetName="Border" Property="Background" Value="{StaticResource PressedBrush}" />
  151. <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource PressedBorderBrush}" />
  152. </Trigger>
  153. <Trigger Property="IsEnabled" Value="false">
  154. <Setter TargetName="Border" Property="Background" Value="{StaticResource DisabledBackgroundBrush}" />
  155. <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBorderBrush}" />
  156. <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
  157. </Trigger>
  158. </ControlTemplate.Triggers>
  159. </ControlTemplate>
  160. </Setter.Value>
  161. </Setter>
  162. </Style>
  163. <!-- TextBox -->
  164. <Style x:Key="{x:Type TextBox}" TargetType="{x:Type TextBoxBase}">
  165. <Setter Property="SnapsToDevicePixels" Value="True"/>
  166. <Setter Property="OverridesDefaultStyle" Value="True"/>
  167. <Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
  168. <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
  169. <Setter Property="MinWidth" Value="120"/>
  170. <Setter Property="MinHeight" Value="20"/>
  171. <Setter Property="AllowDrop" Value="true"/>
  172. <Setter Property="Template">
  173. <Setter.Value>
  174. <ControlTemplate TargetType="{x:Type TextBoxBase}">
  175. <Border
  176. Name="Border"
  177. CornerRadius="0"
  178. Padding="2"
  179. Background="LightGray"
  180. BorderBrush="{StaticResource SolidBorderBrush}"
  181. BorderThickness="1" >
  182. <ScrollViewer Margin="0" x:Name="PART_ContentHost"/>
  183. </Border>
  184. <ControlTemplate.Triggers>
  185. <Trigger Property="IsEnabled" Value="False">
  186. <Setter TargetName="Border" Property="Background" Value="{StaticResource DisabledBackgroundBrush}"/>
  187. <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBackgroundBrush}"/>
  188. <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
  189. </Trigger>
  190. </ControlTemplate.Triggers>
  191. </ControlTemplate>
  192. </Setter.Value>
  193. </Setter>
  194. </Style>
  195. <!-- RichTextBox -->
  196. <Style x:Key="{x:Type RichTextBox}"
  197. BasedOn="{StaticResource {x:Type TextBox}}"
  198. TargetType="{x:Type RichTextBox}">
  199. <Style.Resources>
  200. <Style x:Key="{x:Type FlowDocument}"
  201. TargetType="{x:Type FlowDocument}">
  202. <Setter Property="OverridesDefaultStyle"
  203. Value="true"/>
  204. </Style>
  205. </Style.Resources>
  206. </Style>
  207. <!-- PasswordBox -->
  208. <Style x:Key="{x:Type PasswordBox}" TargetType="{x:Type PasswordBox}">
  209. <Setter Property="SnapsToDevicePixels" Value="true"/>
  210. <Setter Property="OverridesDefaultStyle" Value="true"/>
  211. <Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
  212. <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
  213. <Setter Property="FontFamily" Value="Verdana"/>
  214. <Setter Property="PasswordChar" Value="?"/>
  215. <Setter Property="MinWidth" Value="120"/>
  216. <Setter Property="MinHeight" Value="20"/>
  217. <Setter Property="AllowDrop" Value="true"/>
  218. <Setter Property="Template">
  219. <Setter.Value>
  220. <ControlTemplate TargetType="{x:Type PasswordBox}">
  221. <Border
  222. Name="Border"
  223. CornerRadius="0"
  224. Padding="2"
  225. Background="{StaticResource DisabledBackgroundBrush}"
  226. BorderBrush="{StaticResource SolidBorderBrush}"
  227. BorderThickness="1" >
  228. <ScrollViewer x:Name="PART_ContentHost" />
  229. </Border>
  230. <ControlTemplate.Triggers>
  231. <Trigger Property="IsEnabled" Value="False">
  232. <Setter TargetName="Border" Property="Background" Value="{StaticResource DisabledBackgroundBrush}"/>
  233. <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBackgroundBrush}"/>
  234. <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
  235. </Trigger>
  236. </ControlTemplate.Triggers>
  237. </ControlTemplate>
  238. </Setter.Value>
  239. </Setter>
  240. </Style>
  241. <!-- TabControl -->
  242. <Style TargetType="{x:Type TabControl}">
  243. <Setter Property="OverridesDefaultStyle" Value="True" />
  244. <Setter Property="SnapsToDevicePixels" Value="True" />
  245. <Setter Property="Template">
  246. <Setter.Value>
  247. <ControlTemplate TargetType="{x:Type TabControl}">
  248. <Grid KeyboardNavigation.TabNavigation="Local">
  249. <Grid.RowDefinitions>
  250. <RowDefinition Height="Auto"/>
  251. <RowDefinition Height="*"/>
  252. </Grid.RowDefinitions>
  253. <Border
  254. Name="Border"
  255. Grid.Row="1"
  256. Background="{StaticResource WindowBackgroundBrush}"
  257. BorderBrush="{StaticResource SolidBorderBrush}"
  258. BorderThickness="1"
  259. CornerRadius="2"
  260. KeyboardNavigation.TabNavigation="Local"
  261. KeyboardNavigation.DirectionalNavigation="Contained"
  262. KeyboardNavigation.TabIndex="2" >
  263. <ContentPresenter
  264. Name="PART_SelectedContentHost"
  265. Margin="4"
  266. ContentSource="SelectedContent" />
  267. </Border>
  268. <TabPanel
  269. Name="HeaderPanel"
  270. Grid.Row="0"
  271. Margin="1,0,0,-1"
  272. IsItemsHost="True"
  273. KeyboardNavigation.TabIndex="1"
  274. Background="Transparent" />
  275. </Grid>
  276. <ControlTemplate.Triggers>
  277. <Trigger Property="IsEnabled" Value="False">
  278. <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}" />
  279. <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBorderBrush}" />
  280. </Trigger>
  281. </ControlTemplate.Triggers>
  282. </ControlTemplate>
  283. </Setter.Value>
  284. </Setter>
  285. </Style>
  286. <!-- TabItem -->
  287. <Style TargetType="{x:Type TabItem}">
  288. <Setter Property="Template">
  289. <Setter.Value>
  290. <ControlTemplate TargetType="{x:Type TabItem}">
  291. <Grid>
  292. <Border
  293. Name="Border"
  294. Margin="-1,0,0,0"
  295. Background="{StaticResource LightBrush}"
  296. BorderBrush="{StaticResource SolidBorderBrush}"
  297. BorderThickness="1,1,1,1"
  298. CornerRadius="2,12,0,0" >
  299. <ContentPresenter x:Name="ContentSite"
  300. VerticalAlignment="Center"
  301. HorizontalAlignment="Center"
  302. ContentSource="Header"
  303. Margin="12,2,12,2"
  304. RecognizesAccessKey="True"/>
  305. </Border>
  306. </Grid>
  307. <ControlTemplate.Triggers>
  308. <Trigger Property="IsSelected" Value="True">
  309. <Setter TargetName="Border" Property="Background" Value="{StaticResource WindowBackgroundBrush}" />
  310. <Setter TargetName="Border" Property="BorderThickness" Value="1,1,1,0" />
  311. </Trigger>
  312. <Trigger Property="IsEnabled" Value="False">
  313. <Setter TargetName="Border" Property="Background" Value="{StaticResource DisabledBackgroundBrush}" />
  314. <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBorderBrush}" />
  315. <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}" />
  316. </Trigger>
  317. </ControlTemplate.Triggers>
  318. </ControlTemplate>
  319. </Setter.Value>
  320. </Setter>
  321. </Style>
  322. <!-- SideBar Styles -->
  323. <Style x:Key="TextBlockSectionTitle" TargetType="TextBlock">
  324. <Setter Property="FontFamily" Value="Trebuchet MS"/>
  325. <Setter Property="FontSize" Value="11" />
  326. <Setter Property="FontWeight" Value="Normal" />
  327. <Setter Property="Foreground" Value="#FF1B75BB" />
  328. <Setter Property="HorizontalAlignment" Value="Stretch" />
  329. <Setter Property="TextWrapping" Value="Wrap" />
  330. <Setter Property="TextAlignment" Value="Left" />
  331. <Setter Property="Margin" Value="0,0,0,12" />
  332. </Style>
  333. <!-- Shell Boxes -->
  334. <Style x:Key="ShelBoxStyle" TargetType="Border">
  335. <Setter Property="Background" Value="#99FFFFFF" />
  336. <Setter Property="Opacity" Value="0.8" />
  337. <Setter Property="CornerRadius" Value="12,12,12,12" />
  338. <Setter Property="VerticalAlignment" Value="Stretch" />
  339. </Style>
  340. <!-- ListView -->
  341. <Style x:Key="{x:Static GridView.GridViewScrollViewerStyleKey}" TargetType="{x:Type ScrollViewer}">
  342. <Setter Property="Template">
  343. <Setter.Value>
  344. <ControlTemplate TargetType="{x:Type ScrollViewer}">
  345. <Grid Background="{TemplateBinding Background}">
  346. <Grid.ColumnDefinitions>
  347. <ColumnDefinition Width="*"/>
  348. <ColumnDefinition Width="Auto"/>
  349. </Grid.ColumnDefinitions>
  350. <Grid.RowDefinitions>
  351. <RowDefinition Height="*"/>
  352. <RowDefinition Height="Auto"/>
  353. </Grid.RowDefinitions>
  354. <DockPanel Margin="{TemplateBinding Padding}">
  355. <ScrollViewer DockPanel.Dock="Top"
  356. HorizontalScrollBarVisibility="Hidden"
  357. VerticalScrollBarVisibility="Hidden"
  358. Focusable="false">
  359. <Border CornerRadius="4" Background="{StaticResource DefaultedBorderBrush}" Padding="4" Margin="0,4,0,4">
  360. <GridViewHeaderRowPresenter Margin="2,0,2,0"
  361. Columns="{Binding Path=TemplatedParent.View.Columns,RelativeSource={RelativeSource TemplatedParent}}"
  362. ColumnHeaderContainerStyle="{Binding Path=TemplatedParent.View.ColumnHeaderContainerStyle,RelativeSource={RelativeSource TemplatedParent}}"
  363. ColumnHeaderTemplate="{Binding Path=TemplatedParent.View.ColumnHeaderTemplate,RelativeSource={RelativeSource TemplatedParent}}"
  364. ColumnHeaderTemplateSelector="{Binding Path=TemplatedParent.View.ColumnHeaderTemplateSelector,RelativeSource={RelativeSource TemplatedParent}}"
  365. AllowsColumnReorder="{Binding Path=TemplatedParent.View.AllowsColumnReorder,RelativeSource={RelativeSource TemplatedParent}}"
  366. ColumnHeaderContextMenu="{Binding Path=TemplatedParent.View.ColumnHeaderContextMenu,RelativeSource={RelativeSource TemplatedParent}}"
  367. ColumnHeaderToolTip="{Binding Path=TemplatedParent.View.ColumnHeaderToolTip,RelativeSource={RelativeSource TemplatedParent}}"
  368. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
  369. </Border>
  370. </ScrollViewer>
  371. <ScrollContentPresenter Name="PART_ScrollContentPresenter"
  372. KeyboardNavigation.DirectionalNavigation="Local"/>
  373. </DockPanel>
  374. <ScrollBar Name="PART_HorizontalScrollBar"
  375. Orientation="Horizontal"
  376. Grid.Row="1"
  377. Maximum="{TemplateBinding ScrollableWidth}"
  378. ViewportSize="{TemplateBinding ViewportWidth}"
  379. Value="{TemplateBinding HorizontalOffset}"
  380. Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"/>
  381. <ScrollBar Name="PART_VerticalScrollBar"
  382. Grid.Column="1"
  383. Maximum="{TemplateBinding ScrollableHeight}"
  384. ViewportSize="{TemplateBinding ViewportHeight}"
  385. Value="{TemplateBinding VerticalOffset}"
  386. Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"/>
  387. </Grid>
  388. </ControlTemplate>
  389. </Setter.Value>
  390. </Setter>
  391. </Style>
  392. <Style x:Key="GridViewColumnHeaderGripper" TargetType="{x:Type Thumb}">
  393. <Setter Property="Width" Value="18"/>
  394. <Setter Property="Background" Value="#404040"/>
  395. <Setter Property="Template">
  396. <Setter.Value>
  397. <ControlTemplate TargetType="{x:Type Thumb}">
  398. <Border Padding="{TemplateBinding Padding}" Background="Transparent">
  399. <Rectangle HorizontalAlignment="Center" Width="1" Fill="{TemplateBinding Background}"/>
  400. </Border>
  401. </ControlTemplate>
  402. </Setter.Value>
  403. </Setter>
  404. </Style>
  405. <Style x:Key="{x:Type GridViewColumnHeader}" TargetType="{x:Type GridViewColumnHeader}">
  406. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  407. <Setter Property="VerticalContentAlignment" Value="Center"/>
  408. <Setter Property="Foreground" Value="#ffffff"/>
  409. <Setter Property="Template">
  410. <Setter.Value>
  411. <ControlTemplate TargetType="{x:Type GridViewColumnHeader}">
  412. <Grid>
  413. <Border Name="HeaderBorder" BorderThickness="0,1,0,1" BorderBrush="{x:Null}" Background="{x:Null}" Padding="2,0,2,0">
  414. <ContentPresenter Name="HeaderContent" Margin="0,0,0,1" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
  415. </Border>
  416. <Thumb x:Name="PART_HeaderGripper" HorizontalAlignment="Right" Margin="0,0,-9,0" Style="{StaticResource GridViewColumnHeaderGripper}" Foreground="#FFFFFFFF" Background="{x:Null}"/>
  417. </Grid>
  418. <ControlTemplate.Triggers>
  419. <Trigger Property="IsMouseOver" Value="true">
  420. <Setter Property="Background" TargetName="PART_HeaderGripper" Value="{x:Null}"/>
  421. <Setter Property="Foreground" TargetName="PART_HeaderGripper" Value="#FFFCFCFC"/>
  422. <Setter Property="Background" TargetName="HeaderBorder" Value="{x:Null}"/>
  423. </Trigger>
  424. <Trigger Property="IsPressed" Value="true">
  425. <Setter TargetName="HeaderContent" Property="Margin" Value="1,1,0,0"/>
  426. <Setter Property="Foreground" TargetName="PART_HeaderGripper" Value="#FFE0E0E0"/>
  427. <Setter Property="Background" TargetName="PART_HeaderGripper" Value="{x:Null}"/>
  428. <Setter Property="Background" TargetName="HeaderBorder" Value="{x:Null}"/>
  429. </Trigger>
  430. <Trigger Property="IsEnabled" Value="false">
  431. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
  432. <Setter Property="Background" TargetName="PART_HeaderGripper" Value="{x:Null}"/>
  433. </Trigger>
  434. </ControlTemplate.Triggers>
  435. </ControlTemplate>
  436. </Setter.Value>
  437. </Setter>
  438. <Style.Triggers>
  439. <Trigger Property="Role" Value="Floating">
  440. <Setter Property="Opacity" Value="0.7"/>
  441. <Setter Property="Template">
  442. <Setter.Value>
  443. <ControlTemplate TargetType="{x:Type GridViewColumnHeader}">
  444. <Canvas Name="PART_FloatingHeaderCanvas">
  445. <Rectangle Fill="#60000000" Width="{TemplateBinding ActualWidth}" Height="{TemplateBinding ActualHeight}"/>
  446. </Canvas>
  447. </ControlTemplate>
  448. </Setter.Value>
  449. </Setter>
  450. <Setter Property="Foreground" Value="#FFFFFFFF"/>
  451. <Setter Property="Background" Value="{x:Null}"/>
  452. </Trigger>
  453. <Trigger Property="Role" Value="Padding">
  454. <Setter Property="Template">
  455. <Setter.Value>
  456. <ControlTemplate TargetType="{x:Type GridViewColumnHeader}">
  457. <Border Name="HeaderBorder" BorderThickness="0,1,0,1" BorderBrush="#404040" Background="{x:Null}"/>
  458. </ControlTemplate>
  459. </Setter.Value>
  460. </Setter>
  461. <Setter Property="Foreground" Value="#FFFFFFFF"/>
  462. <Setter Property="Background" Value="{x:Null}"/>
  463. <Setter Property="BorderBrush" Value="{x:Null}"/>
  464. </Trigger>
  465. </Style.Triggers>
  466. </Style>
  467. <Style x:Key="{x:Type ListView}" TargetType="{x:Type ListView}">
  468. <Setter Property="SnapsToDevicePixels" Value="true"/>
  469. <Setter Property="OverridesDefaultStyle" Value="true"/>
  470. <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
  471. <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
  472. <Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
  473. <Setter Property="VerticalContentAlignment" Value="Center"/>
  474. <Setter Property="Template">
  475. <Setter.Value>
  476. <ControlTemplate TargetType="{x:Type ListView}">
  477. <Border Name="Border" BorderThickness="1" BorderBrush="{x:Null}" Background="{x:Null}">
  478. <ScrollViewer Style="{DynamicResource {x:Static GridView.GridViewScrollViewerStyleKey}}" Foreground="#FFFFFFFF">
  479. <ItemsPresenter />
  480. </ScrollViewer>
  481. </Border>
  482. <ControlTemplate.Triggers>
  483. <Trigger Property="IsGrouping" Value="true">
  484. <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
  485. </Trigger>
  486. <Trigger Property="IsEnabled" Value="false">
  487. <Setter TargetName="Border" Property="Background" Value="#AAAAAA"/>
  488. </Trigger>
  489. </ControlTemplate.Triggers>
  490. </ControlTemplate>
  491. </Setter.Value>
  492. </Setter>
  493. </Style>
  494. <Style x:Key="{x:Type ListViewItem}" TargetType="{x:Type ListViewItem}">
  495. <Setter Property="SnapsToDevicePixels" Value="true"/>
  496. <Setter Property="OverridesDefaultStyle" Value="true"/>
  497. <Setter Property="HorizontalContentAlignment" Value="Center" />
  498. <Setter Property="VerticalContentAlignment" Value="Center" />
  499. <Setter Property="Foreground" Value="#000000"/>
  500. <Setter Property="Template">
  501. <Setter.Value>
  502. <ControlTemplate TargetType="{x:Type ListBoxItem}">
  503. <Border Name="Border" Padding="2" SnapsToDevicePixels="true" CornerRadius="4" Margin="0,4,0,0">
  504. <GridViewRowPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
  505. </Border>
  506. <ControlTemplate.Triggers>
  507. <Trigger Property="ItemsControl.AlternationIndex" Value="0">
  508. <Setter Property="Background" TargetName="Border" Value="#A5FFFFFF"></Setter>
  509. </Trigger>
  510. <Trigger Property="ItemsControl.AlternationIndex" Value="1">
  511. <Setter Property="Background" TargetName="Border" Value="#01FFFFFF"></Setter>
  512. </Trigger>
  513. <Trigger Property="IsSelected" Value="true">
  514. <Setter Property="Background" TargetName="Border" Value="#99B4C6"/>
  515. <Setter Property="Foreground" Value="#000000"/>
  516. </Trigger>
  517. <Trigger Property="IsMouseOver" Value="true">
  518. <Setter Property="Background" TargetName="Border" Value="#c5d7e5"/>
  519. <Setter Property="Foreground" Value="#000000"/>
  520. </Trigger>
  521. <Trigger Property="IsEnabled" Value="false">
  522. <Setter Property="Foreground" Value="#000000"/>
  523. </Trigger>
  524. </ControlTemplate.Triggers>
  525. </ControlTemplate>
  526. </Setter.Value>
  527. </Setter>
  528. </Style>
  529. <!-- ComboBox -->
  530. <ControlTemplate x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
  531. <Grid>
  532. <Grid.ColumnDefinitions>
  533. <ColumnDefinition />
  534. <ColumnDefinition Width="20" />
  535. </Grid.ColumnDefinitions>
  536. <Border
  537. x:Name="Border"
  538. Grid.ColumnSpan="2"
  539. CornerRadius="0,0,0,0"
  540. Background="{DynamicResource SelectedBackgroundBrush}"
  541. BorderBrush="{DynamicResource DisabledForegroundBrush}"
  542. BorderThickness="1" />
  543. <Border
  544. Grid.Column="0"
  545. CornerRadius="0,0,0,0"
  546. Margin="1"
  547. Background="{DynamicResource SelectedBackgroundBrush}"
  548. BorderBrush="{DynamicResource DisabledBorderBrush}"
  549. BorderThickness="0,0,1,0" />
  550. <Path
  551. x:Name="Arrow"
  552. Grid.Column="1"
  553. Fill="{StaticResource GlyphBrush}"
  554. HorizontalAlignment="Center"
  555. VerticalAlignment="Center"
  556. Data="M 0 0 L 4 4 L 8 0 Z"/>
  557. </Grid>
  558. <ControlTemplate.Triggers>
  559. <Trigger Property="ToggleButton.IsMouseOver" Value="true">
  560. <Setter Property="Background" TargetName="Border" Value="{DynamicResource SolidBorderBrush}"/>
  561. </Trigger>
  562. <Trigger Property="ToggleButton.IsChecked" Value="true">
  563. <Setter Property="Background" TargetName="Border" Value="{DynamicResource PressedBrush}"/>
  564. </Trigger>
  565. <Trigger Property="IsEnabled" Value="False">
  566. <Setter TargetName="Border" Property="Background" Value="{StaticResource DisabledBackgroundBrush}" />
  567. <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBorderBrush}" />
  568. <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
  569. <Setter TargetName="Arrow" Property="Fill" Value="{StaticResource DisabledForegroundBrush}" />
  570. </Trigger>
  571. </ControlTemplate.Triggers>
  572. </ControlTemplate>
  573. <ControlTemplate x:Key="ComboBoxTextBox" TargetType="{x:Type TextBox}">
  574. <Border x:Name="PART_ContentHost" Focusable="False" Background="{TemplateBinding Background}" />
  575. </ControlTemplate>
  576. <Style x:Key="{x:Type ComboBox}" TargetType="{x:Type ComboBox}">
  577. <Setter Property="SnapsToDevicePixels" Value="true"/>
  578. <Setter Property="OverridesDefaultStyle" Value="true"/>
  579. <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
  580. <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
  581. <Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
  582. <Setter Property="MinWidth" Value="120"/>
  583. <Setter Property="MinHeight" Value="20"/>
  584. <Setter Property="Template">
  585. <Setter.Value>
  586. <ControlTemplate TargetType="{x:Type ComboBox}">
  587. <Grid>
  588. <Grid.Background>
  589. <DrawingBrush Viewbox="0,0,20,20" ViewboxUnits="Absolute">
  590. <DrawingBrush.Drawing>
  591. <DrawingGroup>
  592. <GeometryDrawing Brush="#FFD3D3D3">
  593. <GeometryDrawing.Geometry>
  594. <RectangleGeometry Rect="0,0,20,20"/>
  595. </GeometryDrawing.Geometry>
  596. </GeometryDrawing>
  597. <GeometryDrawing Brush="#FF000000">
  598. <GeometryDrawing.Geometry>
  599. <EllipseGeometry Center="0,0" RadiusX="10" RadiusY="10"/>
  600. </GeometryDrawing.Geometry>
  601. </GeometryDrawing>
  602. <GeometryDrawing Brush="#FF000000">
  603. <GeometryDrawing.Geometry>
  604. <EllipseGeometry Center="20,20" RadiusX="10" RadiusY="10"/>
  605. </GeometryDrawing.Geometry>
  606. </GeometryDrawing>
  607. <GeometryDrawing Brush="#FFFFFFFF">
  608. <GeometryDrawing.Geometry>
  609. <EllipseGeometry Center="20,0" RadiusX="10" RadiusY="10"/>
  610. </GeometryDrawing.Geometry>
  611. </GeometryDrawing>
  612. <GeometryDrawing Brush="#FFFFFFFF">
  613. <GeometryDrawing.Geometry>
  614. <EllipseGeometry Center="0,20" RadiusX="10" RadiusY="10"/>
  615. </GeometryDrawing.Geometry>
  616. </GeometryDrawing>
  617. </DrawingGroup>
  618. </DrawingBrush.Drawing>
  619. </DrawingBrush>
  620. </Grid.Background>
  621. <ToggleButton
  622. Name="ToggleButton"
  623. Template="{StaticResource ComboBoxToggleButton}"
  624. Grid.Column="2"
  625. Focusable="false"
  626. IsChecked="{Binding Path=IsDropDownOpen,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}"
  627. ClickMode="Press">
  628. </ToggleButton>
  629. <ContentPresenter
  630. Name="ContentSite"
  631. IsHitTestVisible="False"
  632. Content="{TemplateBinding SelectionBoxItem}"
  633. ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
  634. ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
  635. Margin="3,3,23,3"
  636. VerticalAlignment="Center"
  637. HorizontalAlignment="Left" />
  638. <TextBox x:Name="PART_EditableTextBox"
  639. Style="{x:Null}"
  640. Template="{StaticResource ComboBoxTextBox}"
  641. HorizontalAlignment="Left"
  642. VerticalAlignment="Center"
  643. Margin="3,3,23,3"
  644. Focusable="True"
  645. Background="Transparent"
  646. Visibility="Hidden"
  647. IsReadOnly="{TemplateBinding IsReadOnly}"/>
  648. <Popup
  649. Name="Popup"
  650. Placement="Bottom"
  651. IsOpen="{TemplateBinding IsDropDownOpen}"
  652. AllowsTransparency="True"
  653. Focusable="False"
  654. PopupAnimation="Slide">
  655. <Grid
  656. Name="DropDown"
  657. SnapsToDevicePixels="True"
  658. MinWidth="{TemplateBinding ActualWidth}"
  659. MaxHeight="{TemplateBinding MaxDropDownHeight}">
  660. <Border
  661. x:Name="DropDownBorder"
  662. BorderThickness="1"
  663. BorderBrush="{StaticResource SolidBorderBrush}" Background="{DynamicResource SelectedBackgroundBrush}"/>
  664. <ScrollViewer Margin="4,6,4,6" SnapsToDevicePixels="True">
  665. <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" />
  666. </ScrollViewer>
  667. </Grid>
  668. </Popup>
  669. </Grid>
  670. <ControlTemplate.Triggers>
  671. <Trigger Property="HasItems" Value="false">
  672. <Setter TargetName="DropDownBorder" Property="MinHeight" Value="95"/>
  673. </Trigger>
  674. <Trigger Property="IsEnabled" Value="false">
  675. <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
  676. </Trigger>
  677. <Trigger Property="IsGrouping" Value="true">
  678. <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
  679. </Trigger>
  680. <Trigger SourceName="Popup" Property="Popup.AllowsTransparency" Value="true">
  681. <Setter TargetName="DropDownBorder" Property="CornerRadius" Value="0"/>
  682. <Setter TargetName="DropDownBorder" Property="Margin" Value="0,2,0,0"/>
  683. </Trigger>
  684. <Trigger Property="IsEditable"
  685. Value="true">
  686. <Setter Property="IsTabStop" Value="false"/>
  687. <Setter TargetName="PART_EditableTextBox" Property="Visibility" Value="Visible"/>
  688. <Setter TargetName="ContentSite" Property="Visibility" Value="Hidden"/>
  689. </Trigger>
  690. </ControlTemplate.Triggers>
  691. </ControlTemplate>
  692. </Setter.Value>
  693. </Setter>
  694. <Style.Triggers>
  695. </Style.Triggers>
  696. </Style>
  697. <!-- ComboBoxItem -->
  698. <Style x:Key="{x:Type ComboBoxItem}" TargetType="{x:Type ComboBoxItem}">
  699. <Setter Property="SnapsToDevicePixels" Value="true"/>
  700. <Setter Property="OverridesDefaultStyle" Value="true"/>
  701. <Setter Property="Template">
  702. <Setter.Value>
  703. <ControlTemplate TargetType="{x:Type ComboBoxItem}">
  704. <Border
  705. Name="Border"
  706. Padding="2"
  707. SnapsToDevicePixels="true">
  708. <ContentPresenter />
  709. </Border>
  710. <ControlTemplate.Triggers>
  711. <Trigger Property="IsHighlighted" Value="true">
  712. <Setter Property="Background" TargetName="Border" Value="#FFC5D7E5"/>
  713. </Trigger>
  714. <Trigger Property="IsEnabled" Value="false">
  715. <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
  716. </Trigger>
  717. </ControlTemplate.Triggers>
  718. </ControlTemplate>
  719. </Setter.Value>
  720. </Setter>
  721. </Style>
  722. <!-- Expander -->
  723. <ControlTemplate x:Key="ExpanderToggleButton" TargetType="{x:Type ToggleButton}">
  724. <Border
  725. Name="Border"
  726. CornerRadius="0,0,0,0"
  727. Background="{x:Null}"
  728. BorderBrush="{x:Null}"
  729. BorderThickness="0,0,1,0">
  730. <Path
  731. Name="Arrow"
  732. Fill="#FF4682B4"
  733. HorizontalAlignment="Center"
  734. VerticalAlignment="Center"
  735. Data="M 0 0 L 4 4 L 8 0 Z"/>
  736. </Border>
  737. <ControlTemplate.Triggers>
  738. <Trigger Property="ToggleButton.IsMouseOver" Value="true">
  739. <Setter Property="Background" TargetName="Border" Value="{x:Null}"/>
  740. <Setter Property="Fill" TargetName="Arrow" Value="#FF060606"/>
  741. </Trigger>
  742. <Trigger Property="IsPressed" Value="true">
  743. <Setter Property="Background" TargetName="Border" Value="{x:Null}"/>
  744. <Setter Property="Fill" TargetName="Arrow" Value="#FF093E6A"/>
  745. </Trigger>
  746. <Trigger Property="IsChecked" Value="true">
  747. <Setter TargetName="Arrow" Property="Data" Value="M 0 4 L 4 0 L 8 4 Z" />
  748. <Setter Property="Fill" TargetName="Arrow" Value="#FF093E6A"/>
  749. </Trigger>
  750. <Trigger Property="IsEnabled" Value="False">
  751. <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
  752. <Setter TargetName="Arrow" Property="Fill" Value="{StaticResource DisabledForegroundBrush}" />
  753. <Setter Property="Background" TargetName="Border" Value="{x:Null}"/>
  754. <Setter Property="BorderBrush" TargetName="Border" Value="{x:Null}"/>
  755. </Trigger>
  756. </ControlTemplate.Triggers>
  757. </ControlTemplate>
  758. <Style TargetType="{x:Type Expander}">
  759. <Setter Property="Template">
  760. <Setter.Value>
  761. <ControlTemplate TargetType="{x:Type Expander}">
  762. <Grid>
  763. <Grid.RowDefinitions>
  764. <RowDefinition Height="Auto"/>
  765. <RowDefinition Name="ContentRow" Height="Auto"/>
  766. </Grid.RowDefinitions>
  767. <Border
  768. Name="Border"
  769. Grid.Row="0"
  770. Background="{x:Null}"
  771. BorderBrush="{x:Null}"
  772. BorderThickness="1"
  773. CornerRadius="0,0,0,0" >
  774. <Grid>
  775. <Grid.ColumnDefinitions>
  776. <ColumnDefinition Width="20" />
  777. <ColumnDefinition Width="*" />
  778. </Grid.ColumnDefinitions>
  779. <ToggleButton
  780. IsChecked="{Binding Path=IsExpanded,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}"
  781. OverridesDefaultStyle="True"
  782. Template="{StaticResource ExpanderToggleButton}"
  783. Background="#FF4682B4" />
  784. <ContentPresenter
  785. Grid.Column="1"
  786. Margin="4"
  787. ContentSource="Header"
  788. RecognizesAccessKey="True" />
  789. </Grid>
  790. </Border>
  791. <Border
  792. Name="Content"
  793. Grid.Row="1"
  794. Background="{x:Null}"
  795. BorderBrush="{x:Null}"
  796. BorderThickness="1,0,1,1"
  797. CornerRadius="0,0,2,2" >
  798. <ContentPresenter Margin="4" />
  799. </Border>
  800. </Grid>
  801. <ControlTemplate.Triggers>
  802. <Trigger Property="IsExpanded" Value="False">
  803. <Setter TargetName="Content" Property="Visibility" Value="Collapsed" />
  804. </Trigger>
  805. <Trigger Property="IsEnabled" Value="False">
  806. <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
  807. <Setter Property="Background" TargetName="Border" Value="{DynamicResource DisabledBorderBrush}"/>
  808. <Setter Property="BorderBrush" TargetName="Border" Value="{DynamicResource DisabledForegroundBrush}"/>
  809. </Trigger>
  810. </ControlTemplate.Triggers>
  811. </ControlTemplate>
  812. </Setter.Value>
  813. </Setter>
  814. </Style>
  815. <!-- Focus Visual -->
  816. <Style x:Key="RadioButtonFocusVisual">
  817. <Setter Property="Control.Template">
  818. <Setter.Value>
  819. <ControlTemplate>
  820. <Border>
  821. <Rectangle
  822. Margin="15,0,0,0"
  823. StrokeThickness="1"
  824. Stroke="#60000000"
  825. StrokeDashArray="1 2"/>
  826. </Border>
  827. </ControlTemplate>
  828. </Setter.Value>
  829. </Setter>
  830. </Style>
  831. <!-- RadioButton -->
  832. <Style x:Key="{x:Type RadioButton}" TargetType="{x:Type RadioButton}">
  833. <Setter Property="SnapsToDevicePixels" Value="true"/>
  834. <Setter Property="OverridesDefaultStyle" Value="true"/>
  835. <Setter Property="FocusVisualStyle" Value="{StaticResource RadioButtonFocusVisual}"/>
  836. <Setter Property="Template">
  837. <Setter.Value>
  838. <ControlTemplate TargetType="{x:Type RadioButton}">
  839. <BulletDecorator Background="Transparent">
  840. <BulletDecorator.Bullet>
  841. <Grid Width="13"
  842. Height="13" >
  843. <Ellipse x:Name="Border"
  844. Fill="{StaticResource NormalBrush}"
  845. StrokeThickness="1"
  846. Stroke="{StaticResource NormalBorderBrush}" />
  847. <Path Height="8" x:Name="CheckMark" Width="8" Opacity="1" Fill="{StaticResource GlyphBrush}"
  848. Stretch="Fill"
  849. Data="M102.03442,598.79645 L105.22962,597.78918 L106.78825,600.42358 C106.78825,600.42358 108.51028,595.74304 110.21724,593.60419 C112.00967,591.35822 114.89314,591.42316 114.89314,591.42316 C114.89314,591.42316 112.67844,593.42645 111.93174,594.44464 C110.7449,596.06293 107.15683,604.13837 107.15683,604.13837 z"
  850. Canvas.ZIndex="1"/>
  851. </Grid>
  852. </BulletDecorator.Bullet>
  853. <ContentPresenter
  854. Margin="4,0,0,0"
  855. VerticalAlignment="Center"
  856. HorizontalAlignment="Left"
  857. RecognizesAccessKey="True"/>
  858. </BulletDecorator>
  859. <ControlTemplate.Triggers>
  860. <Trigger Property="IsChecked" Value="false">
  861. <Setter TargetName="CheckMark" Property="Visibility" Value="Collapsed"/>
  862. </Trigger>
  863. <Trigger Property="IsMouseOver" Value="true">
  864. <Setter TargetName="Border" Property="Fill" Value="{StaticResource DarkBrush}" />
  865. </Trigger>
  866. <Trigger Property="IsPressed" Value="true">
  867. <Setter TargetName="Border" Property="Fill" Value="{StaticResource PressedBrush}" />
  868. <Setter TargetName="Border" Property="Stroke" Value="{StaticResource GlyphBrush}" />
  869. </Trigger>
  870. <Trigger Property="IsEnabled" Value="false">
  871. <Setter TargetName="Border" Property="Fill" Value="{StaticResource DisabledBackgroundBrush}" />
  872. <Setter TargetName="Border" Property="Stroke" Value="#40000000" />
  873. <Setter Property="Foreground" Value="#80000000"/>
  874. </Trigger>
  875. </ControlTemplate.Triggers>
  876. </ControlTemplate>
  877. </Setter.Value>
  878. </Setter>
  879. </Style>
  880. <!-- Custom TextBox -->
  881. <Style x:Key="CustomTextBoxStyle" TargetType="{x:Type TextBoxBase}">
  882. <Setter Property="SnapsToDevicePixels" Value="True"/>
  883. <Setter Property="OverridesDefaultStyle" Value="True"/>
  884. <Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
  885. <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
  886. <Setter Property="Foreground" Value="#ffffff"/>
  887. <Setter Property="MinWidth" Value="120"/>
  888. <Setter Property="MinHeight" Value="30"/>
  889. <Setter Property="AllowDrop" Value="true"/>
  890. <Setter Property="Template">
  891. <Setter.Value>
  892. <ControlTemplate TargetType="{x:Type TextBoxBase}">
  893. <Border
  894. Name="Border"
  895. CornerRadius="12"
  896. Padding="5"
  897. Background="Transparent"
  898. BorderBrush="#ffffff"
  899. BorderThickness="1" >
  900. <ScrollViewer Margin="0" x:Name="PART_ContentHost"/>
  901. </Border>
  902. <ControlTemplate.Triggers>
  903. <Trigger Property="IsEnabled" Value="False">
  904. <Setter TargetName="Border" Property="Background" Value="Transparent"/>
  905. <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBackgroundBrush}"/>
  906. <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
  907. </Trigger>
  908. </ControlTemplate.Triggers>
  909. </ControlTemplate>
  910. </Setter.Value>
  911. </Setter>
  912. </Style>
  913. <!-- Popup TextBox -->
  914. <Style x:Key="PopupTextBoxStyle" TargetType="TextBoxBase">
  915. <Setter Property="SnapsToDevicePixels" Value="True"/>
  916. <Setter Property="OverridesDefaultStyle" Value="True"/>
  917. <Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
  918. <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
  919. <Setter Property="Foreground" Value="#FF000000"/>
  920. <Setter Property="MinWidth" Value="120"/>
  921. <Setter Property="MinHeight" Value="30"/>
  922. <Setter Property="AllowDrop" Value="true"/>
  923. <Setter Property="Template">
  924. <Setter.Value>
  925. <ControlTemplate TargetType="{x:Type TextBoxBase}">
  926. <Border
  927. Name="Border"
  928. CornerRadius="2"
  929. Padding="5"
  930. Background="Transparent"
  931. BorderBrush="Transparent"
  932. BorderThickness="1">
  933. <ScrollViewer Margin="0" x:Name="PART_ContentHost"/>
  934. </Border>
  935. <ControlTemplate.Triggers>
  936. <Trigger Property="IsEnabled" Value="False">
  937. <Setter TargetName="Border" Property="Background" Value="Transparent"/>
  938. <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBackgroundBrush}"/>
  939. <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
  940. </Trigger>
  941. </ControlTemplate.Triggers>
  942. </ControlTemplate>
  943. </Setter.Value>
  944. </Setter>
  945. </Style>
  946. <!-- Buy/Sell Grid buttons -->
  947. <ControlTemplate x:Key="AddButtonTemplate" TargetType="Button">
  948. <Border Width="18" Height="18" Background="#00000000" Margin="2,0,2,0">
  949. <Grid>
  950. <Path x:Name="path1" Height="16" Width="16" RenderTransformOrigin="0.5,0.5" Fill="{x:Null}" Stretch="Fill" Stroke="#FF8C8C8C" StrokeThickness="1" Data="M7.5,1.5 L10.5,1.5 L10.5,7.5 L16.5,7.5 L16.5,10.5 L10.5,10.5 L10.5,16.5 L7.5,16.5 L7.5,10.5 L1.5,10.5 L1.5,7.5 L7.5,7.5 z" Margin="1,-1,1,3">
  951. <Path.RenderTransform>
  952. <TransformGroup>
  953. <ScaleTransform/>
  954. <SkewTransform/>
  955. <RotateTransform Angle="-90"/>
  956. <TranslateTransform Y="2" X="0"/>
  957. </TransformGroup>
  958. </Path.RenderTransform>
  959. </Path>
  960. <Path x:Name="path" Height="16" Width="16" RenderTransformOrigin="0.5,0.5" Fill="#FF032E9C" Stretch="Fill" Data="M7.5,1.5 L10.5,1.5 L10.5,7.5 L16.5,7.5 L16.5,10.5 L10.5,10.5 L10.5,16.5 L7.5,16.5 L7.5,10.5 L1.5,10.5 L1.5,7.5 L7.5,7.5 z" StrokeThickness="0" Margin="1,-1,1,3">
  961. <Path.RenderTransform>
  962. <TransformGroup>
  963. <ScaleTransform/>
  964. <SkewTransform/>
  965. <RotateTransform Angle="-90"/>
  966. <TranslateTransform Y="2" X="0"/>
  967. </TransformGroup>
  968. </Path.RenderTransform>
  969. </Path>
  970. </Grid>
  971. </Border>
  972. <ControlTemplate.Triggers>
  973. <Trigger Property="IsMouseOver" Value="True">
  974. <Setter TargetName="path1" Property="Visibility" Value="Collapsed" />
  975. <Setter TargetName="path" Property="Visibility" Value="Visible" />
  976. </Trigger>
  977. <Trigger Property="IsMouseOver" Value="False">
  978. <Setter TargetName="path1" Property="Visibility" Value="Visible" />
  979. <Setter TargetName="path" Property="Visibility" Value="Collapsed" />
  980. </Trigger>
  981. </ControlTemplate.Triggers>
  982. </ControlTemplate>
  983. <ControlTemplate x:Key="RemoveXButtonTemplate" TargetType="Button">
  984. <Border Width="18" Height="18" Background="#00000000" Margin="2,0,2,0">
  985. <Grid RenderTransformOrigin="0.5,0.5">
  986. <Grid.RenderTransform>
  987. <TransformGroup>
  988. <ScaleTransform/>
  989. <SkewTransform/>
  990. <RotateTransform Angle="45"/>
  991. <TranslateTransform/>
  992. </TransformGroup>
  993. </Grid.RenderTransform>
  994. <Path x:Name="path1" Height="16" Width="16" RenderTransformOrigin="0.5,0.5" Fill="{x:Null}" Stretch="Fill" Stroke="#FF8C8C8C" StrokeThickness="1" Data="M7.5,1.5 L10.5,1.5 L10.5,7.5 L16.5,7.5 L16.5,10.5 L10.5,10.5 L10.5,16.5 L7.5,16.5 L7.5,10.5 L1.5,10.5 L1.5,7.5 L7.5,7.5 z" Margin="1,-1,1,3">
  995. <Path.RenderTransform>
  996. <TransformGroup>
  997. <ScaleTransform/>
  998. <SkewTransform/>
  999. <RotateTransform Angle="-90"/>
  1000. <TranslateTransform Y="2" X="0"/>
  1001. </TransformGroup>
  1002. </Path.RenderTransform>
  1003. </Path>
  1004. <Path x:Name="path" Height="16" Width="16" RenderTransformOrigin="0.5,0.5" Fill="#FFD60808" Stretch="Fill" Data="M7.5,1.5 L10.5,1.5 L10.5,7.5 L16.5,7.5 L16.5,10.5 L10.5,10.5 L10.5,16.5 L7.5,16.5 L7.5,10.5 L1.5,10.5 L1.5,7.5 L7.5,7.5 z" StrokeThickness="0" Margin="1,-1,1,3">
  1005. <Path.RenderTransform>
  1006. <TransformGroup>
  1007. <ScaleTransform/>
  1008. <SkewTransform/>
  1009. <RotateTransform Angle="-90"/>
  1010. <TranslateTransform Y="2" X="0"/>
  1011. </TransformGroup>
  1012. </Path.RenderTransform>
  1013. </Path>
  1014. </Grid>
  1015. </Border>
  1016. <ControlTemplate.Triggers>
  1017. <Trigger Property="IsMouseOver" Value="True">
  1018. <Setter TargetName="path1" Property="Visibility" Value="Collapsed" />
  1019. <Setter TargetName="path" Property="Visibility" Value="Visible" />
  1020. </Trigger>
  1021. <Trigger Property="IsMouseOver" Value="False">
  1022. <Setter TargetName="path1" Property="Visibility" Value="Visible" />
  1023. <Setter TargetName="path" Property="Visibility" Value="Collapsed" />
  1024. </Trigger>
  1025. </ControlTemplate.Triggers>
  1026. </ControlTemplate>
  1027. <ControlTemplate x:Key="RemoveButtonTemplate" TargetType="Button">
  1028. <Border Width="18" Height="18" Background="#00000000" Margin="2,0,2,0">
  1029. <Grid>
  1030. <Path x:Name="path1" Height="4" Width="16" RenderTransformOrigin="0.5,0.5" Fill="{x:Null}" Stretch="Fill" Stroke="#FF8C8C8C" StrokeThickness="1" Data="M7.5,1.5 L10.5,1.5 L10.5,16.5 L7.5,16.5 z" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  1031. <Path x:Name="path" RenderTransformOrigin="0.5,0.5" Fill="#FFD60808" Stretch="Fill" Data="M7.5,1.5 L10.5,1.5 L10.5,16.5 L7.5,16.5 z" Height="4" Width="16"/>
  1032. </Grid>
  1033. </Border>
  1034. <ControlTemplate.Triggers>
  1035. <Trigger Property="IsMouseOver" Value="True">
  1036. <Setter TargetName="path1" Property="Visibility" Value="Collapsed" />
  1037. <Setter TargetName="path" Property="Visibility" Value="Visible" />
  1038. </Trigger>
  1039. <Trigger Property="IsMouseOver" Value="False">
  1040. <Setter TargetName="path1" Property="Visibility" Value="Visible" />
  1041. <Setter TargetName="path" Property="Visibility" Value="Collapsed" />
  1042. </Trigger>
  1043. </ControlTemplate.Triggers>
  1044. </ControlTemplate>
  1045. <!-- Submit/Cancel buttons -->
  1046. <LinearGradientBrush x:Key="SubmitButtonEnabledBG" EndPoint="0.5,1" StartPoint="0.5,0">
  1047. <GradientStop Color="#FF006C3B" Offset="0.163"/>
  1048. <GradientStop Color="#FF00A04D" Offset="1"/>
  1049. </LinearGradientBrush>
  1050. <LinearGradientBrush x:Key="SubmitButtonDisabledBG" EndPoint="0.5,1" StartPoint="0.5,0">
  1051. <GradientStop Color="#FF6C6C6C" Offset="0.163"/>
  1052. <GradientStop Color="#FF9F9F9F" Offset="1"/>
  1053. </LinearGradientBrush>
  1054. <ControlTemplate x:Key="SubmitButtonTemplate" TargetType="Button">
  1055. <Grid Height="{TemplateBinding Height}">
  1056. <Border Width="105" x:Name="BgEnabled" Background="#FF006C3B" BorderBrush="#FFFFFFFF" BorderThickness="2,2,1,2" CornerRadius="9,0,0,9" HorizontalAlignment="Right">
  1057. <TextBlock x:Name="textBlock" Text="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="#FFFFFFFF" />
  1058. </Border>
  1059. </Grid>
  1060. <ControlTemplate.Triggers>
  1061. <Trigger Property="IsEnabled" Value="false">
  1062. <Trigger.EnterActions>
  1063. <BeginStoryboard>
  1064. <Storyboard>
  1065. <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.3" Storyboard.TargetName="textBlock" Storyboard.TargetProperty="(UIElement.Opacity)" AutoReverse="true">
  1066. <SplineDoubleKeyFrame KeyTime="00:00:00.3" Value="0" KeySpline="0.5,0,0.5,1" />
  1067. </DoubleAnimationUsingKeyFrames>
  1068. <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.3" Storyboard.TargetName="BgEnabled" Storyboard.TargetProperty="(FrameworkElement.Width)" AutoReverse="true">
  1069. <SplineDoubleKeyFrame KeyTime="00:00:00.3" Value="0" KeySpline="0.5,0,0.5,1" />
  1070. </DoubleAnimationUsingKeyFrames>
  1071. <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.3" Storyboard.TargetName="BgEnabled" Storyboard.TargetProperty="(UIElement.Opacity)" AutoReverse="true">
  1072. <SplineDoubleKeyFrame KeyTime="00:00:00.3" Value="0" KeySpline="0.5,0,0.5,1" />
  1073. </DoubleAnimationUsingKeyFrames>
  1074. <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.2" Storyboard.TargetName="BgEnabled" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)">
  1075. <SplineColorKeyFrame KeyTime="00:00:00.1" Value="#FF006C3B"/>
  1076. <SplineColorKeyFrame KeyTime="00:00:00.2" Value="#FF6C6C6C"/>
  1077. </ColorAnimationUsingKeyFrames>
  1078. </Storyboard>
  1079. </BeginStoryboard>
  1080. </Trigger.EnterActions>
  1081. <Trigger.ExitActions>
  1082. <BeginStoryboard>
  1083. <Storyboard>
  1084. <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.3" Storyboard.TargetName="textBlock" Storyboard.TargetProperty="(UIElement.Opacity)" AutoReverse="true">
  1085. <SplineDoubleKeyFrame KeyTime="00:00:00.3" Value="0" KeySpline="0.5,0,0.5,1" />
  1086. </DoubleAnimationUsingKeyFrames>
  1087. <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.3" Storyboard.TargetName="BgEnabled" Storyboard.TargetProperty="(FrameworkElement.Width)" AutoReverse="true">
  1088. <SplineDoubleKeyFrame KeyTime="00:00:00.3" Value="0" KeySpline="0.5,0,0.5,1" />
  1089. </DoubleAnimationUsingKeyFrames>
  1090. <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.3" Storyboard.TargetName="BgEnabled" Storyboard.TargetProperty="(UIElement.Opacity)" AutoReverse="true">
  1091. <SplineDoubleKeyFrame KeyTime="00:00:00.3" Value="0" KeySpline="0.5,0,0.5,1" />
  1092. </DoubleAnimationUsingKeyFrames>
  1093. <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.2" Storyboard.TargetName="BgEnabled" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)">
  1094. <SplineColorKeyFrame KeyTime="00:00:00.1" Value="#FF6C6C6C"/>
  1095. <SplineColorKeyFrame KeyTime="00:00:00.2" Value="#FF006C3B"/>
  1096. </ColorAnimationUsingKeyFrames>
  1097. </Storyboard>
  1098. </BeginStoryboard>
  1099. </Trigger.ExitActions>
  1100. </Trigger>
  1101. </ControlTemplate.Triggers>
  1102. </ControlTemplate>
  1103. <ControlTemplate x:Key="CancelButtonTemplate" TargetType="Button">
  1104. <Grid Height="{TemplateBinding Height}">
  1105. <Border Width="105" BorderBrush="#FFFFFFFF" BorderThickness="1,2,2,2" CornerRadius="0,9,9,0" Background="#FFFFFFFF">
  1106. <TextBlock Text="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="#FF666666" Margin="-9,0,0,0" />
  1107. </Border>
  1108. </Grid>
  1109. </ControlTemplate>
  1110. <!-- ScrollBar -->
  1111. <Style x:Key="ScrollBarLineButton" TargetType="{x:Type RepeatButton}">
  1112. <Setter Property="SnapsToDevicePixels" Value="True"/>
  1113. <Setter Property="OverridesDefaultStyle" Value="true"/>
  1114. <Setter Property="Focusable" Value="false"/>
  1115. <Setter Property="Template">
  1116. <Setter.Value>
  1117. <ControlTemplate TargetType="{x:Type RepeatButton}">
  1118. <Border
  1119. x:Name="Border"
  1120. Margin="1"
  1121. CornerRadius="2"
  1122. Background="{x:Null}"
  1123. BorderBrush="{x:Null}"
  1124. BorderThickness="1">
  1125. <Path
  1126. HorizontalAlignment="Center"
  1127. VerticalAlignment="Center"
  1128. Fill="#404040"
  1129. Data="{Binding Path=Content, RelativeSource={RelativeSource TemplatedParent}}" />
  1130. </Border>
  1131. <ControlTemplate.Triggers>
  1132. <Trigger Property="IsPressed" Value="true">
  1133. <Setter TargetName="Border" Property="Background" Value="#E0E0E0" />
  1134. </Trigger>
  1135. <Trigger Property="IsEnabled" Value="false">
  1136. <Setter Property="Foreground" Value="#888888"/>
  1137. </Trigger>
  1138. </ControlTemplate.Triggers>
  1139. </ControlTemplate>
  1140. </Setter.Value>
  1141. </Setter>
  1142. </Style>
  1143. <Style x:Key="ScrollBarPageButton" TargetType="{x:Type RepeatButton}">
  1144. <Setter Property="SnapsToDevicePixels" Value="True"/>
  1145. <Setter Property="OverridesDefaultStyle" Value="true"/>
  1146. <Setter Property="IsTabStop" Value="false"/>
  1147. <Setter Property="Focusable" Value="false"/>
  1148. <Setter Property="Template">
  1149. <Setter.Value>
  1150. <ControlTemplate TargetType="{x:Type RepeatButton}">
  1151. <Border Background="Transparent" />
  1152. </ControlTemplate>
  1153. </Setter.Value>
  1154. </Setter>
  1155. </Style>
  1156. <Style x:Key="ScrollBarThumb" TargetType="{x:Type Thumb}">