1
1
using System ;
2
+ using System . Numerics ;
2
3
using System . Threading ;
4
+ using Windows . Foundation ;
5
+ using CommunityToolkit . WinUI ;
6
+ using CommunityToolkit . WinUI . Animations ;
3
7
using DryIoc ;
8
+ using Microsoft . UI . Composition ;
4
9
using Microsoft . UI . Xaml ;
5
10
using Microsoft . UI . Xaml . Controls ;
6
11
using Microsoft . UI . Xaml . Input ;
15
20
using ShadowViewer . ViewModels ;
16
21
using ShadowViewer . Services ;
17
22
using ShadowViewer . Core . Controls ;
23
+ using Microsoft . UI . Xaml . Media ;
18
24
19
25
namespace ShadowViewer . Pages
20
26
{
@@ -74,7 +80,7 @@ private async void Caller_TopGridEvent(object sender, TopGridEventArg e)
74
80
{
75
81
case TopGridMode . ContentDialog :
76
82
if ( e . Element is ContentDialog dialog )
77
- {
83
+ {
78
84
await dialog . ShowAsync ( ) ;
79
85
}
80
86
@@ -117,6 +123,11 @@ args.InvokedItemContainer.Tag is IShadowNavigationItem item &&
117
123
parameter = navigation . Parameter ;
118
124
page = navigation . Page ;
119
125
info = navigation . Info ;
126
+ if ( item . Icon != null )
127
+ {
128
+ var xy = new Vector2 ( item . Icon . ActualSize . X * 0.5f , item . Icon . ActualSize . Y * 0.5f ) ;
129
+ item . StartAnimation ? . CenterPoint ( xy , xy ) . Start ( item . Icon ) ;
130
+ }
120
131
}
121
132
122
133
info ??= args . RecommendedNavigationTransitionInfo ;
@@ -134,7 +145,6 @@ private void NavView_Loaded(object sender, RoutedEventArgs e)
134
145
{
135
146
}
136
147
137
-
138
148
139
149
private void SmokeGrid_RightTapped ( object sender , RightTappedRoutedEventArgs e )
140
150
{
0 commit comments