PageRenderTime 51ms CodeModel.GetById 16ms RepoModel.GetById 1ms app.codeStats 0ms

/Application/GUI/Styles.xaml

http://yet-another-music-application.googlecode.com/
XAML | 1185 lines | 1121 code | 20 blank | 44 comment | 0 complexity | 0b72b5f79fab02d18a931e75f53053d2 MD5 | raw file
  1. <!--Styles.xaml
  2. All the styles and templates used on the XAML controls.
  3. = = = = = = = = = =
  4. This code is part of the Stoffi Music Player Project.
  5. Visit our website at: stoffiplayer.com
  6. This program is free software; you can redistribute it and/or
  7. modify it under the terms of the GNU General Public License
  8. as published by the Free Software Foundation; either version
  9. 3 of the License, or (at your option) any later version.
  10. See stoffiplayer.com/license for more information.
  11. -->
  12. <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  13. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  14. xmlns:properties="clr-namespace:Stoffi.Properties"
  15. xmlns:tb="http://www.hardcodet.net/taskbar"
  16. xmlns:local="clr-namespace:Stoffi"
  17. x:Class="Stoffi.Styles"
  18. x:ClassModifier="public">
  19. <properties:Settings x:Key="Settings"/>
  20. <!-- style the toolbar -->
  21. <Style x:Key="AeroToolbarButtonFocusStyle">
  22. <Setter Property="Control.Template">
  23. <Setter.Value>
  24. <ControlTemplate>
  25. </ControlTemplate>
  26. </Setter.Value>
  27. </Setter>
  28. </Style>
  29. <LinearGradientBrush StartPoint="0,0" EndPoint="0,1" x:Key="AeroToolbarBackground">
  30. <GradientStop Color="#fafcfd" Offset="0.0"/>
  31. <GradientStop Color="#e6f0fa" Offset="0.5"/>
  32. <GradientStop Color="#dce6f4" Offset="0.5"/>
  33. <GradientStop Color="#dde9f7" Offset="1.0"/>
  34. </LinearGradientBrush>
  35. <LinearGradientBrush StartPoint="0,0" EndPoint="0,1" x:Key="AeroToolbarButtonHoverBackground">
  36. <GradientStop Color="#f8fbfe" Offset="0.0"/>
  37. <GradientStop Color="#edf2fa" Offset="0.5"/>
  38. <GradientStop Color="#d7e4f4" Offset="0.5"/>
  39. <GradientStop Color="#c1d2e8" Offset="1.0"/>
  40. </LinearGradientBrush>
  41. <LinearGradientBrush StartPoint="0,0" EndPoint="0,1" x:Key="AeroToolbarButtonClickBackground">
  42. <GradientStop Color="#c9d4e4" Offset="0.0"/>
  43. <GradientStop Color="#e1ebf5" Offset="0.2"/>
  44. <GradientStop Color="#d8e4f1" Offset="0.5"/>
  45. <GradientStop Color="#cfdbec" Offset="0.5"/>
  46. <GradientStop Color="#cfdced" Offset="1.0"/>
  47. </LinearGradientBrush>
  48. <Style TargetType="Border" x:Key="AeroToolbarStyle">
  49. <Setter Property="Background" Value="{StaticResource AeroToolbarBackground}"/>
  50. <Setter Property="BorderThickness" Value="0,0,0,2"/>
  51. <Setter Property="BorderBrush" Value="#bfc9d8"/>
  52. </Style>
  53. <Style TargetType="Button" x:Key="AeroToolbarButtonStyle">
  54. <Setter Property="Foreground" Value="#1e395b"/>
  55. <Setter Property="FocusVisualStyle" Value="{StaticResource AeroToolbarButtonFocusStyle}" />
  56. <Setter Property="Template">
  57. <Setter.Value>
  58. <ControlTemplate TargetType="Button">
  59. <Border SnapsToDevicePixels="True" CornerRadius="2" BorderThickness="1" x:Name="OuterBorder" BorderBrush="Transparent">
  60. <Border SnapsToDevicePixels="True" CornerRadius="2" Padding="13,0,13,0" BorderThickness="1" x:Name="InnerBorder" BorderBrush="Transparent">
  61. <ContentPresenter VerticalAlignment="Center" SnapsToDevicePixels="True"/>
  62. </Border>
  63. </Border>
  64. <ControlTemplate.Triggers>
  65. <Trigger Property="IsMouseOver" Value="True">
  66. <Setter TargetName="InnerBorder" Property="Background" Value="{StaticResource AeroToolbarButtonHoverBackground}"/>
  67. <Setter TargetName="InnerBorder" Property="BorderBrush" Value="#f3f6fb"/>
  68. <Setter TargetName="OuterBorder" Property="BorderBrush" Value="#BBaabcd3"/>
  69. </Trigger>
  70. <Trigger Property="IsPressed" Value="True">
  71. <Setter TargetName="InnerBorder" Property="Background" Value="{StaticResource AeroToolbarButtonClickBackground}"/>
  72. <Setter TargetName="InnerBorder" Property="BorderBrush" Value="Transparent"/>
  73. <Setter TargetName="OuterBorder" Property="BorderBrush" Value="#bbaabcd5"/>
  74. </Trigger>
  75. <Trigger Property="IsKeyboardFocused" Value="True">
  76. <Setter TargetName="InnerBorder" Property="Background" Value="Transparent"/>
  77. <Setter TargetName="InnerBorder" Property="BorderBrush" Value="#f3f6fb"/>
  78. <Setter TargetName="OuterBorder" Property="BorderBrush" Value="#BBaabcd3"/>
  79. </Trigger>
  80. </ControlTemplate.Triggers>
  81. </ControlTemplate>
  82. </Setter.Value>
  83. </Setter>
  84. </Style>
  85. <Style TargetType="Button" x:Key="AeroToolbarSmallButtonStyle">
  86. <Setter Property="Foreground" Value="#1e395b"/>
  87. <Setter Property="FocusVisualStyle" Value="{StaticResource AeroToolbarButtonFocusStyle}" />
  88. <Setter Property="Template">
  89. <Setter.Value>
  90. <ControlTemplate TargetType="Button">
  91. <Border SnapsToDevicePixels="True" CornerRadius="2" BorderThickness="1" x:Name="OuterBorder" BorderBrush="Transparent">
  92. <Border SnapsToDevicePixels="True" CornerRadius="2" Padding="5,0,5,0" BorderThickness="1" x:Name="InnerBorder" BorderBrush="Transparent">
  93. <ContentPresenter VerticalAlignment="Center" SnapsToDevicePixels="True"/>
  94. </Border>
  95. </Border>
  96. <ControlTemplate.Triggers>
  97. <Trigger Property="IsMouseOver" Value="True">
  98. <Setter TargetName="InnerBorder" Property="Background" Value="{StaticResource AeroToolbarButtonHoverBackground}"/>
  99. <Setter TargetName="InnerBorder" Property="BorderBrush" Value="#f3f6fb"/>
  100. <Setter TargetName="OuterBorder" Property="BorderBrush" Value="#BBaabcd3"/>
  101. </Trigger>
  102. <Trigger Property="IsPressed" Value="True">
  103. <Setter TargetName="InnerBorder" Property="Background" Value="{StaticResource AeroToolbarButtonClickBackground}"/>
  104. <Setter TargetName="InnerBorder" Property="BorderBrush" Value="Transparent"/>
  105. <Setter TargetName="OuterBorder" Property="BorderBrush" Value="#bbaabcd5"/>
  106. </Trigger>
  107. <Trigger Property="IsKeyboardFocused" Value="True">
  108. <Setter TargetName="InnerBorder" Property="Background" Value="Transparent"/>
  109. <Setter TargetName="InnerBorder" Property="BorderBrush" Value="#f3f6fb"/>
  110. <Setter TargetName="OuterBorder" Property="BorderBrush" Value="#BBaabcd3"/>
  111. </Trigger>
  112. </ControlTemplate.Triggers>
  113. </ControlTemplate>
  114. </Setter.Value>
  115. </Setter>
  116. </Style>
  117. <Style TargetType="Button" x:Key="ClassicToolbarButtonStyle">
  118. <Setter Property="Padding" Value="13,0,13,0"/>
  119. <Style.Triggers>
  120. <Trigger Property="IsMouseOver" Value="False">
  121. <Setter Property="BorderBrush" Value="{x:Null}"/>
  122. </Trigger>
  123. </Style.Triggers>
  124. </Style>
  125. <Style TargetType="Button" x:Key="ClassicToolbarSmallButtonStyle">
  126. <Setter Property="Padding" Value="5,0,5,0"/>
  127. <Style.Triggers>
  128. <Trigger Property="IsMouseOver" Value="False">
  129. <Setter Property="BorderBrush" Value="{x:Null}"/>
  130. </Trigger>
  131. </Style.Triggers>
  132. </Style>
  133. <!-- style the playback buttons -->
  134. <Style x:Key="NextButtonStyle" TargetType="Button">
  135. <Setter Property="Template">
  136. <Setter.Value>
  137. <ControlTemplate TargetType="{x:Type Button}">
  138. <Grid>
  139. <Image x:Name="NextButton" Source="Images\Buttons\Next.png" Width="29" Height="38"/>
  140. <Image x:Name="NextButtonShine" Source="Images\Buttons\Next Shine.png" Width="29" Height="38" Visibility="Hidden"/>
  141. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
  142. </Grid>
  143. <ControlTemplate.Triggers>
  144. <Trigger Property="IsMouseOver" Value="True">
  145. <Setter Property="Visibility" TargetName="NextButtonShine" Value="Visible"/>
  146. <Setter Property="Visibility" TargetName="NextButton" Value="Hidden"/>
  147. <Setter Property="Cursor" Value="Hand"/>
  148. </Trigger>
  149. </ControlTemplate.Triggers>
  150. </ControlTemplate>
  151. </Setter.Value>
  152. </Setter>
  153. </Style>
  154. <Style x:Key="PreviousButtonStyle" TargetType="Button">
  155. <Setter Property="Template">
  156. <Setter.Value>
  157. <ControlTemplate TargetType="{x:Type Button}">
  158. <Grid>
  159. <Image x:Name="PreviousButton" Source="Images\Buttons\Previous.png" Width="29" Height="38"/>
  160. <Image x:Name="PreviousButtonShine" Source="Images\Buttons\Previous Shine.png" Width="29" Height="38" Visibility="Hidden"/>
  161. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
  162. </Grid>
  163. <ControlTemplate.Triggers>
  164. <Trigger Property="IsMouseOver" Value="True">
  165. <Setter Property="Visibility" TargetName="PreviousButtonShine" Value="Visible"/>
  166. <Setter Property="Visibility" TargetName="PreviousButton" Value="Hidden"/>
  167. <Setter Property="Cursor" Value="Hand"/>
  168. </Trigger>
  169. </ControlTemplate.Triggers>
  170. </ControlTemplate>
  171. </Setter.Value>
  172. </Setter>
  173. </Style>
  174. <Style x:Key="PlayButtonStyle" TargetType="Button">
  175. <Setter Property="Template">
  176. <Setter.Value>
  177. <ControlTemplate TargetType="{x:Type Button}">
  178. <Grid>
  179. <Image x:Name="PlayButton" Source="Images\Buttons\Play.png" Width="38" Height="38"/>
  180. <Image x:Name="PlayButtonShine" Source="Images\Buttons\Play Shine.png" Width="38" Height="38" Visibility="Hidden"/>
  181. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
  182. </Grid>
  183. <ControlTemplate.Triggers>
  184. <Trigger Property="IsMouseOver" Value="True">
  185. <Setter Property="Visibility" TargetName="PlayButtonShine" Value="Visible"/>
  186. <Setter Property="Visibility" TargetName="PlayButton" Value="Hidden"/>
  187. <Setter Property="Cursor" Value="Hand"/>
  188. </Trigger>
  189. </ControlTemplate.Triggers>
  190. </ControlTemplate>
  191. </Setter.Value>
  192. </Setter>
  193. </Style>
  194. <Style x:Key="PauseButtonStyle" TargetType="Button">
  195. <Setter Property="Template">
  196. <Setter.Value>
  197. <ControlTemplate TargetType="{x:Type Button}">
  198. <Grid>
  199. <Image x:Name="PauseButton" Source="Images\Buttons\Pause.png" Width="38" Height="38"/>
  200. <Image x:Name="PauseButtonShine" Source="Images\Buttons\Pause Shine.png" Width="38" Height="38" Visibility="Hidden"/>
  201. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
  202. </Grid>
  203. <ControlTemplate.Triggers>
  204. <Trigger Property="IsMouseOver" Value="True">
  205. <Setter Property="Visibility" TargetName="PauseButtonShine" Value="Visible"/>
  206. <Setter Property="Visibility" TargetName="PauseButton" Value="Hidden"/>
  207. <Setter Property="Cursor" Value="Hand"/>
  208. </Trigger>
  209. </ControlTemplate.Triggers>
  210. </ControlTemplate>
  211. </Setter.Value>
  212. </Setter>
  213. </Style>
  214. <!-- style the shuffe and repeat buttons -->
  215. <Style x:Key="RepeatAllButtonStyle" TargetType="Button">
  216. <Setter Property="Template">
  217. <Setter.Value>
  218. <ControlTemplate TargetType="{x:Type Button}">
  219. <Grid>
  220. <Image x:Name="RepeatButton" Source="Images\Buttons\Repeat All.png" Width="20" Height="20"/>
  221. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
  222. </Grid>
  223. <ControlTemplate.Triggers>
  224. <Trigger Property="IsMouseOver" Value="True">
  225. <Setter Property="Cursor" Value="Hand"/>
  226. </Trigger>
  227. </ControlTemplate.Triggers>
  228. </ControlTemplate>
  229. </Setter.Value>
  230. </Setter>
  231. </Style>
  232. <Style x:Key="RepeatOneButtonStyle" TargetType="Button">
  233. <Setter Property="Template">
  234. <Setter.Value>
  235. <ControlTemplate TargetType="{x:Type Button}">
  236. <Grid>
  237. <Image x:Name="RepeatButton" Source="Images\Buttons\Repeat One.png" Width="20" Height="20"/>
  238. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
  239. </Grid>
  240. <ControlTemplate.Triggers>
  241. <Trigger Property="IsMouseOver" Value="True">
  242. <Setter Property="Cursor" Value="Hand"/>
  243. </Trigger>
  244. </ControlTemplate.Triggers>
  245. </ControlTemplate>
  246. </Setter.Value>
  247. </Setter>
  248. </Style>
  249. <Style x:Key="RepeatGrayButtonStyle" TargetType="Button">
  250. <Setter Property="Template">
  251. <Setter.Value>
  252. <ControlTemplate TargetType="{x:Type Button}">
  253. <Grid>
  254. <Image x:Name="RepeatButton" Source="Images\Buttons\Repeat Gray.png" Width="20" Height="20"/>
  255. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
  256. </Grid>
  257. <ControlTemplate.Triggers>
  258. <Trigger Property="IsMouseOver" Value="True">
  259. <Setter Property="Cursor" Value="Hand"/>
  260. </Trigger>
  261. </ControlTemplate.Triggers>
  262. </ControlTemplate>
  263. </Setter.Value>
  264. </Setter>
  265. </Style>
  266. <Style x:Key="ShuffleButtonStyle" TargetType="Button">
  267. <Setter Property="Template">
  268. <Setter.Value>
  269. <ControlTemplate TargetType="{x:Type Button}">
  270. <Grid>
  271. <Image x:Name="ShuffleButton" Source="Images\Buttons\Shuffle.png" Width="20" Height="20"/>
  272. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
  273. </Grid>
  274. <ControlTemplate.Triggers>
  275. <Trigger Property="IsMouseOver" Value="True">
  276. <Setter Property="Cursor" Value="Hand"/>
  277. </Trigger>
  278. </ControlTemplate.Triggers>
  279. </ControlTemplate>
  280. </Setter.Value>
  281. </Setter>
  282. </Style>
  283. <Style x:Key="ShuffleGrayButtonStyle" TargetType="Button">
  284. <Setter Property="Template">
  285. <Setter.Value>
  286. <ControlTemplate TargetType="{x:Type Button}">
  287. <Grid>
  288. <Image x:Name="ShuffleButton" Source="Images\Buttons\Shuffle Gray.png" Width="20" Height="20"/>
  289. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
  290. </Grid>
  291. <ControlTemplate.Triggers>
  292. <Trigger Property="IsMouseOver" Value="True">
  293. <Setter Property="Cursor" Value="Hand"/>
  294. </Trigger>
  295. </ControlTemplate.Triggers>
  296. </ControlTemplate>
  297. </Setter.Value>
  298. </Setter>
  299. </Style>
  300. <!-- style the details pane -->
  301. <SolidColorBrush x:Key="DetailsTitle" Color="Black"/>
  302. <SolidColorBrush x:Key="DetailsDescription" Color="#5A6779"/>
  303. <SolidColorBrush x:Key="DetailsPaneKey" Color="#766790"/>
  304. <SolidColorBrush x:Key="DetailsPaneValue" Color="#1E395B"/>
  305. <Style x:Key="AeroDetailsPaneStyle" TargetType="StatusBar">
  306. <Setter Property="Background" Value="#f1f5fb"/>
  307. <Setter Property="Foreground" Value="#1e395b"/>
  308. <Setter Property="Padding" Value="5"/>
  309. <Setter Property="BorderThickness" Value="0"/>
  310. </Style>
  311. <SolidColorBrush x:Key="ClassicDetailsPaneBackground" Color="White"/>
  312. <Style x:Key="ClassicDetailsPaneStyle" TargetType="StatusBar">
  313. <Setter Property="Padding" Value="5"/>
  314. <Setter Property="BorderThickness" Value="0 2 0 0"/>
  315. <Setter Property="Background" Value="{DynamicResource ClassicDetailsPaneBackground}"/>
  316. </Style>
  317. <ControlTemplate x:Key="CurrentTrackTemplate" TargetType="{x:Type ListViewItem}">
  318. <StackPanel>
  319. <GridViewRowPresenter Content="{TemplateBinding Content}" Columns="{TemplateBinding GridView.ColumnCollection}">
  320. <GridViewRowPresenter.Resources>
  321. <Style TargetType="{x:Type TextBlock}">
  322. <Setter Property="FontWeight" Value="Bold"/>
  323. </Style>
  324. </GridViewRowPresenter.Resources>
  325. </GridViewRowPresenter>
  326. </StackPanel>
  327. </ControlTemplate>
  328. <!-- style the track info pane -->
  329. <SolidColorBrush x:Key="InfoPaneTitle" Color="#006e12"/>
  330. <SolidColorBrush x:Key="InfoPaneText" Color="#FF5A6779"/>
  331. <!-- style the track list -->
  332. <Style x:Key="AeroTrackListHeaderStyle" TargetType="{x:Type GridViewColumnHeader}">
  333. <Setter Property="Background" Value="{x:Null}"/>
  334. <Setter Property="Foreground" Value="#FF5A6779"/>
  335. <Setter Property="BorderBrush" Value="{x:Null}"/>
  336. <Setter Property="HorizontalContentAlignment" Value="Left"/>
  337. </Style>
  338. <Style x:Key="AeroTrackListStyle" TargetType="{x:Type ListView}">
  339. <Setter Property="Background" Value="White"/>
  340. <Setter Property="BorderBrush" Value="#d6e5f5"/>
  341. <Setter Property="BorderThickness" Value="0 1 0 0"/>
  342. </Style>
  343. <LinearGradientBrush x:Key="ColumnHeaderThumbBackground" StartPoint="0,0" EndPoint="0,1">
  344. <GradientStop Color="#d6e5f5" Offset="0.0" />
  345. <GradientStop Color="White" Offset="1.0" />
  346. </LinearGradientBrush>
  347. <Style x:Key="ClassicTrackListHeaderStyle" TargetType="{x:Type GridViewColumnHeader}">
  348. <Setter Property="HorizontalContentAlignment" Value="Left"/>
  349. </Style>
  350. <Style x:Key="ClassicTrackListStyle" TargetType="{x:Type ListView}">
  351. <Setter Property="BorderBrush" Value="{x:Null}"/>
  352. <Setter Property="BorderThickness" Value="0"/>
  353. </Style>
  354. <Style x:Key="AeroTrackListHeaderThumbStyle" TargetType="{x:Type Thumb}">
  355. <Setter Property="Canvas.Right" Value="-8"/>
  356. <Setter Property="Canvas.Top" Value="-1"/>
  357. <Setter Property="Width" Value="18"/>
  358. <Setter Property="Height" Value="{Binding ActualHeight, RelativeSource={RelativeSource TemplatedParent}}"/>
  359. <Setter Property="Padding" Value="0"/>
  360. <Setter Property="Background" Value="Transparent"/>
  361. <Setter Property="Template">
  362. <Setter.Value>
  363. <ControlTemplate TargetType="{x:Type Thumb}">
  364. <Border Background="#00F90000" Padding="0" BorderThickness="1">
  365. <Rectangle x:Name="HeaderThumb" Fill="{StaticResource ColumnHeaderThumbBackground}" HorizontalAlignment="Center" Width="1"/>
  366. </Border>
  367. </ControlTemplate>
  368. </Setter.Value>
  369. </Setter>
  370. </Style>
  371. <Style x:Key="AeroTrackListHeaderThumbHoverStyle" TargetType="{x:Type Thumb}">
  372. <Setter Property="Canvas.Right" Value="-8"/>
  373. <Setter Property="Canvas.Top" Value="-1"/>
  374. <Setter Property="Width" Value="18"/>
  375. <Setter Property="Height" Value="{Binding ActualHeight, RelativeSource={RelativeSource TemplatedParent}}"/>
  376. <Setter Property="Padding" Value="0"/>
  377. <Setter Property="Background" Value="Transparent"/>
  378. <Setter Property="Template">
  379. <Setter.Value>
  380. <ControlTemplate TargetType="{x:Type Thumb}">
  381. <Border Background="#00F90000" Padding="0" BorderThickness="1">
  382. <Rectangle x:Name="HeaderThumb" Fill="#FFe2e8f1" HorizontalAlignment="Center" Width="1"/>
  383. </Border>
  384. </ControlTemplate>
  385. </Setter.Value>
  386. </Setter>
  387. </Style>
  388. <ControlTemplate x:Key="AeroTrackListHeaderTemplateLeft" TargetType="{x:Type GridViewColumnHeader}">
  389. <Grid>
  390. <Border BorderBrush="Transparent" Background="Transparent" BorderThickness="1,0,1,1" x:Name="OuterBorder" SnapsToDevicePixels="True">
  391. <Border BorderBrush="Transparent" BorderThickness="0,1,0,0" Background="Transparent" x:Name="InnerBorder"
  392. Margin="1,0,1,1" Padding="0" SnapsToDevicePixels="True">
  393. <ContentPresenter
  394. x:Name="HeaderContent"
  395. Margin="0"
  396. Content="{TemplateBinding Content}"
  397. HorizontalAlignment="Left"
  398. ContentStringFormat="{TemplateBinding ContentStringFormat}"
  399. ContentTemplate="{TemplateBinding ContentTemplate}"/>
  400. </Border>
  401. </Border>
  402. <Canvas>
  403. <Thumb x:Name="PART_HeaderGripper" Style="{StaticResource AeroTrackListHeaderThumbStyle}"/>
  404. </Canvas>
  405. </Grid>
  406. <ControlTemplate.Triggers>
  407. <Trigger Property="IsMouseOver" Value="True">
  408. <Setter TargetName="OuterBorder" Property="BorderBrush" Value="#e2e8f1"/>
  409. <Setter TargetName="InnerBorder" Property="Background" Value="#f5f7fa"/>
  410. <Setter TargetName="InnerBorder" Property="BorderBrush" Value="#f5f7fa"/>
  411. <Setter TargetName="PART_HeaderGripper" Property="Style" Value="{StaticResource AeroTrackListHeaderThumbHoverStyle}"/>
  412. </Trigger>
  413. </ControlTemplate.Triggers>
  414. </ControlTemplate>
  415. <ControlTemplate x:Key="AeroTrackListHeaderTemplateRight" TargetType="{x:Type GridViewColumnHeader}">
  416. <Grid>
  417. <Border BorderBrush="Transparent" Background="Transparent" BorderThickness="1,0,1,1" x:Name="OuterBorder" SnapsToDevicePixels="True">
  418. <Border BorderBrush="Transparent" BorderThickness="0,1,0,0" Background="Transparent" x:Name="InnerBorder"
  419. Margin="1,0,1,1" Padding="0" SnapsToDevicePixels="True">
  420. <ContentPresenter
  421. x:Name="HeaderContent"
  422. Margin="0"
  423. Content="{TemplateBinding Content}"
  424. HorizontalAlignment="Right"
  425. ContentStringFormat="{TemplateBinding ContentStringFormat}"
  426. ContentTemplate="{TemplateBinding ContentTemplate}"/>
  427. </Border>
  428. </Border>
  429. <Canvas>
  430. <Thumb x:Name="PART_HeaderGripper" Style="{StaticResource AeroTrackListHeaderThumbStyle}"/>
  431. </Canvas>
  432. </Grid>
  433. <ControlTemplate.Triggers>
  434. <Trigger Property="IsMouseOver" Value="True">
  435. <Setter TargetName="OuterBorder" Property="BorderBrush" Value="#e2e8f1"/>
  436. <Setter TargetName="InnerBorder" Property="Background" Value="#f5f7fa"/>
  437. <Setter TargetName="InnerBorder" Property="BorderBrush" Value="#f5f7fa"/>
  438. <Setter TargetName="PART_HeaderGripper" Property="Style" Value="{StaticResource AeroTrackListHeaderThumbHoverStyle}"/>
  439. </Trigger>
  440. </ControlTemplate.Triggers>
  441. </ControlTemplate>
  442. <DataTemplate x:Key="HeaderTemplateArrowUp">
  443. <DockPanel>
  444. <Image Source="\GUI\Images\Misc\SortArrowUp.png" DockPanel.Dock="Top" Width="7" Height="4"/>
  445. <TextBlock Text="{Binding}" DockPanel.Dock="Top" Margin="5,0,3,0" TextTrimming="CharacterEllipsis"/>
  446. </DockPanel>
  447. </DataTemplate>
  448. <DataTemplate x:Key="HeaderTemplateArrowDown">
  449. <DockPanel>
  450. <Image Source="\GUI\Images\Misc\SortArrowDown.png" DockPanel.Dock="Top" Width="7" Height="4"/>
  451. <TextBlock Text="{Binding}" DockPanel.Dock="Top" Margin="5,0,3,0" TextTrimming="CharacterEllipsis"/>
  452. </DockPanel>
  453. </DataTemplate>
  454. <DataTemplate x:Key="HeaderTemplate">
  455. <TextBlock Text="{Binding}" Margin="5,4,3,0" TextTrimming="CharacterEllipsis"/>
  456. </DataTemplate>
  457. <DataTemplate x:Key="CommonTemplate">
  458. <TextBlock HorizontalAlignment="Left"
  459. VerticalAlignment="Center"
  460. TextTrimming="CharacterEllipsis"
  461. Foreground="Gray"
  462. Text="{Binding}"/>
  463. </DataTemplate>
  464. <DataTemplate x:Key="CommonActiveTemplate">
  465. <TextBlock
  466. HorizontalAlignment="Left"
  467. VerticalAlignment="Center"
  468. TextTrimming="CharacterEllipsis"
  469. Foreground="Black"
  470. Text="{Binding}"/>
  471. </DataTemplate>
  472. <DataTemplate x:Key="NumberCellTemplate">
  473. <TextBlock Text="{Binding Number}" HorizontalAlignment="Right" Foreground="Gray"/>
  474. </DataTemplate>
  475. <DataTemplate x:Key="TrackCellTemplate">
  476. <ContentControl Content="{Binding Track}" ContentTemplate="{StaticResource CommonTemplate}"/>
  477. </DataTemplate>
  478. <DataTemplate x:Key="ArtistCellTemplate">
  479. <ContentControl Content="{Binding Artist}" ContentTemplate="{StaticResource CommonTemplate}"/>
  480. </DataTemplate>
  481. <DataTemplate x:Key="AlbumCellTemplate">
  482. <ContentControl Content="{Binding Album}" ContentTemplate="{StaticResource CommonTemplate}"/>
  483. </DataTemplate>
  484. <DataTemplate x:Key="TitleCellTemplate">
  485. <ContentControl Content="{Binding Title}" ContentTemplate="{StaticResource CommonTemplate}"/>
  486. </DataTemplate>
  487. <DataTemplate x:Key="GenreCellTemplate">
  488. <ContentControl Content="{Binding Genre}" ContentTemplate="{StaticResource CommonTemplate}"/>
  489. </DataTemplate>
  490. <DataTemplate x:Key="YearCellTemplate">
  491. <ContentControl Content="{Binding Year}" ContentTemplate="{StaticResource CommonTemplate}"/>
  492. </DataTemplate>
  493. <DataTemplate x:Key="LengthCellTemplate">
  494. <TextBlock Text="{Binding Length}" HorizontalAlignment="Right" Foreground="Gray"/>
  495. </DataTemplate>
  496. <DataTemplate x:Key="PathCellTemplate">
  497. <ContentControl Content="{Binding Path}" ContentTemplate="{StaticResource CommonTemplate}"/>
  498. </DataTemplate>
  499. <DataTemplate x:Key="Play_CountCellTemplate">
  500. <TextBlock Text="{Binding Play_Count}" HorizontalAlignment="Right" Foreground="Gray"/>
  501. </DataTemplate>
  502. <DataTemplate x:Key="Last_PlayedCellTemplate">
  503. <ContentControl Content="{Binding Last_Played}" ContentTemplate="{StaticResource CommonTemplate}"/>
  504. </DataTemplate>
  505. <DataTemplate x:Key="NumberActiveCellTemplate">
  506. <TextBlock Text="{Binding Number}" HorizontalAlignment="Right" Foreground="Black"/>
  507. </DataTemplate>
  508. <DataTemplate x:Key="TrackActiveCellTemplate">
  509. <ContentControl Content="{Binding Track}" ContentTemplate="{StaticResource CommonActiveTemplate}"/>
  510. </DataTemplate>
  511. <DataTemplate x:Key="ArtistActiveCellTemplate">
  512. <ContentControl Content="{Binding Artist}" ContentTemplate="{StaticResource CommonActiveTemplate}"/>
  513. </DataTemplate>
  514. <DataTemplate x:Key="AlbumActiveCellTemplate">
  515. <ContentControl Content="{Binding Album}" ContentTemplate="{StaticResource CommonActiveTemplate}"/>
  516. </DataTemplate>
  517. <DataTemplate x:Key="TitleActiveCellTemplate">
  518. <ContentControl Content="{Binding Title}" ContentTemplate="{StaticResource CommonActiveTemplate}"/>
  519. </DataTemplate>
  520. <DataTemplate x:Key="GenreActiveCellTemplate">
  521. <ContentControl Content="{Binding Genre}" ContentTemplate="{StaticResource CommonActiveTemplate}"/>
  522. </DataTemplate>
  523. <DataTemplate x:Key="YearActiveCellTemplate">
  524. <ContentControl Content="{Binding Year}" ContentTemplate="{StaticResource CommonActiveTemplate}"/>
  525. </DataTemplate>
  526. <DataTemplate x:Key="LengthActiveCellTemplate">
  527. <TextBlock Text="{Binding Length}" HorizontalAlignment="Right" Foreground="Black"/>
  528. </DataTemplate>
  529. <DataTemplate x:Key="PathActiveCellTemplate">
  530. <ContentControl Content="{Binding Path}" ContentTemplate="{StaticResource CommonActiveTemplate}"/>
  531. </DataTemplate>
  532. <DataTemplate x:Key="Play_CountActiveCellTemplate">
  533. <TextBlock Text="{Binding Play_Count}" HorizontalAlignment="Right" Foreground="Black"/>
  534. </DataTemplate>
  535. <DataTemplate x:Key="Last_PlayedActiveCellTemplate">
  536. <ContentControl Content="{Binding Last_Played}" ContentTemplate="{StaticResource CommonActiveTemplate}"/>
  537. </DataTemplate>
  538. <Style x:Key="ListViewItemFocusVisual">
  539. <Setter Property="Control.Template">
  540. <Setter.Value>
  541. <ControlTemplate>
  542. <Rectangle RadiusY="2" RadiusX="2" Stroke="#8E6EA6F5" StrokeThickness="1"/>
  543. </ControlTemplate>
  544. </Setter.Value>
  545. </Setter>
  546. </Style>
  547. <LinearGradientBrush x:Key="ListItemActiveFill" EndPoint="0,1" StartPoint="0,0">
  548. <GradientStop Color="#33dbfbdd" Offset="0"/>
  549. <GradientStop Color="#33c1fcc9" Offset="1"/>
  550. </LinearGradientBrush>
  551. <LinearGradientBrush x:Key="ListItemActiveHoverFill" EndPoint="0,1" StartPoint="0,0">
  552. <GradientStop Color="#88dbfbdd" Offset="0"/>
  553. <GradientStop Color="#88c1fcc9" Offset="1"/>
  554. </LinearGradientBrush>
  555. <LinearGradientBrush x:Key="ListItemActiveSelectedFill" EndPoint="0,1" StartPoint="0,0">
  556. <GradientStop Color="#ffdbfbdd" Offset="0"/>
  557. <GradientStop Color="#ffc1fcc9" Offset="1"/>
  558. </LinearGradientBrush>
  559. <LinearGradientBrush x:Key="ListItemHoverFill" EndPoint="0,1" StartPoint="0,0">
  560. <GradientStop Color="#fffafbfd" Offset="0"/>
  561. <GradientStop Color="#ffebf4fd" Offset="1"/>
  562. </LinearGradientBrush>
  563. <LinearGradientBrush x:Key="ListItemSelectedFill" EndPoint="0,1" StartPoint="0,0">
  564. <GradientStop Color="#FFdbebfb" Offset="0"/>
  565. <GradientStop Color="#FFc1dcfa" Offset="1"/>
  566. </LinearGradientBrush>
  567. <LinearGradientBrush x:Key="ListItemSelectedInactiveFill" EndPoint="0,1" StartPoint="0,0">
  568. <GradientStop Color="#fff8f8f8" Offset="0"/>
  569. <GradientStop Color="#ffe5e5e5" Offset="1"/>
  570. </LinearGradientBrush>
  571. <LinearGradientBrush x:Key="ListItemSelectedHoverFill" EndPoint="0,1" StartPoint="0,0">
  572. <GradientStop Color="#77EAF9FF" Offset="0"/>
  573. <GradientStop Color="#77C9EDFD" Offset="1"/>
  574. </LinearGradientBrush>
  575. <Style x:Key="TrackListRowStyle" TargetType="{x:Type ListViewItem}">
  576. <Setter Property="FocusVisualStyle" Value="{StaticResource ListViewItemFocusVisual}"/>
  577. <Setter Property="Background" Value="Transparent"/>
  578. <Setter Property="BorderBrush" Value="Transparent"/>
  579. <Setter Property="BorderThickness" Value="1"/>
  580. <Setter Property="Margin" Value="0,0,0,1"/>
  581. <Setter Property="Padding" Value="5,2,5,2"/>
  582. <Setter Property="VerticalContentAlignment" Value="Center"/>
  583. <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
  584. <Setter Property="Template">
  585. <Setter.Value>
  586. <ControlTemplate TargetType="{x:Type ListViewItem}">
  587. <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="2" SnapsToDevicePixels="true">
  588. <Border x:Name="InnerBorder" BorderThickness="1" CornerRadius="1">
  589. <Grid>
  590. <Grid.RowDefinitions>
  591. <RowDefinition MaxHeight="11"/>
  592. <RowDefinition/>
  593. </Grid.RowDefinitions>
  594. <GridViewRowPresenter Grid.RowSpan="2" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
  595. </GridViewRowPresenter>
  596. </Grid>
  597. </Border>
  598. </Border>
  599. <ControlTemplate.Triggers>
  600. <Trigger Property="IsMouseOver" Value="true">
  601. <Setter Property="Background" Value="{StaticResource ListItemHoverFill}"/>
  602. <Setter Property="BorderBrush" Value="#ffb8d6fa"/>
  603. <Setter Property="BorderBrush" TargetName="InnerBorder" Value="#80FFFFFF"/>
  604. </Trigger>
  605. <Trigger Property="IsSelected" Value="true">
  606. <Setter Property="Background" Value="{StaticResource ListItemSelectedFill}"/>
  607. <Setter Property="BorderBrush" Value="#FF7da2ce"/>
  608. <Setter Property="BorderBrush" TargetName="InnerBorder" Value="#80FFFFFF"/>
  609. </Trigger>
  610. <MultiTrigger>
  611. <MultiTrigger.Conditions>
  612. <Condition Property="IsSelected" Value="true"/>
  613. <Condition Property="Selector.IsSelectionActive" Value="false"/>
  614. </MultiTrigger.Conditions>
  615. <Setter Property="Background" Value="{StaticResource ListItemSelectedInactiveFill}"/>
  616. <Setter Property="BorderBrush" Value="#FFd9d9d9"/>
  617. <Setter Property="BorderBrush" TargetName="InnerBorder" Value="#80FFFFFF"/>
  618. </MultiTrigger>
  619. <MultiTrigger>
  620. <MultiTrigger.Conditions>
  621. <Condition Property="IsSelected" Value="true"/>
  622. <Condition Property="IsMouseOver" Value="true"/>
  623. <Condition Property="Selector.IsSelectionActive" Value="false"/>
  624. </MultiTrigger.Conditions>
  625. <Setter Property="Background" Value="{StaticResource ListItemSelectedFill}"/>
  626. <Setter Property="BorderBrush" Value="#FF7da2ce"/>
  627. <Setter Property="BorderBrush" TargetName="InnerBorder" Value="#80FFFFFF"/>
  628. </MultiTrigger>
  629. <Trigger Property="IsEnabled" Value="false">
  630. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
  631. </Trigger>
  632. </ControlTemplate.Triggers>
  633. </ControlTemplate>
  634. </Setter.Value>
  635. </Setter>
  636. <Style.Triggers>
  637. <DataTrigger Binding="{Binding Path=IsActive}" Value="True">
  638. <Setter Property="Background" Value="{StaticResource ListItemActiveSelectedFill}"/>
  639. <Setter Property="BorderBrush" Value="#FF7dce86"/>
  640. </DataTrigger>
  641. <!--<MultiDataTrigger>
  642. <MultiDataTrigger.Conditions>
  643. <Condition Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListViewItem}}, Path=IsSelected}" Value="True"/>
  644. <Condition Binding="{Binding Path=IsActive}" Value="True"/>
  645. </MultiDataTrigger.Conditions>
  646. <Setter Property="Background" Value="{StaticResource ListItemActiveSelectedFill}"/>
  647. <Setter Property="BorderBrush" Value="#FF7dce86"/>
  648. </MultiDataTrigger>
  649. <MultiDataTrigger>
  650. <MultiDataTrigger.Conditions>
  651. <Condition Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListViewItem}}, Path=IsMouseOver}" Value="True"/>
  652. <Condition Binding="{Binding Path=IsActive}" Value="True"/>
  653. </MultiDataTrigger.Conditions>
  654. <Setter Property="Background" Value="{StaticResource ListItemActiveHoverFill}"/>
  655. <Setter Property="BorderBrush" Value="#BB7dce86"/>
  656. </MultiDataTrigger>-->
  657. </Style.Triggers>
  658. </Style>
  659. <!-- style the tree view -->
  660. <Style x:Key="AeroNavigationStyle" TargetType="TreeViewItem" BasedOn="{StaticResource {x:Type TreeViewItem}}">
  661. <Setter Property="Template">
  662. <Setter.Value>
  663. <ControlTemplate TargetType="TreeViewItem">
  664. <StackPanel>
  665. <Grid>
  666. <Grid.ColumnDefinitions>
  667. <ColumnDefinition Width="*" />
  668. </Grid.ColumnDefinitions>
  669. <Grid.RowDefinitions>
  670. <RowDefinition Height="Auto" />
  671. <RowDefinition />
  672. </Grid.RowDefinitions>
  673. <Border BorderBrush="{TemplateBinding BorderBrush}"
  674. BorderThickness="1"
  675. Background="{TemplateBinding Background}"
  676. CornerRadius="2"
  677. SnapsToDevicePixels="true"
  678. Grid.Column="0"
  679. Grid.ColumnSpan="2"
  680. MinHeight="23"
  681. x:Name="Item">
  682. <Border x:Name="InnerBorder" BorderThickness="1" CornerRadius="1">
  683. <StackPanel x:Name="Panel" Orientation="Horizontal">
  684. <ToggleButton IsChecked="{Binding Path=IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press" Name="Expander">
  685. <ToggleButton.Style>
  686. <Style TargetType="ToggleButton">
  687. <Setter Property="UIElement.Focusable" Value="false" />
  688. <Setter Property="FrameworkElement.Width" Value="16" />
  689. <Setter Property="FrameworkElement.Height" Value="16" />
  690. <Setter Property="Control.Template">
  691. <Setter.Value>
  692. <ControlTemplate TargetType="ToggleButton">
  693. <Border Padding="5,5,5,5" Background="#00FFFFFF" Width="16" Height="16">
  694. <Path Fill="#00FFFFFF" Stroke="#FF989898" Name="ExpandPath">
  695. <Path.Data>
  696. <PathGeometry Figures="M0,0L0,6L6,0z" />
  697. </Path.Data>
  698. <Path.RenderTransform>
  699. <RotateTransform Angle="135" CenterX="3" CenterY="3" />
  700. </Path.RenderTransform>
  701. </Path>
  702. </Border>
  703. <ControlTemplate.Triggers>
  704. <Trigger Property="UIElement.IsMouseOver" Value="True">
  705. <Setter TargetName="ExpandPath" Property="Shape.Stroke" Value="#FF1BBBFA" />
  706. <Setter TargetName="ExpandPath" Property="Shape.Fill" Value="#00FFFFFF" />
  707. </Trigger>
  708. <Trigger Property="ToggleButton.IsChecked" Value="True">
  709. <Setter TargetName="ExpandPath" Property="UIElement.RenderTransform">
  710. <Setter.Value>
  711. <RotateTransform Angle="180" CenterX="3" CenterY="3" />
  712. </Setter.Value>
  713. </Setter>
  714. <Setter TargetName="ExpandPath" Property="Shape.Fill" Value="#FF595959" />
  715. <Setter TargetName="ExpandPath" Property="Shape.Stroke" Value="#FF262626" />
  716. </Trigger>
  717. </ControlTemplate.Triggers>
  718. </ControlTemplate>
  719. </Setter.Value>
  720. </Setter>
  721. </Style>
  722. </ToggleButton.Style>
  723. </ToggleButton>
  724. <Border x:Name="Bd"
  725. HorizontalAlignment="Stretch"
  726. BorderThickness="{TemplateBinding Border.BorderThickness}"
  727. BorderBrush="{TemplateBinding Border.BorderBrush}"
  728. Padding="{TemplateBinding Control.Padding}"
  729. Background="{TemplateBinding Panel.Background}"
  730. SnapsToDevicePixels="True">
  731. <ContentPresenter x:Name="PART_Header"
  732. Content="{TemplateBinding HeaderedContentControl.Header}"
  733. ContentTemplate="{TemplateBinding HeaderedContentControl.HeaderTemplate}"
  734. ContentStringFormat="{TemplateBinding HeaderedItemsControl.HeaderStringFormat}"
  735. ContentTemplateSelector="{TemplateBinding HeaderedItemsControl.HeaderTemplateSelector}"
  736. ContentSource="Header"
  737. HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
  738. VerticalAlignment="Center"
  739. SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
  740. </Border>
  741. </StackPanel>
  742. </Border>
  743. </Border>
  744. <Border Padding="0 0 0 0" Grid.Column="0" Grid.Row="1">
  745. <ItemsPresenter x:Name="ItemsHost"/>
  746. </Border>
  747. </Grid>
  748. </StackPanel>
  749. <ControlTemplate.Triggers>
  750. <Trigger Property="TreeViewItem.IsExpanded" Value="False">
  751. <Setter TargetName="ItemsHost" Property="UIElement.Visibility" Value="Collapsed" />
  752. </Trigger>
  753. <Trigger Property="ItemsControl.HasItems" Value="False">
  754. <Setter TargetName="Expander" Property="UIElement.Visibility" Value="Hidden" />
  755. </Trigger>
  756. <Trigger Property="IsMouseOver" Value="true" SourceName="Item">
  757. <Setter Property="Background" Value="{StaticResource ListItemHoverFill}"/>
  758. <Setter Property="BorderBrush" Value="#ffb8d6fa"/>
  759. <Setter Property="BorderBrush" TargetName="InnerBorder" Value="#80FFFFFF"/>
  760. </Trigger>
  761. <Trigger Property="TreeViewItem.IsSelected" Value="true">
  762. <Setter Property="Background" Value="{StaticResource ListItemSelectedFill}"/>
  763. <Setter Property="BorderBrush" Value="#FF7da2ce"/>
  764. <Setter Property="BorderBrush" TargetName="InnerBorder" Value="#80FFFFFF"/>
  765. </Trigger>
  766. <MultiTrigger>
  767. <MultiTrigger.Conditions>
  768. <Condition Property="TreeViewItem.IsSelected" Value="true"/>
  769. <Condition Property="Selector.IsSelectionActive" Value="false"/>
  770. </MultiTrigger.Conditions>
  771. <Setter Property="Background" Value="{StaticResource ListItemSelectedInactiveFill}"/>
  772. <Setter Property="BorderBrush" Value="#FFd9d9d9"/>
  773. <Setter Property="BorderBrush" TargetName="InnerBorder" Value="#80FFFFFF"/>
  774. </MultiTrigger>
  775. <Trigger Property="UIElement.IsEnabled" Value="false">
  776. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
  777. </Trigger>
  778. </ControlTemplate.Triggers>
  779. </ControlTemplate>
  780. </Setter.Value>
  781. </Setter>
  782. </Style>
  783. <Style x:Key="ClassicNavigationStyle" TargetType="TreeViewItem" BasedOn="{StaticResource {x:Type TreeViewItem}}">
  784. <Setter Property="Template">
  785. <Setter.Value>
  786. <ControlTemplate TargetType="TreeViewItem">
  787. <StackPanel>
  788. <Grid>
  789. <Grid.ColumnDefinitions>
  790. <ColumnDefinition Width="*" />
  791. </Grid.ColumnDefinitions>
  792. <Grid.RowDefinitions>
  793. <RowDefinition Height="Auto" />
  794. <RowDefinition />
  795. </Grid.RowDefinitions>
  796. <Border BorderBrush="{TemplateBinding BorderBrush}"
  797. BorderThickness="1"
  798. Background="{TemplateBinding Background}"
  799. CornerRadius="0"
  800. SnapsToDevicePixels="true"
  801. Grid.Column="0"
  802. Grid.ColumnSpan="2"
  803. MinHeight="23"
  804. x:Name="Item">
  805. <Border x:Name="InnerBorder" BorderThickness="1" CornerRadius="0">
  806. <StackPanel x:Name="Panel" Orientation="Horizontal">
  807. <ToggleButton IsChecked="{Binding Path=IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press" Name="Expander">
  808. <ToggleButton.Style>
  809. <Style TargetType="ToggleButton">
  810. <Setter Property="UIElement.Focusable" Value="false" />
  811. <Setter Property="FrameworkElement.Width" Value="16" />
  812. <Setter Property="FrameworkElement.Height" Value="16" />
  813. <Setter Property="Control.Template">
  814. <Setter.Value>
  815. <ControlTemplate TargetType="ToggleButton">
  816. <Border Padding="5,5,5,5" Background="#00FFFFFF" Width="16" Height="16">
  817. <Path Fill="#00FFFFFF" Stroke="#FF989898" Name="ExpandPath">
  818. <Path.Data>
  819. <PathGeometry Figures="M0,0L0,6L6,0z" />
  820. </Path.Data>
  821. <Path.RenderTransform>
  822. <RotateTransform Angle="135" CenterX="3" CenterY="3" />
  823. </Path.RenderTransform>
  824. </Path>
  825. </Border>
  826. <ControlTemplate.Triggers>
  827. <Trigger Property="UIElement.IsMouseOver" Value="True">
  828. <Setter TargetName="ExpandPath" Property="Shape.Stroke" Value="#FF1BBBFA" />
  829. <Setter TargetName="ExpandPath" Property="Shape.Fill" Value="#00FFFFFF" />
  830. </Trigger>
  831. <Trigger Property="ToggleButton.IsChecked" Value="True">
  832. <Setter TargetName="ExpandPath" Property="UIElement.RenderTransform">
  833. <Setter.Value>
  834. <RotateTransform Angle="180" CenterX="3" CenterY="3" />
  835. </Setter.Value>
  836. </Setter>
  837. <Setter TargetName="ExpandPath" Property="Shape.Fill" Value="#FF595959" />
  838. <Setter TargetName="ExpandPath" Property="Shape.Stroke" Value="#FF262626" />
  839. </Trigger>
  840. </ControlTemplate.Triggers>
  841. </ControlTemplate>
  842. </Setter.Value>
  843. </Setter>
  844. </Style>
  845. </ToggleButton.Style>
  846. </ToggleButton>
  847. <Border x:Name="Bd"
  848. HorizontalAlignment="Stretch"
  849. BorderThickness="{TemplateBinding Border.BorderThickness}"
  850. BorderBrush="{TemplateBinding Border.BorderBrush}"
  851. Padding="{TemplateBinding Control.Padding}"
  852. Background="{TemplateBinding Panel.Background}"
  853. SnapsToDevicePixels="True">
  854. <ContentPresenter x:Name="PART_Header"
  855. Content="{TemplateBinding HeaderedContentControl.Header}"
  856. ContentTemplate="{TemplateBinding HeaderedContentControl.HeaderTemplate}"
  857. ContentStringFormat="{TemplateBinding HeaderedItemsControl.HeaderStringFormat}"
  858. ContentTemplateSelector="{TemplateBinding HeaderedItemsControl.HeaderTemplateSelector}"
  859. ContentSource="Header"
  860. HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
  861. VerticalAlignment="Center"
  862. SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
  863. </Border>
  864. </StackPanel>
  865. </Border>
  866. </Border>
  867. <Border Padding="0 0 0 0" Grid.Column="0" Grid.Row="1">
  868. <ItemsPresenter x:Name="ItemsHost"/>
  869. </Border>
  870. </Grid>
  871. </StackPanel>
  872. <ControlTemplate.Triggers>
  873. <Trigger Property="TreeViewItem.IsExpanded" Value="False">
  874. <Setter TargetName="ItemsHost" Property="UIElement.Visibility" Value="Collapsed" />
  875. </Trigger>
  876. <Trigger Property="ItemsControl.HasItems" Value="False">
  877. <Setter TargetName="Expander" Property="UIElement.Visibility" Value="Hidden" />
  878. </Trigger>
  879. <Trigger Property="TreeViewItem.IsSelected" Value="true">
  880. <Setter Property="Background" Value="MidnightBlue"/>
  881. <Setter Property="Foreground" Value="White"/>
  882. </Trigger>
  883. <MultiTrigger>
  884. <MultiTrigger.Conditions>
  885. <Condition Property="TreeViewItem.IsSelected" Value="true"/>
  886. <Condition Property="Selector.IsSelectionActive" Value="false"/>
  887. </MultiTrigger.Conditions>
  888. <Setter Property="Background" Value="LightGray"/>
  889. </MultiTrigger>
  890. <Trigger Property="UIElement.IsEnabled" Value="false">
  891. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
  892. </Trigger>
  893. </ControlTemplate.Triggers>
  894. </ControlTemplate>
  895. </Setter.Value>
  896. </Setter>
  897. </Style>
  898. <!-- style the volume and track slide -->
  899. <SolidColorBrush x:Key="HorizontalSliderTrackNormalBackground" Color="Transparent"/>
  900. <LinearGradientBrush x:Key="HorizontalSliderTrackNormalBorder" EndPoint="0,1" StartPoint="0,0">
  901. <GradientStop Color="#FFAEB1AF" Offset="0.1"/>
  902. <GradientStop Color="White" Offset=".9"/>
  903. </LinearGradientBrush>
  904. <Style x:Key="SliderRepeatButtonColorStyle" TargetType="{x:Type RepeatButton}">
  905. <Setter Property="OverridesDefaultStyle" Value="true"/>
  906. <Setter Property="IsTabStop" Value="false"/>
  907. <Setter Property="Focusable" Value="false"/>
  908. <Setter Property="Template">
  909. <Setter.Value>
  910. <ControlTemplate TargetType="{x:Type RepeatButton}">
  911. <Rectangle Fill="#797a7a" Height="2"/>
  912. </ControlTemplate>
  913. </Setter.Value>
  914. </Setter>
  915. </Style>
  916. <Style x:Key="SliderRepeatButtonStyle" TargetType="{x:Type RepeatButton}">
  917. <Setter Property="OverridesDefaultStyle" Value="true"/>
  918. <Setter Property="IsTabStop" Value="false"/>
  919. <Setter Property="Focusable" Value="false"/>
  920. <Setter Property="Template">
  921. <Setter.Value>
  922. <ControlTemplate TargetType="{x:Type RepeatButton}">
  923. <Rectangle Fill="Transparent"/>
  924. </ControlTemplate>
  925. </Setter.Value>
  926. </Setter>
  927. </Style>
  928. <Style x:Key="OrbThumbStyle" TargetType="{x:Type Thumb}">
  929. <Setter Property="Focusable" Value="false"/>
  930. <Setter Property="OverridesDefaultStyle" Value="true"/>
  931. <Setter Property="Height" Value="22"/>
  932. <Setter Property="Width" Value="11"/>
  933. <Setter Property="Foreground" Value="Gray"/>
  934. <Setter Property="Template">
  935. <Setter.Value>
  936. <ControlTemplate TargetType="{x:Type Thumb}">
  937. <Image Source="Images\Buttons\Small Orb.png"/>
  938. <ControlTemplate.Triggers>
  939. <Trigger Property="IsMouseOver" Value="true">
  940. </Trigger>
  941. </ControlTemplate.Triggers>
  942. </ControlTemplate>
  943. </Setter.Value>
  944. </Setter>
  945. </Style>
  946. <Style x:Key="MiniThumbStyle" TargetType="{x:Type Thumb}">
  947. <Setter Property="Focusable" Value="false"/>
  948. <Setter Property="OverridesDefaultStyle" Value="true"/>
  949. <Setter Property="Height" Value="6"/>
  950. <Setter Property="Width" Value="4"/>
  951. <Setter Property="Foreground" Value="Gray"/>
  952. <Setter Property="Template">
  953. <Setter.Value>
  954. <ControlTemplate TargetType="{x:Type Thumb}">
  955. <Rectangle Height="4" Width="4" Fill="#595a5a"/>
  956. <ControlTemplate.Triggers>
  957. <Trigger Property="IsMouseOver" Value="true">
  958. </Trigger>
  959. </ControlTemplate.Triggers>
  960. </ControlTemplate>
  961. </Setter.Value>
  962. </Setter>
  963. </Style>
  964. <Style x:Key="VolumeSlideStyle" TargetType="{x:Type Slider}">
  965. <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
  966. <Setter Property="Background" Value="Transparent"/>
  967. <Setter Property="Foreground" Value="#FFC4C4C4"/>
  968. <Setter Property="Template">
  969. <Setter.Value>
  970. <ControlTemplate TargetType="{x:Type Slider}">
  971. <Border SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
  972. <Grid>
  973. <Grid.RowDefinitions>
  974. <RowDefinition Height="Auto"/>
  975. <RowDefinition Height="Auto" MinHeight="{TemplateBinding MinHeight}"/>
  976. <RowDefinition Height="Auto"/>
  977. </Grid.RowDefinitions>
  978. <Border x:Name="TrackBackground" Margin="0" VerticalAlignment="center" Height="4.0" Grid.Row="1" Background="{StaticResource HorizontalSliderTrackNormalBackground}" BorderBrush="{StaticResource HorizontalSliderTrackNormalBorder}" BorderThickness="1" CornerRadius="1">
  979. <Canvas Margin="-6,-1">
  980. <Rectangle x:Name="PART_SelectionRange" Fill="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" Stroke="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" StrokeThickness="1.0" Height="4.0" Visibility="Hidden"/>
  981. </Canvas>
  982. </Border>
  983. <Track x:Name="PART_Track" Grid.Row="1">
  984. <Track.DecreaseRepeatButton>
  985. <RepeatButton Style="{StaticResource SliderRepeatButtonStyle}" Command="{x:Static Slider.DecreaseLarge}"/>
  986. </Track.DecreaseRepeatButton>
  987. <Track.IncreaseRepeatButton>
  988. <RepeatButton Style="{StaticResource SliderRepeatButtonStyle}" Command="{x:Static Slider.IncreaseLarge}"/>
  989. </Track.IncreaseRepeatButton>
  990. <Track.Thumb>
  991. <Thumb x:Name="Thumb" Style="{StaticResource OrbThumbStyle}"/>
  992. </Track.Thumb>
  993. </Track>
  994. </Grid>
  995. </Border>
  996. </ControlTemplate>
  997. </Setter.Value>
  998. </Setter>
  999. </Style>
  1000. <Style x:Key="TrackSlideStyle" TargetType="{x:Type Slider}">
  1001. <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
  1002. <Setter Property="Background" Value="Transparent"/>
  1003. <Setter Property="Foreground" Value="#FFC4C4C4"/>
  1004. <Setter Property="Template">
  1005. <Setter.Value>
  1006. <ControlTemplate TargetType="{x:Type Slider}">
  1007. <Border SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
  1008. <Grid>
  1009. <Grid.RowDefinitions>
  1010. <RowDefinition Height="Auto"/>
  1011. <RowDefinition Height="Auto" MinHeight="{TemplateBinding MinHeight}"/>
  1012. <RowDefinition Height="Auto"/>
  1013. </Grid.RowDefinitions>
  1014. <Border x:Name="TrackBackground" Margin="0,0" VerticalAlignment="center" Height="4.0" Grid.Row="1" Background="{StaticResource HorizontalSliderTrackNormalBackground}" BorderBrush="{StaticResource HorizontalSliderTrackNormalBorder}" BorderThickness="1" CornerRadius="1">
  1015. <Canvas Margin="-6,-1">
  1016. <Rectangle x:Name="PART_SelectionRange" Fill="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" Stroke="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" StrokeThickness="1.0" Height="4.0" Visibility="Hidden"/>
  1017. </Canvas>
  1018. </Border>
  1019. <Track x:Name="PART_Track" Grid.Row="1">
  1020. <Track.DecreaseRepeatButton>
  1021. <RepeatButton Style="{StaticResource SliderRepeatButtonColorStyle}" Command="{x:Static Slider.DecreaseLarge}"/>
  1022. </Track.DecreaseRepeatButton>
  1023. <Track.IncreaseRepeatButton>
  1024. <RepeatButton Style="{StaticResource SliderRepeatButtonStyle}" Command="{x:Static Slider.IncreaseLarge}"/>
  1025. </Track.IncreaseRepeatButton>
  1026. <Track.Thumb>
  1027. <Thumb x:Name="Thumb" Style="{StaticResource MiniThumbStyle}"/>
  1028. </Track.Thumb>
  1029. </Track>
  1030. </Grid>
  1031. </Border>
  1032. </ControlTemplate>
  1033. </Setter.Value>
  1034. </Setter>
  1035. </Style>
  1036. <!-- style the search button -->
  1037. <Style x:Key="SearchButtonStyle" TargetType="Button">
  1038. <Setter Property="Template">
  1039. <Setter.Value>
  1040. <ControlTemplate TargetType="{x:Type Button}">
  1041. <Grid>
  1042. <Image x:Name="SearchButton" Source="Images\Buttons\Search.png" Width="15" Height="15"/>
  1043. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
  1044. </Grid>
  1045. </ControlTemplate>
  1046. </Setter.Value>
  1047. </Setter>
  1048. </Style>
  1049. <Style x:Key="SearchClearButtonStyle" TargetType="Button">
  1050. <Setter Property="Template">
  1051. <Setter.Value>
  1052. <ControlTemplate TargetType="{x:Type Button}">
  1053. <Grid>
  1054. <Image x:Name="SearchClearButton" Source="Images\Buttons\SearchClear.png" Width="15" Height="15"/>
  1055. <Image x:Name="SearchClearButtonShine" Source="Images\Buttons\SearchClear Shine.png" Width="15" Height="15" Visibility="Hidden"/>
  1056. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
  1057. </Grid>
  1058. <ControlTemplate.Triggers>
  1059. <Trigger Property="IsMouseOver" Value="True">
  1060. <Setter Property="Visibility" TargetName="SearchClearButtonShine" Value="Visible"/>
  1061. <Setter Property="Visibility" TargetName="SearchClearButton" Value="Hidden"/>
  1062. <Setter Property="Cursor" Value="Hand"/>
  1063. </Trigger>
  1064. </ControlTemplate.Triggers>
  1065. </ControlTemplate>
  1066. </Setter.Value>
  1067. </Setter>
  1068. </Style>
  1069. <!-- style the control panel -->
  1070. <Style x:Key="ControlPanelLinkStyle" TargetType="Button">
  1071. <Setter Property="Template">
  1072. <Setter.Value>
  1073. <ControlTemplate TargetType="{x:Type Button}">
  1074. <Grid>
  1075. <TextBlock Margin="18 0 0 0" Foreground="#151c55" x:Name="LinkText">
  1076. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
  1077. </TextBlock>
  1078. </Grid>
  1079. <ControlTemplate.Triggers>
  1080. <Trigger Property="IsMouseOver" Value="True">
  1081. <Setter Property="Foreground" TargetName="LinkText" Value="Blue"/>
  1082. <Setter Property="TextDecorations" TargetName="LinkText" Value="Baseline"/>
  1083. <Setter Property="Cursor" Value="Hand"/>
  1084. </Trigger>
  1085. </ControlTemplate.Triggers>
  1086. </ControlTemplate>
  1087. </Setter.Value>
  1088. </Setter>
  1089. </Style>
  1090. <Style x:Key="ControlPanelLinkActiveStyle" TargetType="Button">
  1091. <Setter Property="Template">
  1092. <Setter.Value>
  1093. <ControlTemplate TargetType="{x:Type Button}">
  1094. <Grid>
  1095. <Ellipse Fill="#151c55" Height="6" Width="6" StrokeThickness="1" Stroke="#151c55" HorizontalAlignment="Left"/>
  1096. <TextBlock Margin="18 0 0 0" Foreground="#151c55" x:Name="LinkText" FontWeight="Bold" HorizontalAlignment="Left">
  1097. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
  1098. </TextBlock>
  1099. </Grid>
  1100. </ControlTemplate>
  1101. </Setter.Value>
  1102. </Setter>
  1103. </Style>
  1104. <Style x:Key="AeroControlPanelTitleStyle" TargetType="TextBlock">
  1105. <Setter Property="Margin" Value="25,25,0,0"/>
  1106. <Setter Property="Foreground" Value="#003399"/>
  1107. <Setter Property="FontSize" Value="16"/>
  1108. </Style>
  1109. <Style x:Key="ClassicControlPanelTitleStyle" TargetType="TextBlock">
  1110. <Setter Property="Margin" Value="25,25,0,0"/>
  1111. <!--<Setter Property="FontSize" Value="16"/>-->
  1112. <Setter Property="FontWeight" Value="Bold"/>
  1113. </Style>
  1114. <!-- tray Icon -->
  1115. <tb:TaskbarIcon x:Key="NotifyIcon" IconSource="Images\Icons\Tray.ico" ToolTipText="A simple approach to music"/>
  1116. <Style x:Key="NotificationCloseButtonStyle" TargetType="Button">
  1117. <Setter Property="Template">
  1118. <Setter.Value>
  1119. <ControlTemplate TargetType="{x:Type Button}">
  1120. <Grid>
  1121. <Image x:Name="ShuffleButton" Source="Images\Buttons\Close Notification.png" Width="8" Height="8"/>
  1122. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
  1123. </Grid>
  1124. <ControlTemplate.Triggers>
  1125. <Trigger Property="IsMouseOver" Value="True">
  1126. <Setter Property="Cursor" Value="Hand"/>
  1127. </Trigger>
  1128. </ControlTemplate.Triggers>
  1129. </ControlTemplate>
  1130. </Setter.Value>
  1131. </Setter>
  1132. </Style>
  1133. <Style x:Key="NotificationLinkStyle" TargetType="Button">
  1134. <Setter Property="Template">
  1135. <Setter.Value>
  1136. <ControlTemplate TargetType="{x:Type Button}">
  1137. <Grid>
  1138. <TextBlock Margin="0 0 0 0" Foreground="#151c55" x:Name="LinkText">
  1139. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
  1140. </TextBlock>
  1141. </Grid>
  1142. <ControlTemplate.Triggers>
  1143. <Trigger Property="IsMouseOver" Value="True">
  1144. <Setter Property="Foreground" TargetName="LinkText" Value="Blue"/>
  1145. <Setter Property="TextDecorations" TargetName="LinkText" Value="Baseline"/>
  1146. <Setter Property="Cursor" Value="Hand"/>
  1147. </Trigger>
  1148. </ControlTemplate.Triggers>
  1149. </ControlTemplate>
  1150. </Setter.Value>
  1151. </Setter>
  1152. </Style>
  1153. <BitmapImage UriSource="Images\Misc\SortArrowUp.png" x:Key="SortArrowUp"/>
  1154. <BitmapImage UriSource="Images\Misc\SortArrowDown.png" x:Key="SortArrowDown"/>
  1155. <Image x:Key="LibraryIcon" Source="Images\Icons\Library.ico" Width="16" Height="16"/>
  1156. <Image x:Key="QueueIcon" Source="Images\Icons\Queue.ico" Width="16" Height="16"/>
  1157. <Image x:Key="HistoryIcon" Source="Images\Icons\Clock.ico" Width="16" Height="16"/>
  1158. <Image x:Key="PlaylistIcon" Source="Images\Icons\DiscAudio.ico" Width="16" Height="16"/>
  1159. <Image x:Key="DefaultAlbumArt" Source="Images\AlbumArt\Default.jpg"/>
  1160. </ResourceDictionary>