File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,14 @@ NotInheritable Class App
2525 AddHandler SystemNavigationManagerPreview.GetForCurrentView().CloseRequested, Async Sub (sender As Object , ev As SystemNavigationCloseRequestedPreviewEventArgs)
2626 Dim deferral As Deferral = ev.GetDeferral()
2727 Try
28+ ' Force all legacy dialogs to close
29+ For Each popup In VisualTreeHelper.GetOpenPopups(Window.Current)
30+ Dim legacyDialog As ContentDialog = TryCast (popup?.Child, ContentDialog)
31+ If legacyDialog IsNot Nothing Then
32+ legacyDialog.Hide()
33+ End If
34+ Next
35+ ' Show confirmation dialog
2836 Dim dialog As New CloseConfirmDialog()
2937 dialog.RequestedTheme = ElementTheme.Dark
3038 ev.Handled = ( Await dialog.ShowAsync()) = ContentDialogResult.Secondary
You can’t perform that action at this time.
0 commit comments