|
| 1 | +<!-- |
| 2 | + This Source Code Form is subject to the terms of the MIT License. |
| 3 | + If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. |
| 4 | + Copyright (C) Leszek Pomianowski and WPF UI Contributors. |
| 5 | + All Rights Reserved. |
| 6 | +--> |
| 7 | + |
| 8 | +<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> |
| 9 | + |
| 10 | + <Style TargetType="{x:Type ProgressBar}"> |
| 11 | + <Setter Property="Foreground" Value="{DynamicResource ProgressBarForeground}" /> |
| 12 | + <Setter Property="Background" Value="{DynamicResource ProgressBarBackground}" /> |
| 13 | + <Setter Property="BorderBrush" Value="{DynamicResource ProgressBarBorderBrush}" /> |
| 14 | + <Setter Property="Height" Value="4" /> |
| 15 | + <Setter Property="BorderThickness" Value="1" /> |
| 16 | + <Setter Property="SnapsToDevicePixels" Value="True" /> |
| 17 | + <Setter Property="OverridesDefaultStyle" Value="True" /> |
| 18 | + <Setter Property="Template"> |
| 19 | + <Setter.Value> |
| 20 | + <ControlTemplate TargetType="{x:Type ProgressBar}"> |
| 21 | + <Grid Name="TemplateRoot" SnapsToDevicePixels="True"> |
| 22 | + <Border |
| 23 | + Margin="1,1,1,1" |
| 24 | + Background="{TemplateBinding Background}" |
| 25 | + BorderBrush="{TemplateBinding BorderBrush}" |
| 26 | + BorderThickness="{TemplateBinding BorderThickness}" |
| 27 | + CornerRadius="1.5" /> |
| 28 | + <Rectangle Name="PART_Track" Margin="1,1,1,1" /> |
| 29 | + <Border |
| 30 | + Name="PART_Indicator" |
| 31 | + Margin="1,1,1,1" |
| 32 | + HorizontalAlignment="Left" |
| 33 | + Background="{TemplateBinding Foreground}" |
| 34 | + CornerRadius="2" /> |
| 35 | + </Grid> |
| 36 | + </ControlTemplate> |
| 37 | + </Setter.Value> |
| 38 | + </Setter> |
| 39 | + <Style.Triggers> |
| 40 | + <Trigger Property="IsIndeterminate" Value="True"> |
| 41 | + <Setter Property="Template"> |
| 42 | + <Setter.Value> |
| 43 | + <ControlTemplate TargetType="{x:Type ProgressBar}"> |
| 44 | + <Grid Name="TemplateRoot"> |
| 45 | + <Border |
| 46 | + Margin="1,1,1,1" |
| 47 | + Background="{DynamicResource ProgressBarIndeterminateBackground}" |
| 48 | + BorderBrush="{DynamicResource ProgressBarIndeterminateBackground}" |
| 49 | + BorderThickness="{TemplateBinding BorderThickness}" |
| 50 | + CornerRadius="4" /> |
| 51 | + <Rectangle Name="PART_Track" Margin="1,1,1,1" /> |
| 52 | + <Decorator |
| 53 | + Name="PART_Indicator" |
| 54 | + Margin="1,1,1,1" |
| 55 | + HorizontalAlignment="Left"> |
| 56 | + <Grid Name="Animation" ClipToBounds="True"> |
| 57 | + <Border |
| 58 | + Name="PART_GlowRect" |
| 59 | + Width="200" |
| 60 | + Margin="0,0,0,0" |
| 61 | + HorizontalAlignment="Left" |
| 62 | + Background="{TemplateBinding Foreground}" |
| 63 | + CornerRadius="2" /> |
| 64 | + </Grid> |
| 65 | + </Decorator> |
| 66 | + </Grid> |
| 67 | + </ControlTemplate> |
| 68 | + </Setter.Value> |
| 69 | + </Setter> |
| 70 | + </Trigger> |
| 71 | + </Style.Triggers> |
| 72 | + </Style> |
| 73 | +</ResourceDictionary> |
0 commit comments