代码拉取完成,页面将自动刷新
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:WPFDevelopers.Controls"
xmlns:shapes="clr-namespace:Microsoft.Expression.Drawing.Shapes"
xmlns:sys="clr-namespace:System;assembly=mscorlib">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Themes/Basic/ControlBasic.xaml" />
<ResourceDictionary Source="../Themes/Basic/Animations.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style x:Key="WD.NormalLoading" TargetType="{x:Type controls:NormalLoading}">
<Setter Property="Width" Value="40" />
<Setter Property="Height" Value="40" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type controls:NormalLoading}">
<Viewbox Width="{TemplateBinding Width}" Height="{TemplateBinding Height}">
<Grid>
<Grid.Resources>
<Storyboard x:Key="StarStoryboard" RepeatBehavior="Forever">
<DoubleAnimation
Storyboard.TargetName="PART_Ellipse"
Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)"
To="360"
Duration="0:0:1.0" />
</Storyboard>
</Grid.Resources>
<Ellipse
Width="{TemplateBinding Width}"
Height="{TemplateBinding Height}"
Stroke="{DynamicResource WD.BaseBrush}"
StrokeDashArray="100,100"
StrokeThickness="2" />
<Ellipse
x:Name="PART_Ellipse"
Width="{TemplateBinding Width}"
Height="{TemplateBinding Height}"
RenderTransformOrigin=".5,.5"
Stretch="Uniform"
Stroke="{DynamicResource WD.PrimaryBrush}"
StrokeDashArray="{TemplateBinding StrokeArray}"
StrokeThickness="2">
<Ellipse.RenderTransform>
<RotateTransform Angle="0" />
</Ellipse.RenderTransform>
<Ellipse.Triggers>
<EventTrigger RoutedEvent="Loaded">
<BeginStoryboard x:Name="LoadedBeginStoryboard" Storyboard="{StaticResource StarStoryboard}" />
</EventTrigger>
<EventTrigger RoutedEvent="Unloaded">
<StopStoryboard BeginStoryboardName="LoadedBeginStoryboard" />
</EventTrigger>
</Ellipse.Triggers>
</Ellipse>
</Grid>
</Viewbox>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style
x:Key="WD.DefaultLoading"
BasedOn="{StaticResource WD.ControlBasicStyle}"
TargetType="{x:Type controls:DefaultLoading}">
<Setter Property="BorderBrush" Value="{DynamicResource WD.PrimaryBrush}" />
<Setter Property="Height" Value="40" />
<Setter Property="Width" Value="40" />
<Setter Property="ArcThickness" Value="2" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type controls:DefaultLoading}">
<ControlTemplate.Resources>
<Storyboard x:Key="WD.PlayStoryboard" RepeatBehavior="Forever">
<DoubleAnimation
RepeatBehavior="Forever"
Storyboard.TargetName="PART_Grid"
Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)"
To="360"
Duration="0:0:0.784" />
<DoubleAnimationUsingKeyFrames
RepeatBehavior="Forever"
Storyboard.TargetName="PART_Arc"
Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)">
<SplineDoubleKeyFrame KeyTime="0" Value="0" />
<SplineDoubleKeyFrame
KeySpline="0.4,0.0,0.2,1"
KeyTime="0:0:0.666"
Value="135" />
<SplineDoubleKeyFrame
KeySpline="0.4,0.0,0.2,1"
KeyTime="0:0:1.333"
Value="270" />
<SplineDoubleKeyFrame
KeySpline="0.4,0.0,0.2,1"
KeyTime="0:0:1.999"
Value="405" />
<SplineDoubleKeyFrame
KeySpline="0.4,0.0,0.2,1"
KeyTime="0:0:2.666"
Value="540" />
<SplineDoubleKeyFrame
KeySpline="0.4,0.0,0.2,1"
KeyTime="0:0:3.333"
Value="675" />
<SplineDoubleKeyFrame
KeySpline="0.4,0.0,0.2,1"
KeyTime="0:0:3.999"
Value="810" />
<SplineDoubleKeyFrame
KeySpline="0.4,0.0,0.2,1"
KeyTime="0:0:4.666"
Value="945" />
<SplineDoubleKeyFrame
KeySpline="0.4,0.0,0.2,1"
KeyTime="0:0:5.332"
Value="1080" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames
RepeatBehavior="Forever"
Storyboard.TargetName="PART_Arc"
Storyboard.TargetProperty="(shapes:Arc.StartAngle)">
<SplineDoubleKeyFrame KeyTime="0" Value="-5" />
<SplineDoubleKeyFrame
KeySpline="0.4,0.0,0.2,1"
KeyTime="0:0:0.666"
Value="-130" />
<SplineDoubleKeyFrame
KeySpline="0.4,0.0,0.2,1"
KeyTime="0:0:1.333"
Value="-5" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames
RepeatBehavior="Forever"
Storyboard.TargetName="PART_Arc"
Storyboard.TargetProperty="(shapes:Arc.EndAngle)">
<SplineDoubleKeyFrame KeyTime="0" Value="5" />
<SplineDoubleKeyFrame
KeySpline="0.4,0.0,0.2,1"
KeyTime="0:0:0.666"
Value="130" />
<SplineDoubleKeyFrame
KeySpline="0.4,0.0,0.2,1"
KeyTime="0:0:1.333"
Value="5" />
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</ControlTemplate.Resources>
<Grid x:Name="PART_Grid" RenderTransformOrigin=".5,.5">
<Grid.RenderTransform>
<RotateTransform />
</Grid.RenderTransform>
<shapes:Arc
x:Name="PART_Arc"
Width="{TemplateBinding ActualWidth}"
Height="{TemplateBinding ActualHeight}"
ArcThickness="{TemplateBinding ArcThickness}"
EndAngle="5"
Fill="{TemplateBinding BorderBrush}"
RenderTransformOrigin=".5,.5"
StartAngle="-5"
Stretch="None"
StrokeThickness="0">
<shapes:Arc.RenderTransform>
<RotateTransform />
</shapes:Arc.RenderTransform>
</shapes:Arc>
</Grid>
<ControlTemplate.Triggers>
<EventTrigger RoutedEvent="Loaded">
<BeginStoryboard Storyboard="{StaticResource WD.PlayStoryboard}" />
</EventTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style
x:Key="WD.ProgressLoading"
BasedOn="{StaticResource WD.ControlBasicStyle}"
TargetType="{x:Type controls:ProgressLoading}">
<Setter Property="BorderBrush" Value="{DynamicResource WD.PrimaryBrush}" />
<Setter Property="Height" Value="40" />
<Setter Property="Width" Value="40" />
<Setter Property="ArcThickness" Value="2" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type controls:ProgressLoading}">
<ControlTemplate.Resources>
<Storyboard x:Key="WD.PlayStoryboard" RepeatBehavior="Forever">
<DoubleAnimation
RepeatBehavior="Forever"
Storyboard.TargetName="PART_Grid"
Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)"
To="360"
Duration="0:0:0.784" />
</Storyboard>
</ControlTemplate.Resources>
<Grid x:Name="PART_Grid" RenderTransformOrigin=".5,.5">
<Grid.RenderTransform>
<RotateTransform />
</Grid.RenderTransform>
<shapes:Arc
x:Name="PART_Arc"
Width="{TemplateBinding ActualWidth}"
Height="{TemplateBinding ActualHeight}"
ArcThickness="{TemplateBinding ArcThickness}"
EndAngle="{TemplateBinding Value}"
Fill="{TemplateBinding BorderBrush}"
StartAngle="0"
Stretch="None"
StrokeThickness="0" />
</Grid>
<ControlTemplate.Triggers>
<EventTrigger RoutedEvent="Loaded">
<BeginStoryboard Storyboard="{StaticResource WD.PlayStoryboard}" />
</EventTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style BasedOn="{StaticResource WD.NormalLoading}" TargetType="{x:Type controls:NormalLoading}" />
<Style BasedOn="{StaticResource WD.DefaultLoading}" TargetType="{x:Type controls:DefaultLoading}" />
<Style BasedOn="{StaticResource WD.ProgressLoading}" TargetType="{x:Type controls:ProgressLoading}" />
</ResourceDictionary>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。