We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 18deb34 commit 77b4edfCopy full SHA for 77b4edf
1 file changed
VBAudioRouter/App.xaml.vb
@@ -25,6 +25,14 @@ NotInheritable Class App
25
AddHandler SystemNavigationManagerPreview.GetForCurrentView().CloseRequested, Async Sub(sender As Object, ev As SystemNavigationCloseRequestedPreviewEventArgs)
26
Dim deferral As Deferral = ev.GetDeferral()
27
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
36
Dim dialog As New CloseConfirmDialog()
37
dialog.RequestedTheme = ElementTheme.Dark
38
ev.Handled = (Await dialog.ShowAsync()) = ContentDialogResult.Secondary
0 commit comments