| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149 |
- <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
- <LinearGradientBrush x:Key="ProgressBarBackground" StartPoint="0.5,0" EndPoint="0.5,1">
- <GradientStop Color="#FFE3E8EB" />
- <GradientStop Offset="1" Color="White" />
- </LinearGradientBrush>
- <LinearGradientBrush x:Key="ProgressBarForeground" StartPoint="0.5,0" EndPoint="0.5,1">
- <GradientStop Offset="0" Color="#FFFDA956" />
- <GradientStop Offset="1" Color="#FFFDA956" />
- <GradientStop Offset="0.5" Color="#FFFF7D00" />
- </LinearGradientBrush>
- <LinearGradientBrush x:Key="ProgressBarBorderBrush" StartPoint="0,0" EndPoint="0,1">
- <GradientStop Offset="0.05" Color="#5794BF" />
- <GradientStop Offset="0.07" Color="#B7D5EA" />
- <GradientStop Offset="1" Color="#C7E2F1" />
- </LinearGradientBrush>
- <LinearGradientBrush x:Key="ProgressBarGlassyHighlight" StartPoint="0,0" EndPoint="0,1">
- <GradientStop Offset="0.5385" Color="#50FFFFFF" />
- <GradientStop Offset="0.5385" Color="#00FFFFFF" />
- </LinearGradientBrush>
- <LinearGradientBrush x:Key="ProgressBarTopHighlight" StartPoint="0,0" EndPoint="0,1">
- <GradientStop Offset="0.05" Color="#80FFFFFF" />
- <GradientStop Offset="0.25" Color="#00FFFFFF" />
- </LinearGradientBrush>
- <LinearGradientBrush x:Key="ProgressBarIndicatorAnimatedFill" StartPoint="0,0" EndPoint="1,0">
- <GradientStop Offset="0" Color="#00FFFFFF" />
- <GradientStop Offset="0.4" Color="#60FFFFFF" />
- <GradientStop Offset="0.6" Color="#60FFFFFF" />
- <GradientStop Offset="1" Color="#00FFFFFF" />
- </LinearGradientBrush>
- <RadialGradientBrush x:Key="ProgressBarIndicatorLightingEffectLeft" RadiusX="1" RadiusY="1" RelativeTransform="1,0,0,1,0.5,0.5">
- <GradientStop Offset="0" Color="#60FFFFC4" />
- <GradientStop Offset="1" Color="#00FFFFC4" />
- </RadialGradientBrush>
- <LinearGradientBrush x:Key="ProgressBarIndicatorLightingEffect" StartPoint="0,1" EndPoint="0,0">
- <GradientStop Offset="0" Color="#60FFFFC4" />
- <GradientStop Offset="1" Color="#00FFFFC4" />
- </LinearGradientBrush>
- <RadialGradientBrush x:Key="ProgressBarIndicatorLightingEffectRight" RadiusX="1" RadiusY="1" RelativeTransform="1,0,0,1,-0.5,0.5">
- <GradientStop Offset="0" Color="#60FFFFC4" />
- <GradientStop Offset="1" Color="#00FFFFC4" />
- </RadialGradientBrush>
- <LinearGradientBrush x:Key="ProgressBarIndicatorGlassyHighlight" StartPoint="0,0" EndPoint="0,1">
- <GradientStop Offset="0.5385" Color="#90FFFFFF" />
- <GradientStop Offset="0.5385" Color="#00FFFFFF" />
- </LinearGradientBrush>
- <Style TargetType="{x:Type ProgressBar}">
- <Setter Property="Foreground" Value="{StaticResource ProgressBarForeground}" />
- <Setter Property="Background" Value="{StaticResource ProgressBarBackground}" />
- <Setter Property="BorderBrush" Value="{StaticResource ProgressBarBorderBrush}" />
- <Setter Property="BorderThickness" Value="1" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ProgressBar}">
- <Grid x:Name="TemplateRoot" SnapsToDevicePixels="true">
- <Rectangle RadiusX="1" RadiusY="1" />
- <Border Margin="1"
- Background="{StaticResource ProgressBarGlassyHighlight}"
- CornerRadius="1" />
- <Border Margin="1"
- Background="{StaticResource ProgressBarTopHighlight}"
- BorderBrush="#80FFFFFF"
- BorderThickness="1,0,1,1" />
- <Rectangle x:Name="PART_Track" Margin="1" />
- <Decorator x:Name="PART_Indicator"
- Margin="1"
- HorizontalAlignment="Left">
- <Grid x:Name="Foreground">
- <Rectangle x:Name="Indicator" Fill="{TemplateBinding Foreground}" />
- <Grid x:Name="Animation" ClipToBounds="true">
- <Rectangle x:Name="PART_GlowRect"
- Width="100"
- Margin="-100,0,0,0"
- HorizontalAlignment="Left"
- Fill="{StaticResource ProgressBarIndicatorAnimatedFill}" />
- </Grid>
- <Grid x:Name="Overlay">
- <Grid.ColumnDefinitions>
- <ColumnDefinition MaxWidth="15" />
- <ColumnDefinition Width="0.1*" />
- <ColumnDefinition MaxWidth="15" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition />
- <RowDefinition />
- </Grid.RowDefinitions>
- <Rectangle x:Name="LeftDark"
- Grid.RowSpan="2"
- Margin="1,1,0,1"
- RadiusX="1"
- RadiusY="1" />
- <Rectangle x:Name="RightDark"
- Grid.Row="0"
- Grid.RowSpan="2"
- Grid.Column="2"
- Margin="0,1,1,1"
- RadiusX="1"
- RadiusY="1" />
- <Rectangle x:Name="LeftLight"
- Grid.Row="2"
- Grid.Column="0"
- Fill="{StaticResource ProgressBarIndicatorLightingEffectLeft}" />
- <Rectangle x:Name="CenterLight"
- Grid.Row="2"
- Grid.Column="1"
- Fill="{StaticResource ProgressBarIndicatorLightingEffect}" />
- <Rectangle x:Name="RightLight"
- Grid.Row="2"
- Grid.Column="2"
- Fill="{StaticResource ProgressBarIndicatorLightingEffectRight}" />
- <Border x:Name="Highlight1"
- Grid.RowSpan="2"
- Grid.ColumnSpan="3"
- Background="{StaticResource ProgressBarIndicatorGlassyHighlight}" />
- <Border x:Name="Highlight2"
- Grid.RowSpan="2"
- Grid.ColumnSpan="3"
- Background="{StaticResource ProgressBarTopHighlight}" />
- </Grid>
- </Grid>
- </Decorator>
- <Border BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- CornerRadius="2" />
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="Orientation" Value="Vertical">
- <Setter TargetName="TemplateRoot" Property="LayoutTransform">
- <Setter.Value>
- <RotateTransform Angle="-90" />
- </Setter.Value>
- </Setter>
- </Trigger>
- <Trigger Property="IsIndeterminate" Value="true">
- <Setter TargetName="LeftDark" Property="Visibility" Value="Collapsed" />
- <Setter TargetName="RightDark" Property="Visibility" Value="Collapsed" />
- <Setter TargetName="LeftLight" Property="Visibility" Value="Collapsed" />
- <Setter TargetName="CenterLight" Property="Visibility" Value="Collapsed" />
- <Setter TargetName="RightLight" Property="Visibility" Value="Collapsed" />
- <Setter TargetName="Indicator" Property="Visibility" Value="Collapsed" />
- </Trigger>
- <Trigger Property="IsIndeterminate" Value="false">
- <Setter TargetName="Animation" Property="Background" Value="{StaticResource ProgressBarForeground}" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </ResourceDictionary>
|