2025-07-31 20:12:01 +08:00
|
|
|
|
<ResourceDictionary
|
|
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
2026-02-20 15:31:44 +08:00
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
2026-01-02 17:30:41 +08:00
|
|
|
|
xmlns:decorations="clr-namespace:Melskin.Controls.Decorations"
|
2026-02-20 15:31:44 +08:00
|
|
|
|
xmlns:internal="clr-namespace:Melskin.Converters.Internal">
|
2025-07-11 09:20:23 +08:00
|
|
|
|
|
2025-12-28 11:47:54 +08:00
|
|
|
|
<!--#region SlotProgress-->
|
2026-02-20 15:31:44 +08:00
|
|
|
|
<ControlTemplate x:Key="SlotHorizontalProgressTemplate" TargetType="{x:Type ProgressBar}">
|
2025-07-11 09:20:23 +08:00
|
|
|
|
<ControlTemplate.Resources>
|
2026-02-20 15:31:44 +08:00
|
|
|
|
<Storyboard x:Key="ProgressIndeterminateHorizontal" RepeatBehavior="Forever">
|
2025-08-20 12:10:35 +08:00
|
|
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground.(Brush.RelativeTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
|
2025-07-31 20:12:01 +08:00
|
|
|
|
<EasingDoubleKeyFrame KeyTime="0" Value="-1" />
|
|
|
|
|
|
<EasingDoubleKeyFrame KeyTime="0:0:2" Value="1" />
|
2025-07-11 09:20:23 +08:00
|
|
|
|
</DoubleAnimationUsingKeyFrames>
|
|
|
|
|
|
</Storyboard>
|
|
|
|
|
|
</ControlTemplate.Resources>
|
2025-09-06 00:36:23 +08:00
|
|
|
|
<decorations:SlotBorder
|
2026-02-20 15:31:44 +08:00
|
|
|
|
x:Name="backgroundBorder"
|
|
|
|
|
|
Padding="2"
|
2025-07-31 20:12:01 +08:00
|
|
|
|
Background="{TemplateBinding Background}"
|
|
|
|
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
|
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
2026-02-20 15:31:44 +08:00
|
|
|
|
Intensity="0.7">
|
|
|
|
|
|
<Grid x:Name="BarGrid" HorizontalAlignment="Left">
|
2025-07-31 20:12:01 +08:00
|
|
|
|
<!-- 计算进度条宽度 -->
|
2025-07-11 09:20:23 +08:00
|
|
|
|
<Grid.Width>
|
2025-08-20 12:10:35 +08:00
|
|
|
|
<MultiBinding Converter="{x:Static internal:ValueToRangeWidthConverter.Instance}" ConverterParameter="7">
|
2025-07-31 20:12:01 +08:00
|
|
|
|
<Binding
|
|
|
|
|
|
Mode="OneWay"
|
|
|
|
|
|
Path="Minimum"
|
|
|
|
|
|
RelativeSource="{RelativeSource TemplatedParent}" />
|
|
|
|
|
|
<Binding
|
|
|
|
|
|
Mode="OneWay"
|
|
|
|
|
|
Path="Maximum"
|
|
|
|
|
|
RelativeSource="{RelativeSource TemplatedParent}" />
|
|
|
|
|
|
<Binding
|
|
|
|
|
|
Mode="OneWay"
|
|
|
|
|
|
Path="Value"
|
|
|
|
|
|
RelativeSource="{RelativeSource TemplatedParent}" />
|
|
|
|
|
|
<Binding
|
|
|
|
|
|
Mode="OneWay"
|
|
|
|
|
|
Path="ActualWidth"
|
2025-09-06 00:36:23 +08:00
|
|
|
|
RelativeSource="{RelativeSource AncestorType={x:Type decorations:SlotBorder}}" />
|
2025-07-11 09:20:23 +08:00
|
|
|
|
</MultiBinding>
|
|
|
|
|
|
</Grid.Width>
|
2025-07-31 20:12:01 +08:00
|
|
|
|
<!-- 背景模糊效果 -->
|
|
|
|
|
|
<Border
|
2026-02-20 15:31:44 +08:00
|
|
|
|
x:Name="borderBlur"
|
2025-07-31 20:12:01 +08:00
|
|
|
|
Background="{TemplateBinding Foreground}"
|
2026-02-20 15:31:44 +08:00
|
|
|
|
CornerRadius="3">
|
2025-07-11 09:20:23 +08:00
|
|
|
|
<Border.Effect>
|
2025-07-31 20:12:01 +08:00
|
|
|
|
<BlurEffect Radius="8" />
|
2025-07-11 09:20:23 +08:00
|
|
|
|
</Border.Effect>
|
|
|
|
|
|
</Border>
|
2025-07-31 20:12:01 +08:00
|
|
|
|
<!-- 进度条 -->
|
|
|
|
|
|
<Border
|
2026-02-20 15:31:44 +08:00
|
|
|
|
x:Name="borderProgress"
|
2025-07-31 20:12:01 +08:00
|
|
|
|
Background="{TemplateBinding Foreground}"
|
2026-02-20 15:31:44 +08:00
|
|
|
|
CornerRadius="3" />
|
2025-07-11 09:20:23 +08:00
|
|
|
|
</Grid>
|
|
|
|
|
|
|
2025-09-06 00:36:23 +08:00
|
|
|
|
</decorations:SlotBorder>
|
2025-07-11 09:20:23 +08:00
|
|
|
|
<ControlTemplate.Triggers>
|
2025-09-08 19:49:09 +08:00
|
|
|
|
<MultiTrigger>
|
|
|
|
|
|
<MultiTrigger.Conditions>
|
|
|
|
|
|
<Condition Property="IsIndeterminate" Value="True" />
|
|
|
|
|
|
<Condition Property="IsEnabled" Value="True" />
|
|
|
|
|
|
</MultiTrigger.Conditions>
|
2026-02-20 15:31:44 +08:00
|
|
|
|
<Setter TargetName="BarGrid" Property="Width" Value="auto" />
|
|
|
|
|
|
<Setter TargetName="BarGrid" Property="HorizontalAlignment" Value="Stretch" />
|
2025-08-12 23:08:54 +08:00
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryIndeterminateGradientBrush}" />
|
2025-09-08 19:49:09 +08:00
|
|
|
|
<MultiTrigger.EnterActions>
|
2026-02-20 15:31:44 +08:00
|
|
|
|
<BeginStoryboard x:Name="beginIndeterminate" Storyboard="{StaticResource ProgressIndeterminateHorizontal}" />
|
2025-09-08 19:49:09 +08:00
|
|
|
|
</MultiTrigger.EnterActions>
|
|
|
|
|
|
<MultiTrigger.ExitActions>
|
2025-07-31 20:12:01 +08:00
|
|
|
|
<RemoveStoryboard BeginStoryboardName="beginIndeterminate" />
|
2025-09-08 19:49:09 +08:00
|
|
|
|
</MultiTrigger.ExitActions>
|
|
|
|
|
|
</MultiTrigger>
|
2025-07-11 09:20:23 +08:00
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
|
</ControlTemplate>
|
2025-08-20 12:10:13 +08:00
|
|
|
|
<!--
|
|
|
|
|
|
Foreground: 控件的 Foreground 属性。
|
|
|
|
|
|
(Brush.RelativeTransform): 这个 Foreground 画刷(Brush)的 RelativeTransform 属性。
|
|
|
|
|
|
(TransformGroup.Children): 这个变换(Transform)的 Children 集合(这隐含地要求 RelativeTransform 必须是一个 TransformGroup)。
|
|
|
|
|
|
[3]: Children 集合中的第四个元素(索引从0开始)。
|
|
|
|
|
|
(TranslateTransform.X): 这个元素的 X 属性(这隐含地要求第四个元素必须是一个 TranslateTransform)。
|
2025-07-11 09:20:23 +08:00
|
|
|
|
|
2025-08-20 12:10:13 +08:00
|
|
|
|
<LinearGradientBrush EndPoint="1,0" StartPoint="0,1" x:Key="PrimaryIndeterminateGradientBrush">
|
2025-08-20 12:10:35 +08:00
|
|
|
|
<GradientStop Color="{StaticResource PrimaryNormalColor}" Offset="0" />
|
2025-08-20 12:10:13 +08:00
|
|
|
|
<GradientStop Color="{StaticResource PrimaryVariantColor}" Offset="0.7" />
|
2025-08-20 12:10:35 +08:00
|
|
|
|
<GradientStop Color="{StaticResource PrimaryNormalColor}" Offset="0.8" />
|
2025-08-20 12:10:13 +08:00
|
|
|
|
<LinearGradientBrush.RelativeTransform>
|
|
|
|
|
|
<TransformGroup>
|
|
|
|
|
|
<ScaleTransform/>
|
|
|
|
|
|
<SkewTransform/>
|
|
|
|
|
|
<RotateTransform/>
|
|
|
|
|
|
<TranslateTransform/>
|
|
|
|
|
|
</TransformGroup>
|
|
|
|
|
|
</LinearGradientBrush.RelativeTransform>
|
|
|
|
|
|
</LinearGradientBrush>
|
|
|
|
|
|
-->
|
2026-02-20 15:31:44 +08:00
|
|
|
|
<ControlTemplate x:Key="SlotProgressVerticalTemplate" TargetType="{x:Type ProgressBar}">
|
2025-07-11 09:20:23 +08:00
|
|
|
|
<ControlTemplate.Resources>
|
2026-02-20 15:31:44 +08:00
|
|
|
|
<Storyboard x:Key="ProgressIndeterminateVertical" RepeatBehavior="Forever">
|
2025-08-20 12:10:13 +08:00
|
|
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground.(Brush.RelativeTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
|
2025-07-31 20:12:01 +08:00
|
|
|
|
<EasingDoubleKeyFrame KeyTime="0" Value="1" />
|
|
|
|
|
|
<EasingDoubleKeyFrame KeyTime="0:0:2" Value="-1" />
|
2025-07-11 09:20:23 +08:00
|
|
|
|
</DoubleAnimationUsingKeyFrames>
|
|
|
|
|
|
</Storyboard>
|
|
|
|
|
|
</ControlTemplate.Resources>
|
2025-09-06 00:36:23 +08:00
|
|
|
|
<decorations:SlotBorder
|
2026-02-20 15:31:44 +08:00
|
|
|
|
x:Name="backgroundBorder"
|
|
|
|
|
|
Padding="2"
|
2025-07-31 20:12:01 +08:00
|
|
|
|
Background="{TemplateBinding Background}"
|
|
|
|
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
|
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
2026-02-20 15:31:44 +08:00
|
|
|
|
Intensity="0.7">
|
|
|
|
|
|
<Grid x:Name="BarGrid" VerticalAlignment="Bottom">
|
2025-07-31 20:12:01 +08:00
|
|
|
|
<!-- 计算进度条宽度 -->
|
2025-07-11 09:20:23 +08:00
|
|
|
|
<Grid.Height>
|
2025-08-20 12:10:13 +08:00
|
|
|
|
<MultiBinding Converter="{x:Static internal:ValueToRangeWidthConverter.Instance}" ConverterParameter="7">
|
2025-07-31 20:12:01 +08:00
|
|
|
|
<Binding
|
|
|
|
|
|
Mode="OneWay"
|
|
|
|
|
|
Path="Minimum"
|
|
|
|
|
|
RelativeSource="{RelativeSource TemplatedParent}" />
|
|
|
|
|
|
<Binding
|
|
|
|
|
|
Mode="OneWay"
|
|
|
|
|
|
Path="Maximum"
|
|
|
|
|
|
RelativeSource="{RelativeSource TemplatedParent}" />
|
|
|
|
|
|
<Binding
|
|
|
|
|
|
Mode="OneWay"
|
|
|
|
|
|
Path="Value"
|
|
|
|
|
|
RelativeSource="{RelativeSource TemplatedParent}" />
|
|
|
|
|
|
<Binding
|
|
|
|
|
|
Mode="OneWay"
|
|
|
|
|
|
Path="ActualHeight"
|
2025-09-06 00:36:23 +08:00
|
|
|
|
RelativeSource="{RelativeSource AncestorType={x:Type decorations:SlotBorder}}" />
|
2025-07-11 09:20:23 +08:00
|
|
|
|
</MultiBinding>
|
|
|
|
|
|
</Grid.Height>
|
2025-07-31 20:12:01 +08:00
|
|
|
|
<!-- 背景模糊效果 -->
|
|
|
|
|
|
<Border Background="{TemplateBinding Foreground}" CornerRadius="3">
|
2025-07-11 09:20:23 +08:00
|
|
|
|
<Border.Effect>
|
2025-07-31 20:12:01 +08:00
|
|
|
|
<BlurEffect Radius="8" />
|
2025-07-11 09:20:23 +08:00
|
|
|
|
</Border.Effect>
|
|
|
|
|
|
</Border>
|
2025-07-31 20:12:01 +08:00
|
|
|
|
<!-- 进度条 -->
|
|
|
|
|
|
<Border Background="{TemplateBinding Foreground}" CornerRadius="3" />
|
2025-07-11 09:20:23 +08:00
|
|
|
|
</Grid>
|
2025-09-06 00:36:23 +08:00
|
|
|
|
</decorations:SlotBorder>
|
2025-07-11 09:20:23 +08:00
|
|
|
|
<ControlTemplate.Triggers>
|
2025-09-08 19:49:09 +08:00
|
|
|
|
<!--<Trigger Property="IsIndeterminate" Value="True">
|
|
|
|
|
|
<Setter TargetName="BarGrid" Property="Height" Value="auto" />
|
|
|
|
|
|
<Setter TargetName="BarGrid" Property="VerticalAlignment" Value="Stretch" />
|
2025-08-12 23:08:54 +08:00
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryIndeterminateGradientBrush}" />
|
2025-07-11 09:20:23 +08:00
|
|
|
|
<Trigger.EnterActions>
|
2025-09-08 19:49:09 +08:00
|
|
|
|
<BeginStoryboard x:Name="beginIndeterminate" Storyboard="{StaticResource ProgressIndeterminateVertical}" />
|
2025-07-11 09:20:23 +08:00
|
|
|
|
</Trigger.EnterActions>
|
|
|
|
|
|
<Trigger.ExitActions>
|
2025-07-31 20:12:01 +08:00
|
|
|
|
<RemoveStoryboard BeginStoryboardName="beginIndeterminate" />
|
2025-07-11 09:20:23 +08:00
|
|
|
|
</Trigger.ExitActions>
|
2025-09-08 19:49:09 +08:00
|
|
|
|
</Trigger>-->
|
|
|
|
|
|
<MultiTrigger>
|
|
|
|
|
|
<MultiTrigger.Conditions>
|
|
|
|
|
|
<Condition Property="IsIndeterminate" Value="True" />
|
|
|
|
|
|
<Condition Property="IsEnabled" Value="True" />
|
|
|
|
|
|
</MultiTrigger.Conditions>
|
2026-02-20 15:31:44 +08:00
|
|
|
|
<Setter TargetName="BarGrid" Property="Height" Value="auto" />
|
|
|
|
|
|
<Setter TargetName="BarGrid" Property="VerticalAlignment" Value="Stretch" />
|
2025-09-08 19:49:09 +08:00
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryIndeterminateGradientBrush}" />
|
|
|
|
|
|
<MultiTrigger.EnterActions>
|
2026-02-20 15:31:44 +08:00
|
|
|
|
<BeginStoryboard x:Name="beginIndeterminate" Storyboard="{StaticResource ProgressIndeterminateVertical}" />
|
2025-09-08 19:49:09 +08:00
|
|
|
|
</MultiTrigger.EnterActions>
|
|
|
|
|
|
<MultiTrigger.ExitActions>
|
|
|
|
|
|
<RemoveStoryboard BeginStoryboardName="beginIndeterminate" />
|
|
|
|
|
|
</MultiTrigger.ExitActions>
|
|
|
|
|
|
</MultiTrigger>
|
2025-07-11 09:20:23 +08:00
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
|
|
2026-02-20 15:31:44 +08:00
|
|
|
|
<Style x:Key="SlotProgressBarStyle" TargetType="{x:Type ProgressBar}">
|
2025-08-12 23:08:54 +08:00
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryGradientBrush}" />
|
2025-09-08 19:49:09 +08:00
|
|
|
|
<Setter Property="Background" Value="{DynamicResource ControlBackgroundNormalBrush}" />
|
2025-07-31 20:12:01 +08:00
|
|
|
|
<Setter Property="BorderBrush" Value="Transparent" />
|
|
|
|
|
|
<Setter Property="Height" Value="20" />
|
2025-08-12 23:08:54 +08:00
|
|
|
|
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
2025-07-31 20:12:01 +08:00
|
|
|
|
<Setter Property="BorderThickness" Value="1" />
|
2025-12-28 11:47:54 +08:00
|
|
|
|
<Setter Property="Template" Value="{StaticResource SlotHorizontalProgressTemplate}" />
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
|
|
|
|
<Setter Property="IsIndeterminate" Value="False" />
|
|
|
|
|
|
<Setter Property="Background" Value="{DynamicResource ControlBackgroundDisabledBrush}" />
|
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryDisabledBrush}" />
|
|
|
|
|
|
</Trigger>
|
|
|
|
|
|
<Trigger Property="Orientation" Value="Vertical">
|
|
|
|
|
|
<Setter Property="Template" Value="{StaticResource SlotProgressVerticalTemplate}" />
|
|
|
|
|
|
<Setter Property="Width" Value="20" />
|
|
|
|
|
|
<Setter Property="VerticalAlignment" Value="Stretch" />
|
|
|
|
|
|
<Setter Property="VerticalContentAlignment" Value="Stretch" />
|
|
|
|
|
|
</Trigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
<!--#endregion-->
|
|
|
|
|
|
|
2026-02-22 20:03:42 +08:00
|
|
|
|
<!--<ControlTemplate x:Key="HorizontalProgressTemplate" TargetType="{x:Type ProgressBar}">
|
2025-12-28 11:47:54 +08:00
|
|
|
|
<ControlTemplate.Resources>
|
2026-02-20 15:31:44 +08:00
|
|
|
|
<Storyboard x:Key="ProgressIndeterminateHorizontal" RepeatBehavior="Forever">
|
2025-12-28 11:47:54 +08:00
|
|
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground.(Brush.RelativeTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
|
|
|
|
|
|
<EasingDoubleKeyFrame KeyTime="0" Value="-1" />
|
|
|
|
|
|
<EasingDoubleKeyFrame KeyTime="0:0:2" Value="1" />
|
|
|
|
|
|
</DoubleAnimationUsingKeyFrames>
|
|
|
|
|
|
</Storyboard>
|
|
|
|
|
|
</ControlTemplate.Resources>
|
2026-02-22 20:03:42 +08:00
|
|
|
|
|
2025-12-28 11:47:54 +08:00
|
|
|
|
<Border
|
2026-02-20 15:31:44 +08:00
|
|
|
|
x:Name="backgroundBorder"
|
2025-12-28 11:47:54 +08:00
|
|
|
|
Background="{TemplateBinding Background}"
|
|
|
|
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
|
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
2026-02-20 15:31:44 +08:00
|
|
|
|
CornerRadius="4">
|
2026-02-22 20:03:42 +08:00
|
|
|
|
|
|
|
|
|
|
-->
|
|
|
|
|
|
<!-- 核心改变:命名为 PART_Track,WPF 原生接管容器 -->
|
|
|
|
|
|
<!--
|
|
|
|
|
|
<Grid x:Name="PART_Track">
|
|
|
|
|
|
-->
|
|
|
|
|
|
<!-- 正常状态进度条:命名为 PART_Indicator,不绑Width,WPF自动算比例! -->
|
|
|
|
|
|
<!--
|
2025-12-28 11:47:54 +08:00
|
|
|
|
<Border
|
2026-02-22 20:03:42 +08:00
|
|
|
|
x:Name="PART_Indicator"
|
|
|
|
|
|
HorizontalAlignment="Left"
|
2025-12-28 11:47:54 +08:00
|
|
|
|
Background="{TemplateBinding Foreground}"
|
2026-02-20 15:31:44 +08:00
|
|
|
|
CornerRadius="3" />
|
2026-02-22 20:03:42 +08:00
|
|
|
|
|
|
|
|
|
|
-->
|
|
|
|
|
|
<!-- Indeterminate 动画层:默认隐藏,充满整个宽度 -->
|
|
|
|
|
|
<!--
|
|
|
|
|
|
<Border
|
|
|
|
|
|
x:Name="IndeterminateLayer"
|
|
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
|
|
Background="{TemplateBinding Foreground}"
|
|
|
|
|
|
CornerRadius="3"
|
|
|
|
|
|
Visibility="Collapsed" />
|
2025-12-28 11:47:54 +08:00
|
|
|
|
</Grid>
|
2026-02-22 20:03:42 +08:00
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
|
|
<MultiTrigger>
|
|
|
|
|
|
<MultiTrigger.Conditions>
|
|
|
|
|
|
<Condition Property="IsIndeterminate" Value="True" />
|
|
|
|
|
|
<Condition Property="IsEnabled" Value="True" />
|
|
|
|
|
|
</MultiTrigger.Conditions>
|
|
|
|
|
|
-->
|
|
|
|
|
|
<!-- 进入不确定状态时,隐藏原进度条,显示充满的动画层 -->
|
|
|
|
|
|
<!--
|
|
|
|
|
|
<Setter TargetName="PART_Indicator" Property="Visibility" Value="Collapsed" />
|
|
|
|
|
|
<Setter TargetName="IndeterminateLayer" Property="Visibility" Value="Visible" />
|
|
|
|
|
|
|
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryIndeterminateGradientBrush}" />
|
|
|
|
|
|
<MultiTrigger.EnterActions>
|
|
|
|
|
|
<BeginStoryboard x:Name="beginIndeterminate" Storyboard="{StaticResource ProgressIndeterminateHorizontal}" />
|
|
|
|
|
|
</MultiTrigger.EnterActions>
|
|
|
|
|
|
<MultiTrigger.ExitActions>
|
|
|
|
|
|
<RemoveStoryboard BeginStoryboardName="beginIndeterminate" />
|
|
|
|
|
|
</MultiTrigger.ExitActions>
|
|
|
|
|
|
</MultiTrigger>
|
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
|
</ControlTemplate>-->
|
|
|
|
|
|
<!--<ControlTemplate x:Key="ProgressVerticalTemplate" TargetType="{x:Type ProgressBar}">
|
|
|
|
|
|
<ControlTemplate.Resources>
|
|
|
|
|
|
<Storyboard x:Key="ProgressIndeterminateVertical" RepeatBehavior="Forever">
|
|
|
|
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground.(Brush.RelativeTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
|
|
|
|
|
|
<EasingDoubleKeyFrame KeyTime="0" Value="1" />
|
|
|
|
|
|
<EasingDoubleKeyFrame KeyTime="0:0:2" Value="-1" />
|
|
|
|
|
|
</DoubleAnimationUsingKeyFrames>
|
|
|
|
|
|
</Storyboard>
|
|
|
|
|
|
</ControlTemplate.Resources>
|
|
|
|
|
|
<Border
|
|
|
|
|
|
x:Name="backgroundBorder"
|
|
|
|
|
|
Background="{TemplateBinding Background}"
|
|
|
|
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
|
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
|
|
|
|
CornerRadius="4">
|
|
|
|
|
|
<Grid x:Name="BarGrid" VerticalAlignment="Bottom">-->
|
|
|
|
|
|
<!-- 计算进度条宽度 -->
|
|
|
|
|
|
<!--
|
|
|
|
|
|
<Grid.Height>
|
|
|
|
|
|
<MultiBinding Converter="{x:Static internal:ValueToRangeWidthConverter.Instance}" ConverterParameter="1">
|
|
|
|
|
|
<Binding
|
|
|
|
|
|
Mode="OneWay"
|
|
|
|
|
|
Path="Minimum"
|
|
|
|
|
|
RelativeSource="{RelativeSource TemplatedParent}" />
|
|
|
|
|
|
<Binding
|
|
|
|
|
|
Mode="OneWay"
|
|
|
|
|
|
Path="Maximum"
|
|
|
|
|
|
RelativeSource="{RelativeSource TemplatedParent}" />
|
|
|
|
|
|
<Binding
|
|
|
|
|
|
Mode="OneWay"
|
|
|
|
|
|
Path="Value"
|
|
|
|
|
|
RelativeSource="{RelativeSource TemplatedParent}" />
|
|
|
|
|
|
<Binding
|
|
|
|
|
|
Mode="OneWay"
|
|
|
|
|
|
Path="ActualHeight"
|
|
|
|
|
|
RelativeSource="{RelativeSource AncestorType={x:Type Border}}" />
|
|
|
|
|
|
</MultiBinding>
|
|
|
|
|
|
</Grid.Height>-->
|
|
|
|
|
|
<!-- 进度条 -->
|
|
|
|
|
|
<!--
|
|
|
|
|
|
<Border Background="{TemplateBinding Foreground}" CornerRadius="3" />
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
|
|
|
|
|
|
|
|
<MultiTrigger>
|
|
|
|
|
|
<MultiTrigger.Conditions>
|
|
|
|
|
|
<Condition Property="IsIndeterminate" Value="True" />
|
|
|
|
|
|
<Condition Property="IsEnabled" Value="True" />
|
|
|
|
|
|
</MultiTrigger.Conditions>
|
|
|
|
|
|
<Setter TargetName="BarGrid" Property="Height" Value="auto" />
|
|
|
|
|
|
<Setter TargetName="BarGrid" Property="VerticalAlignment" Value="Stretch" />
|
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryIndeterminateGradientBrush}" />
|
|
|
|
|
|
<MultiTrigger.EnterActions>
|
|
|
|
|
|
<BeginStoryboard x:Name="beginIndeterminate" Storyboard="{StaticResource ProgressIndeterminateVertical}" />
|
|
|
|
|
|
</MultiTrigger.EnterActions>
|
|
|
|
|
|
<MultiTrigger.ExitActions>
|
|
|
|
|
|
<RemoveStoryboard BeginStoryboardName="beginIndeterminate" />
|
|
|
|
|
|
</MultiTrigger.ExitActions>
|
|
|
|
|
|
</MultiTrigger>
|
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
|
</ControlTemplate>-->
|
|
|
|
|
|
|
|
|
|
|
|
<!--<ControlTemplate x:Key="ProgressVerticalTemplate" TargetType="{x:Type ProgressBar}">
|
|
|
|
|
|
<ControlTemplate.Resources>
|
|
|
|
|
|
<Storyboard x:Key="ProgressIndeterminateVertical" RepeatBehavior="Forever">
|
|
|
|
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground.(Brush.RelativeTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
|
|
|
|
|
|
<EasingDoubleKeyFrame KeyTime="0" Value="1" />
|
|
|
|
|
|
<EasingDoubleKeyFrame KeyTime="0:0:2" Value="-1" />
|
|
|
|
|
|
</DoubleAnimationUsingKeyFrames>
|
|
|
|
|
|
</Storyboard>
|
|
|
|
|
|
</ControlTemplate.Resources>
|
|
|
|
|
|
<Border
|
|
|
|
|
|
x:Name="backgroundBorder"
|
|
|
|
|
|
Background="{TemplateBinding Background}"
|
|
|
|
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
|
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
|
|
|
|
CornerRadius="4">
|
|
|
|
|
|
<Grid x:Name="BarGrid" VerticalAlignment="Bottom">-->
|
|
|
|
|
|
<!-- 计算进度条宽度 -->
|
|
|
|
|
|
<!--
|
|
|
|
|
|
<Grid.Height>
|
|
|
|
|
|
<MultiBinding Converter="{x:Static internal:ValueToRangeWidthConverter.Instance}" ConverterParameter="1">
|
|
|
|
|
|
<Binding
|
|
|
|
|
|
Mode="OneWay"
|
|
|
|
|
|
Path="Minimum"
|
|
|
|
|
|
RelativeSource="{RelativeSource TemplatedParent}" />
|
|
|
|
|
|
<Binding
|
|
|
|
|
|
Mode="OneWay"
|
|
|
|
|
|
Path="Maximum"
|
|
|
|
|
|
RelativeSource="{RelativeSource TemplatedParent}" />
|
|
|
|
|
|
<Binding
|
|
|
|
|
|
Mode="OneWay"
|
|
|
|
|
|
Path="Value"
|
|
|
|
|
|
RelativeSource="{RelativeSource TemplatedParent}" />
|
|
|
|
|
|
<Binding
|
|
|
|
|
|
Mode="OneWay"
|
|
|
|
|
|
Path="ActualHeight"
|
|
|
|
|
|
RelativeSource="{RelativeSource AncestorType={x:Type Border}}" />
|
|
|
|
|
|
</MultiBinding>
|
|
|
|
|
|
</Grid.Height>-->
|
|
|
|
|
|
<!-- 进度条 -->
|
|
|
|
|
|
<!--
|
|
|
|
|
|
<Border Background="{TemplateBinding Foreground}" CornerRadius="3" />
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
|
|
|
|
|
|
|
|
<MultiTrigger>
|
|
|
|
|
|
<MultiTrigger.Conditions>
|
|
|
|
|
|
<Condition Property="IsIndeterminate" Value="True" />
|
|
|
|
|
|
<Condition Property="IsEnabled" Value="True" />
|
|
|
|
|
|
</MultiTrigger.Conditions>
|
|
|
|
|
|
<Setter TargetName="BarGrid" Property="Height" Value="auto" />
|
|
|
|
|
|
<Setter TargetName="BarGrid" Property="VerticalAlignment" Value="Stretch" />
|
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryIndeterminateGradientBrush}" />
|
|
|
|
|
|
<MultiTrigger.EnterActions>
|
|
|
|
|
|
<BeginStoryboard x:Name="beginIndeterminate" Storyboard="{StaticResource ProgressIndeterminateVertical}" />
|
|
|
|
|
|
</MultiTrigger.EnterActions>
|
|
|
|
|
|
<MultiTrigger.ExitActions>
|
|
|
|
|
|
<RemoveStoryboard BeginStoryboardName="beginIndeterminate" />
|
|
|
|
|
|
</MultiTrigger.ExitActions>
|
|
|
|
|
|
</MultiTrigger>
|
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
|
</ControlTemplate>-->
|
|
|
|
|
|
|
|
|
|
|
|
<ControlTemplate x:Key="HorizontalProgressTemplate" TargetType="{x:Type ProgressBar}">
|
|
|
|
|
|
<ControlTemplate.Resources>
|
|
|
|
|
|
<Storyboard x:Key="ProgressIndeterminateHorizontal" RepeatBehavior="Forever">
|
|
|
|
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground.(Brush.RelativeTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
|
|
|
|
|
|
<EasingDoubleKeyFrame KeyTime="0" Value="-1" />
|
|
|
|
|
|
<EasingDoubleKeyFrame KeyTime="0:0:2" Value="1" />
|
|
|
|
|
|
</DoubleAnimationUsingKeyFrames>
|
|
|
|
|
|
</Storyboard>
|
|
|
|
|
|
</ControlTemplate.Resources>
|
2025-12-28 11:47:54 +08:00
|
|
|
|
|
2026-02-22 20:03:42 +08:00
|
|
|
|
<Border
|
|
|
|
|
|
x:Name="backgroundBorder"
|
|
|
|
|
|
Background="{TemplateBinding Background}"
|
|
|
|
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
|
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
|
|
|
|
CornerRadius="4">
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 核心改变:命名为 PART_Track,WPF 原生接管容器 -->
|
|
|
|
|
|
<Grid x:Name="PART_Track">
|
|
|
|
|
|
<!-- 正常状态进度条:命名为 PART_Indicator,不绑Width,WPF自动算比例! -->
|
|
|
|
|
|
<Border
|
|
|
|
|
|
x:Name="PART_Indicator"
|
|
|
|
|
|
HorizontalAlignment="Left"
|
|
|
|
|
|
Background="{TemplateBinding Foreground}"
|
|
|
|
|
|
CornerRadius="3" />
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Indeterminate 动画层:默认隐藏,充满整个宽度 -->
|
|
|
|
|
|
<Border
|
|
|
|
|
|
x:Name="IndeterminateLayer"
|
|
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
|
|
Background="{TemplateBinding Foreground}"
|
|
|
|
|
|
CornerRadius="3"
|
|
|
|
|
|
Visibility="Collapsed" />
|
|
|
|
|
|
</Grid>
|
2025-12-28 11:47:54 +08:00
|
|
|
|
</Border>
|
2026-02-22 20:03:42 +08:00
|
|
|
|
|
2025-12-28 11:47:54 +08:00
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
|
|
<MultiTrigger>
|
|
|
|
|
|
<MultiTrigger.Conditions>
|
|
|
|
|
|
<Condition Property="IsIndeterminate" Value="True" />
|
|
|
|
|
|
<Condition Property="IsEnabled" Value="True" />
|
|
|
|
|
|
</MultiTrigger.Conditions>
|
2026-02-22 20:03:42 +08:00
|
|
|
|
<!-- 进入不确定状态时,隐藏原进度条,显示充满的动画层 -->
|
|
|
|
|
|
<Setter TargetName="PART_Indicator" Property="Visibility" Value="Collapsed" />
|
|
|
|
|
|
<Setter TargetName="IndeterminateLayer" Property="Visibility" Value="Visible" />
|
|
|
|
|
|
|
2025-12-28 11:47:54 +08:00
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryIndeterminateGradientBrush}" />
|
|
|
|
|
|
<MultiTrigger.EnterActions>
|
2026-02-20 15:31:44 +08:00
|
|
|
|
<BeginStoryboard x:Name="beginIndeterminate" Storyboard="{StaticResource ProgressIndeterminateHorizontal}" />
|
2025-12-28 11:47:54 +08:00
|
|
|
|
</MultiTrigger.EnterActions>
|
|
|
|
|
|
<MultiTrigger.ExitActions>
|
|
|
|
|
|
<RemoveStoryboard BeginStoryboardName="beginIndeterminate" />
|
|
|
|
|
|
</MultiTrigger.ExitActions>
|
|
|
|
|
|
</MultiTrigger>
|
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
|
</ControlTemplate>
|
2026-02-22 20:03:42 +08:00
|
|
|
|
|
|
|
|
|
|
|
2026-02-20 15:31:44 +08:00
|
|
|
|
<ControlTemplate x:Key="ProgressVerticalTemplate" TargetType="{x:Type ProgressBar}">
|
2025-12-28 11:47:54 +08:00
|
|
|
|
<ControlTemplate.Resources>
|
2026-02-20 15:31:44 +08:00
|
|
|
|
<Storyboard x:Key="ProgressIndeterminateVertical" RepeatBehavior="Forever">
|
2025-12-28 11:47:54 +08:00
|
|
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground.(Brush.RelativeTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
|
|
|
|
|
|
<EasingDoubleKeyFrame KeyTime="0" Value="1" />
|
|
|
|
|
|
<EasingDoubleKeyFrame KeyTime="0:0:2" Value="-1" />
|
|
|
|
|
|
</DoubleAnimationUsingKeyFrames>
|
|
|
|
|
|
</Storyboard>
|
|
|
|
|
|
</ControlTemplate.Resources>
|
2026-02-22 20:03:42 +08:00
|
|
|
|
|
2025-12-28 11:47:54 +08:00
|
|
|
|
<Border
|
2026-02-20 15:31:44 +08:00
|
|
|
|
x:Name="backgroundBorder"
|
2025-12-28 11:47:54 +08:00
|
|
|
|
Background="{TemplateBinding Background}"
|
|
|
|
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
|
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
2026-02-20 15:31:44 +08:00
|
|
|
|
CornerRadius="4">
|
2026-02-22 20:03:42 +08:00
|
|
|
|
|
|
|
|
|
|
<!-- 这里不再使用 PART_Track 命名,避免WPF原生逻辑干预 -->
|
|
|
|
|
|
<Grid x:Name="BarGrid">
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 正常状态进度条:靠底对齐,通过 Converter 计算高度 -->
|
|
|
|
|
|
<Border
|
|
|
|
|
|
x:Name="borderProgress"
|
|
|
|
|
|
VerticalAlignment="Bottom"
|
|
|
|
|
|
Background="{TemplateBinding Foreground}"
|
|
|
|
|
|
CornerRadius="3">
|
|
|
|
|
|
<Border.Height>
|
|
|
|
|
|
<!-- 将 ConverterParameter 改为 0,保证 100% 时完美充满 -->
|
|
|
|
|
|
<MultiBinding Converter="{x:Static internal:ValueToRangeWidthConverter.Instance}" ConverterParameter="0">
|
|
|
|
|
|
<Binding
|
|
|
|
|
|
Mode="OneWay"
|
|
|
|
|
|
Path="Minimum"
|
|
|
|
|
|
RelativeSource="{RelativeSource TemplatedParent}" />
|
|
|
|
|
|
<Binding
|
|
|
|
|
|
Mode="OneWay"
|
|
|
|
|
|
Path="Maximum"
|
|
|
|
|
|
RelativeSource="{RelativeSource TemplatedParent}" />
|
|
|
|
|
|
<Binding
|
|
|
|
|
|
Mode="OneWay"
|
|
|
|
|
|
Path="Value"
|
|
|
|
|
|
RelativeSource="{RelativeSource TemplatedParent}" />
|
|
|
|
|
|
<Binding
|
|
|
|
|
|
ElementName="BarGrid"
|
|
|
|
|
|
Mode="OneWay"
|
|
|
|
|
|
Path="ActualHeight" />
|
|
|
|
|
|
</MultiBinding>
|
|
|
|
|
|
</Border.Height>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Indeterminate 动画层:默认隐藏,充满整个高度 -->
|
|
|
|
|
|
<Border
|
|
|
|
|
|
x:Name="IndeterminateLayer"
|
|
|
|
|
|
VerticalAlignment="Stretch"
|
|
|
|
|
|
Background="{TemplateBinding Foreground}"
|
|
|
|
|
|
CornerRadius="3"
|
|
|
|
|
|
Visibility="Collapsed" />
|
2025-12-28 11:47:54 +08:00
|
|
|
|
</Grid>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
|
2026-02-22 20:03:42 +08:00
|
|
|
|
<ControlTemplate.Triggers>
|
2025-12-28 11:47:54 +08:00
|
|
|
|
<MultiTrigger>
|
|
|
|
|
|
<MultiTrigger.Conditions>
|
|
|
|
|
|
<Condition Property="IsIndeterminate" Value="True" />
|
|
|
|
|
|
<Condition Property="IsEnabled" Value="True" />
|
|
|
|
|
|
</MultiTrigger.Conditions>
|
2026-02-22 20:03:42 +08:00
|
|
|
|
<!-- 切换状态时控制 Visibility 隐藏计算好的进度条,显示充满的动画层 -->
|
|
|
|
|
|
<Setter TargetName="borderProgress" Property="Visibility" Value="Collapsed" />
|
|
|
|
|
|
<Setter TargetName="IndeterminateLayer" Property="Visibility" Value="Visible" />
|
|
|
|
|
|
|
2025-12-28 11:47:54 +08:00
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryIndeterminateGradientBrush}" />
|
|
|
|
|
|
<MultiTrigger.EnterActions>
|
2026-02-20 15:31:44 +08:00
|
|
|
|
<BeginStoryboard x:Name="beginIndeterminate" Storyboard="{StaticResource ProgressIndeterminateVertical}" />
|
2025-12-28 11:47:54 +08:00
|
|
|
|
</MultiTrigger.EnterActions>
|
|
|
|
|
|
<MultiTrigger.ExitActions>
|
|
|
|
|
|
<RemoveStoryboard BeginStoryboardName="beginIndeterminate" />
|
|
|
|
|
|
</MultiTrigger.ExitActions>
|
|
|
|
|
|
</MultiTrigger>
|
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
|
</ControlTemplate>
|
2026-02-22 20:03:42 +08:00
|
|
|
|
<Style x:Key="CircularProgressBarStyle" TargetType="ProgressBar">
|
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryNormalBrush}" />
|
|
|
|
|
|
<Setter Property="Background" Value="{DynamicResource ControlBackgroundNormalBrush}" />
|
|
|
|
|
|
<Setter Property="Width" Value="100" />
|
|
|
|
|
|
<Setter Property="Height" Value="100" />
|
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
|
<ControlTemplate TargetType="ProgressBar">
|
|
|
|
|
|
<Viewbox>
|
|
|
|
|
|
<Grid Width="100" Height="100">
|
|
|
|
|
|
<!-- 底色轨道 -->
|
|
|
|
|
|
<Ellipse
|
|
|
|
|
|
Width="100"
|
|
|
|
|
|
Height="100"
|
|
|
|
|
|
HorizontalAlignment="Center"
|
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
|
Stroke="{TemplateBinding Background}"
|
|
|
|
|
|
StrokeThickness="10" />
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 进度层 -->
|
|
|
|
|
|
<Path
|
|
|
|
|
|
x:Name="ProgressPath"
|
|
|
|
|
|
RenderTransformOrigin="0.5,0.5"
|
|
|
|
|
|
Stretch="None"
|
|
|
|
|
|
Stroke="{TemplateBinding Foreground}"
|
|
|
|
|
|
StrokeEndLineCap="Round"
|
|
|
|
|
|
StrokeStartLineCap="Round"
|
|
|
|
|
|
StrokeThickness="10">
|
|
|
|
|
|
<Path.RenderTransform>
|
|
|
|
|
|
<RotateTransform x:Name="RotateTransform" Angle="0" />
|
|
|
|
|
|
</Path.RenderTransform>
|
|
|
|
|
|
<Path.Data>
|
|
|
|
|
|
<MultiBinding Converter="{x:Static internal:ProgressToAngleConverter.Instance}">
|
|
|
|
|
|
<Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
|
|
|
|
|
|
<Binding Path="Maximum" RelativeSource="{RelativeSource TemplatedParent}" />
|
|
|
|
|
|
</MultiBinding>
|
|
|
|
|
|
</Path.Data>
|
|
|
|
|
|
</Path>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 文字显示(仅在非不确定模式下显示) -->
|
|
|
|
|
|
<TextBlock
|
|
|
|
|
|
x:Name="ValueText"
|
|
|
|
|
|
HorizontalAlignment="Center"
|
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
|
FontSize="20"
|
|
|
|
|
|
FontWeight="Bold"
|
|
|
|
|
|
Text="{Binding Value, RelativeSource={RelativeSource TemplatedParent}, StringFormat={}{0:0}%}" />
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
</Viewbox>
|
|
|
|
|
|
|
|
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
|
|
<!-- 不确定进度状态(转圈圈) -->
|
|
|
|
|
|
<Trigger Property="IsIndeterminate" Value="True">
|
|
|
|
|
|
<!-- 1. 隐藏文字 -->
|
|
|
|
|
|
<Setter TargetName="ValueText" Property="Visibility" Value="Collapsed" />
|
|
|
|
|
|
<!-- 2. 给 Path 一个固定的弧线数据 (大约 25% 长度) -->
|
|
|
|
|
|
<!-- M 50,5 代表起点;A 45,45... 代表半径45的圆弧到 95,50 -->
|
|
|
|
|
|
<Setter TargetName="ProgressPath" Property="Data" Value="M 50,5 A 45,45 0 0 1 95,50" />
|
|
|
|
|
|
<!-- 3. 执行旋转动画 -->
|
|
|
|
|
|
<Trigger.EnterActions>
|
|
|
|
|
|
<BeginStoryboard Name="SpinAnimation">
|
|
|
|
|
|
<Storyboard>
|
|
|
|
|
|
<DoubleAnimation
|
|
|
|
|
|
RepeatBehavior="Forever"
|
|
|
|
|
|
Storyboard.TargetName="ProgressPath"
|
|
|
|
|
|
Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)"
|
|
|
|
|
|
From="0"
|
|
|
|
|
|
To="360"
|
|
|
|
|
|
Duration="0:0:1" />
|
|
|
|
|
|
</Storyboard>
|
|
|
|
|
|
</BeginStoryboard>
|
|
|
|
|
|
</Trigger.EnterActions>
|
|
|
|
|
|
<Trigger.ExitActions>
|
|
|
|
|
|
<StopStoryboard BeginStoryboardName="SpinAnimation" />
|
|
|
|
|
|
</Trigger.ExitActions>
|
|
|
|
|
|
</Trigger>
|
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
|
</Setter>
|
|
|
|
|
|
</Style>
|
2025-12-28 11:47:54 +08:00
|
|
|
|
|
|
|
|
|
|
<Style TargetType="{x:Type ProgressBar}">
|
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryGradientBrush}" />
|
|
|
|
|
|
<Setter Property="Background" Value="{DynamicResource ControlBackgroundNormalBrush}" />
|
|
|
|
|
|
<Setter Property="BorderBrush" Value="Transparent" />
|
|
|
|
|
|
<Setter Property="Height" Value="8" />
|
|
|
|
|
|
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
|
|
|
|
|
<Setter Property="BorderThickness" Value="1" />
|
2025-10-10 11:19:58 +08:00
|
|
|
|
<Setter Property="Template" Value="{StaticResource HorizontalProgressTemplate}" />
|
2025-07-11 09:20:23 +08:00
|
|
|
|
<Style.Triggers>
|
2025-09-08 19:49:09 +08:00
|
|
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
|
|
|
|
<Setter Property="IsIndeterminate" Value="False" />
|
2025-10-10 11:19:58 +08:00
|
|
|
|
<Setter Property="Background" Value="{DynamicResource ControlBackgroundDisabledBrush}" />
|
2025-09-08 19:49:09 +08:00
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryDisabledBrush}" />
|
|
|
|
|
|
</Trigger>
|
2025-07-11 09:20:23 +08:00
|
|
|
|
<Trigger Property="Orientation" Value="Vertical">
|
2025-10-10 11:19:58 +08:00
|
|
|
|
<Setter Property="Template" Value="{StaticResource ProgressVerticalTemplate}" />
|
2025-12-28 11:47:54 +08:00
|
|
|
|
<Setter Property="Width" Value="8" />
|
2025-08-12 23:08:54 +08:00
|
|
|
|
<Setter Property="VerticalAlignment" Value="Stretch" />
|
|
|
|
|
|
<Setter Property="VerticalContentAlignment" Value="Stretch" />
|
2025-07-11 09:20:23 +08:00
|
|
|
|
</Trigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
2025-09-08 19:49:09 +08:00
|
|
|
|
|
2025-07-11 09:20:23 +08:00
|
|
|
|
</ResourceDictionary>
|