File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Microsoft.Toolkit.Graph.Controls/Controls/LoginButton Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 55using System ;
66using System . ComponentModel ;
77using System . Threading . Tasks ;
8- using Microsoft . Graph . Auth ;
98using Microsoft . Toolkit . Graph . Providers ;
109using Windows . UI . Xaml ;
1110using Windows . UI . Xaml . Controls ;
@@ -181,6 +180,12 @@ public async Task LoginAsync()
181180 /// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
182181 public async Task LogoutAsync ( )
183182 {
183+ // Close Menu
184+ if ( FlyoutBase . GetAttachedFlyout ( _loginButton ) is FlyoutBase flyout )
185+ {
186+ flyout . Hide ( ) ;
187+ }
188+
184189 var cargs = new CancelEventArgs ( ) ;
185190 LogoutInitiated ? . Invoke ( this , cargs ) ;
186191
@@ -206,12 +211,6 @@ public async Task LogoutAsync()
206211
207212 LogoutCompleted ? . Invoke ( this , new EventArgs ( ) ) ;
208213 }
209-
210- // Close Menu
211- if ( FlyoutBase . GetAttachedFlyout ( _loginButton ) is FlyoutBase flyout )
212- {
213- flyout . Hide ( ) ;
214- }
215214 }
216215 }
217216}
You can’t perform that action at this time.
0 commit comments