|
|
|
@ -13,19 +13,14 @@ |
|
|
|
<Setter Property="Template"> |
|
|
|
<ControlTemplate> |
|
|
|
<Grid> |
|
|
|
<Border Background="{TemplateBinding Background}" |
|
|
|
BorderBrush="{TemplateBinding BorderBrush}" |
|
|
|
BorderThickness="{TemplateBinding BorderThickness}"> |
|
|
|
<Border Name="PART_Indicator" Background="{TemplateBinding Foreground}"/> |
|
|
|
<Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"> |
|
|
|
<Panel> |
|
|
|
<Border Name="PART_Indicator" Background="{TemplateBinding Foreground}" IsVisible="{Binding !IsIndeterminate, RelativeSource={RelativeSource TemplatedParent}}"/> |
|
|
|
<Border Name="PART_IndeterminateIndicator" Background="{TemplateBinding Foreground}" IsVisible="{Binding IsIndeterminate, RelativeSource={RelativeSource TemplatedParent}}"/> |
|
|
|
</Panel> |
|
|
|
</Border> |
|
|
|
<LayoutTransformControl |
|
|
|
HorizontalAlignment="Center" |
|
|
|
VerticalAlignment="Center" |
|
|
|
IsVisible="{Binding ShowProgressText, RelativeSource={RelativeSource TemplatedParent}}" |
|
|
|
Name="PART_LayoutTransformControl"> |
|
|
|
<TextBlock |
|
|
|
Foreground="{DynamicResource ThemeForegroundBrush}" |
|
|
|
Text="{Binding Value, RelativeSource={RelativeSource TemplatedParent}, StringFormat={}{0:0}%}" /> |
|
|
|
<LayoutTransformControl HorizontalAlignment="Center" VerticalAlignment="Center" IsVisible="{Binding ShowProgressText, RelativeSource={RelativeSource TemplatedParent}}" Name="PART_LayoutTransformControl"> |
|
|
|
<TextBlock Foreground="{DynamicResource ThemeForegroundBrush}" Text="{Binding Value, RelativeSource={RelativeSource TemplatedParent}, StringFormat={}{0:0}%}" /> |
|
|
|
</LayoutTransformControl> |
|
|
|
</Grid> |
|
|
|
</ControlTemplate> |
|
|
|
@ -54,36 +49,31 @@ |
|
|
|
</Setter.Value> |
|
|
|
</Setter> |
|
|
|
</Style> |
|
|
|
<Style Selector="ProgressBar:horizontal:indeterminate /template/ Border#PART_Indicator"> |
|
|
|
|
|
|
|
<Style Selector="ProgressBar:horizontal:indeterminate /template/ Border#PART_IndeterminateIndicator"> |
|
|
|
<Style.Animations> |
|
|
|
<Animation Duration="0:0:3" |
|
|
|
IterationCount="Infinite" |
|
|
|
Easing="LinearEasing"> |
|
|
|
<Animation Duration="0:0:3" IterationCount="Infinite" Easing="LinearEasing"> |
|
|
|
<KeyFrame Cue="0%"> |
|
|
|
<Setter Property="TranslateTransform.X" |
|
|
|
Value="{Binding IndeterminateStartingOffset, RelativeSource={RelativeSource TemplatedParent}}" /> |
|
|
|
<Setter Property="TranslateTransform.X" Value="{Binding IndeterminateStartingOffset, RelativeSource={RelativeSource TemplatedParent}}" /> |
|
|
|
</KeyFrame> |
|
|
|
<KeyFrame Cue="100%"> |
|
|
|
<Setter Property="TranslateTransform.X" |
|
|
|
Value="{Binding IndeterminateEndingOffset, RelativeSource={RelativeSource TemplatedParent}}" /> |
|
|
|
<Setter Property="TranslateTransform.X" Value="{Binding IndeterminateEndingOffset, RelativeSource={RelativeSource TemplatedParent}}" /> |
|
|
|
</KeyFrame> |
|
|
|
</Animation> |
|
|
|
</Style.Animations> |
|
|
|
<Setter Property="Width" Value="{Binding TemplateProperties.ContainerWidth, RelativeSource={RelativeSource TemplatedParent}}" /> |
|
|
|
</Style> |
|
|
|
<Style Selector="ProgressBar:vertical:indeterminate /template/ Border#PART_Indicator"> |
|
|
|
<Style Selector="ProgressBar:vertical:indeterminate /template/ Border#PART_IndeterminateIndicator"> |
|
|
|
<Style.Animations> |
|
|
|
<Animation Duration="0:0:3" |
|
|
|
IterationCount="Infinite" |
|
|
|
Easing="LinearEasing"> |
|
|
|
<Animation Duration="0:0:3" IterationCount="Infinite" Easing="LinearEasing"> |
|
|
|
<KeyFrame Cue="0%"> |
|
|
|
<Setter Property="TranslateTransform.Y" |
|
|
|
Value="{Binding TemplateProperties.IndeterminateStartingOffset, RelativeSource={RelativeSource TemplatedParent}}" /> |
|
|
|
<Setter Property="TranslateTransform.Y" Value="{Binding IndeterminateStartingOffset, RelativeSource={RelativeSource TemplatedParent}}" /> |
|
|
|
</KeyFrame> |
|
|
|
<KeyFrame Cue="100%"> |
|
|
|
<Setter Property="TranslateTransform.Y" |
|
|
|
Value="{Binding TemplateProperties.IndeterminateEndingOffset, RelativeSource={RelativeSource TemplatedParent}}" /> |
|
|
|
<Setter Property="TranslateTransform.Y" Value="{Binding IndeterminateEndingOffset, RelativeSource={RelativeSource TemplatedParent}}" /> |
|
|
|
</KeyFrame> |
|
|
|
</Animation> |
|
|
|
</Style.Animations> |
|
|
|
<Setter Property="Height" Value="{Binding TemplateProperties.ContainerWidth, RelativeSource={RelativeSource TemplatedParent}}" /> |
|
|
|
</Style> |
|
|
|
</Styles> |
|
|
|
|