更新
This commit is contained in:
@@ -1,15 +1,8 @@
|
||||
<!--
|
||||
This Source Code Form is subject to the terms of the MIT License.
|
||||
If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
|
||||
Copyright (C) Leszek Pomianowski and WPF UI Contributors.
|
||||
All Rights Reserved.
|
||||
-->
|
||||
|
||||
<ResourceDictionary
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:WPFluent.Controls"
|
||||
xmlns:converters="clr-namespace:WPFluent.Converters">
|
||||
xmlns:converters="clr-namespace:WPFluent.Converters"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<converters:ProgressThicknessConverter x:Key="ProgressThicknessConverter" />
|
||||
|
||||
@@ -17,14 +10,14 @@
|
||||
<Setter Property="Height" Value="60" />
|
||||
<Setter Property="Width" Value="60" />
|
||||
<Setter Property="Focusable" Value="False" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource ProgressRingForegroundThemeBrush}" />
|
||||
<Setter Property="CoverRingStroke" Value="{DynamicResource ProgressRingBackgroundThemeBrush}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource SystemFillColorAttentionBrush}" />
|
||||
<Setter Property="CoverRingStroke" Value="{DynamicResource ControlFillColorTransparentBrush}" />
|
||||
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||
<Setter Property="OverridesDefaultStyle" Value="True" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type controls:ProgressRing}">
|
||||
<Grid Width="{TemplateBinding Width}" Height="{TemplateBinding Height}">
|
||||
<Grid Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
|
||||
<controls:Arc
|
||||
EndAngle="359"
|
||||
StartAngle="0"
|
||||
@@ -45,7 +38,7 @@
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type controls:ProgressRing}">
|
||||
<Grid Width="{TemplateBinding Width}" Height="{TemplateBinding Height}">
|
||||
<Grid Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
|
||||
<controls:Arc
|
||||
EndAngle="359"
|
||||
StartAngle="0"
|
||||
@@ -53,12 +46,12 @@
|
||||
StrokeThickness="{Binding Path=Height, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay, Converter={StaticResource ProgressThicknessConverter}}"
|
||||
Visibility="{TemplateBinding CoverRingVisibility}" />
|
||||
<controls:Arc
|
||||
x:Name="Arc"
|
||||
EndAngle="{TemplateBinding IndeterminateAngle}"
|
||||
RenderTransformOrigin="0.5, 0.5"
|
||||
StartAngle="0"
|
||||
Stroke="{TemplateBinding Foreground}"
|
||||
StrokeThickness="{Binding Path=Height, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay, Converter={StaticResource ProgressThicknessConverter}}">
|
||||
StrokeThickness="{Binding Path=Height, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay, Converter={StaticResource ProgressThicknessConverter}}"
|
||||
x:Name="Arc">
|
||||
<controls:Arc.RenderTransform>
|
||||
<RotateTransform />
|
||||
</controls:Arc.RenderTransform>
|
||||
@@ -70,20 +63,20 @@
|
||||
<BeginStoryboard>
|
||||
<Storyboard>
|
||||
<DoubleAnimation
|
||||
Duration="0:0:2"
|
||||
RepeatBehavior="Forever"
|
||||
Storyboard.TargetName="Arc"
|
||||
Storyboard.TargetProperty="(Canvas.RenderTransform).(RotateTransform.Angle)"
|
||||
To="360"
|
||||
Duration="0:0:2" />
|
||||
To="360" />
|
||||
|
||||
<DoubleAnimation
|
||||
AutoReverse="True"
|
||||
Duration="0:0:5"
|
||||
From="100"
|
||||
RepeatBehavior="Forever"
|
||||
Storyboard.TargetName="Arc"
|
||||
Storyboard.TargetProperty="EndAngle"
|
||||
From="100"
|
||||
To="320"
|
||||
Duration="0:0:5" />
|
||||
To="320" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.EnterActions>
|
||||
|
||||
Reference in New Issue
Block a user