OtherStyle.xaml 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. xmlns:sys="clr-namespace:System;assembly=mscorlib">
  4. <Style x:Key="ThemeProgressBar" TargetType="{x:Type ProgressBar}">
  5. <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
  6. <Setter Property="SnapsToDevicePixels" Value="True"/>
  7. <Setter Property="Height" Value="9"/>
  8. <Setter Property="Background" Value="{StaticResource ThemeColor}"/>
  9. <Setter Property="FontSize" Value="10"/>
  10. <Setter Property="Padding" Value="5,0"/>
  11. <Setter Property="Template">
  12. <Setter.Value>
  13. <ControlTemplate TargetType="{x:Type ProgressBar}">
  14. <Grid Background="#00000000">
  15. <Grid.RowDefinitions>
  16. <RowDefinition Height="Auto"/>
  17. </Grid.RowDefinitions>
  18. <Grid Height="{TemplateBinding Height}">
  19. <Border Background="#000000" CornerRadius="5" Opacity="0.05"/>
  20. <Border BorderBrush="#000000" BorderThickness="0" CornerRadius="5" Opacity="0.1"/>
  21. <Grid Margin="{TemplateBinding BorderThickness}">
  22. <Border x:Name="PART_Track"/>
  23. <Grid x:Name="PART_Indicator" ClipToBounds="True" HorizontalAlignment="Left" >
  24. <Grid x:Name="Animation" RenderTransformOrigin="0.5,0.5">
  25. <Grid.RenderTransform>
  26. <TransformGroup>
  27. <ScaleTransform ScaleY="-1" ScaleX="1"/>
  28. <SkewTransform AngleY="0" AngleX="0"/>
  29. <RotateTransform Angle="180"/>
  30. <TranslateTransform/>
  31. </TransformGroup>
  32. </Grid.RenderTransform>
  33. <Border x:Name="Bor" Background="{TemplateBinding Background}" CornerRadius="5"/>
  34. </Grid>
  35. </Grid>
  36. </Grid>
  37. </Grid>
  38. </Grid>
  39. <ControlTemplate.Triggers>
  40. <Trigger Property="IsEnabled" Value="False">
  41. <Setter Property="Background" Value="{StaticResource ThemeColor}"/>
  42. </Trigger>
  43. </ControlTemplate.Triggers>
  44. </ControlTemplate>
  45. </Setter.Value>
  46. </Setter>
  47. </Style>
  48. </ResourceDictionary>