-
Notifications
You must be signed in to change notification settings - Fork 710
/
Copy pathProgressRing.xaml
44 lines (40 loc) · 2.27 KB
/
ProgressRing.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<!-- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See LICENSE in the project root for license information. -->
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Microsoft.UI.Xaml.Controls">
<Style TargetType="local:ProgressRing">
<Setter Property="Foreground" Value="{ThemeResource ProgressRingForegroundThemeBrush}" />
<Setter Property="Background" Value="{ThemeResource ProgressRingBackgroundThemeBrush}" />
<Setter Property="IsHitTestVisible" Value="False" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="MinHeight" Value="16" />
<Setter Property="MinWidth" Value="16" />
<Setter Property="IsTabStop" Value="False" />
<Setter Property="Width" Value="32" />
<Setter Property="Height" Value="32" />
<Setter Property="Maximum" Value="100" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="local:ProgressRing">
<Grid x:Name="LayoutRoot" Background="Transparent">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Inactive">
<VisualState.Setters>
<Setter Target="LayoutRoot.Opacity" Value="0" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="DeterminateActive"/>
<VisualState x:Name="Active" />
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<!-- AnimatedVisualPlayer for Lottie -->
<local:AnimatedVisualPlayer x:Name="LottiePlayer" AutoPlay="false" Stretch="fill" Opacity="1"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>