|
22 | 22 | <UserControl.Resources>
|
23 | 23 | <Converter:MultiplyConverter Value="0.5" x:Name="DiameterToRadius" />
|
24 | 24 | <Converter:SubstractConverter Value="10" x:Name="RadiusToInnerRadius" />
|
| 25 | + <Converter:LockStateConverter LockState="Locked" x:Name="IsLocked" /> |
| 26 | + <Converter:LockStateConverter LockState="Locked" Inverted="True" x:Name="IsNotLocked" /> |
25 | 27 | <Converter:SubstractConverter Value="40" x:Name="ContainerMargin" />
|
26 | 28 | <Style TargetType="Button" x:Key="CommandButton">
|
27 | 29 | <Setter Property="Width" Value="200"/>
|
|
31 | 33 | <Setter Property="Margin" Value="10,10,10,0" />
|
32 | 34 |
|
33 | 35 | </Style>
|
| 36 | + <Storyboard x:Name="lockActionInProgess" RepeatBehavior="Forever" AutoReverse="True"> |
| 37 | + <DoubleAnimation |
| 38 | + Storyboard.TargetName="RingContainer" |
| 39 | + Storyboard.TargetProperty="Opacity" |
| 40 | + From="1.0" To="0.0" Duration="0:0:1" |
| 41 | + /> |
| 42 | + </Storyboard> |
34 | 43 |
|
35 | 44 | </UserControl.Resources>
|
36 | 45 | <Grid>
|
|
71 | 80 | </VisualState.Setters>
|
72 | 81 | </VisualState>
|
73 | 82 | </VisualStateGroup>
|
74 |
| - </VisualStateManager.VisualStateGroups> |
| 83 | + <VisualStateGroup x:Name="RingState"> |
| 84 | + <VisualState> |
| 85 | + <VisualState.StateTriggers> |
| 86 | + <StateTrigger IsActive="{x:Bind ViewModel.LockState, Converter={StaticResource IsLocked}, Mode=OneWay}"></StateTrigger> |
| 87 | + </VisualState.StateTriggers> |
| 88 | + <VisualState.Setters> |
| 89 | + <Setter Target="MyRingSlice.StartAngle" Value="1"></Setter> |
| 90 | + <Setter Target="MyRingSlice.EndAngle" Value="359"></Setter> |
| 91 | + </VisualState.Setters> |
| 92 | + </VisualState> |
| 93 | + <VisualState> |
| 94 | + <VisualState.StateTriggers> |
| 95 | + <StateTrigger IsActive="{x:Bind ViewModel.LockState, Converter={StaticResource IsNotLocked}, Mode=OneWay}"></StateTrigger> |
| 96 | + </VisualState.StateTriggers> |
| 97 | + <VisualState.Setters> |
| 98 | + <Setter Target="MyRingSlice.StartAngle" Value="50"></Setter> |
| 99 | + <Setter Target="MyRingSlice.EndAngle" Value="310"></Setter> |
| 100 | + </VisualState.Setters> |
| 101 | + </VisualState> |
| 102 | + </VisualStateGroup> |
| 103 | + </VisualStateManager.VisualStateGroups> |
| 104 | + <FlipView SelectedIndex="{x:Bind ViewModel.SelectedFlipViewIndex, Mode=TwoWay}"> |
| 105 | + <Grid Background="{StaticResource ResourceKey=ContrastColorBrush}" > |
| 106 | + <TextBlock VerticalAlignment="Center" HorizontalAlignment="Right" Margin="50" FontSize="30" Text="Lock"> |
| 107 | + <!--<TextBlock.RenderTransform> |
| 108 | + <RotateTransform Angle="90"/> |
| 109 | + </TextBlock.RenderTransform>--> |
| 110 | + </TextBlock> |
| 111 | + </Grid> |
75 | 112 | <RelativePanel Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
| 113 | + |
76 | 114 | <RelativePanel x:Name="RingContainer" VerticalAlignment="Center"
|
77 | 115 | RelativePanel.AlignBottomWithPanel="True"
|
78 | 116 | RelativePanel.AlignLeftWithPanel="True"
|
|
97 | 135 | RelativePanel.AlignTopWithPanel="True"
|
98 | 136 | RelativePanel.AlignRightWithPanel="True"
|
99 | 137 | RelativePanel.AlignLeftWithPanel="True">
|
| 138 | + |
100 | 139 | <controls:RingSegment x:Name="MyRingSlice"
|
101 | 140 | HorizontalAlignment="Center"
|
102 | 141 | VerticalAlignment="Center" StartAngle="50" EndAngle="310"
|
103 | 142 | Fill="{StaticResource ApplicationForegroundThemeBrush}"
|
104 | 143 | Radius="100"
|
105 | 144 | InnerRadius="90">
|
| 145 | + |
106 | 146 | </controls:RingSegment>
|
107 |
| - |
| 147 | + |
108 | 148 | </Grid>
|
109 |
| - |
110 | 149 | </RelativePanel>
|
111 | 150 | <Grid
|
112 | 151 | RelativePanel.AlignBottomWithPanel="True"
|
|
164 | 203 | </i:Interaction.Behaviors>
|
165 | 204 |
|
166 | 205 | </RelativePanel>
|
| 206 | + <Grid Background="{StaticResource ResourceKey=ContrastColorBrush}" > |
| 207 | + <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Margin="50" FontSize="30" Text="Unlock"> |
| 208 | + <!--<TextBlock.RenderTransform> |
| 209 | + <RotateTransform Angle="270"/> |
| 210 | + </TextBlock.RenderTransform>--> |
| 211 | + </TextBlock> |
| 212 | + </Grid> |
| 213 | + </FlipView> |
167 | 214 | </Grid>
|
168 | 215 | </UserControl>
|
0 commit comments