Hello,
Welcome to our Microsoft Q&A platform!
Are you using UWP's multi-view? If yes, you can refer to the instructions below. If not, please let me know
When creating multiple windows, you can use ApplicationView
Private Async Sub Button_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
Dim newView As CoreApplicationView = CoreApplication.CreateNewView()
Dim newViewId As Integer = 0
Await newView.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, Function()
Dim frame As Frame = New Frame()
frame.Navigate(GetType(SecondaryPage), Nothing)
Window.Current.Content = frame
Window.Current.Activate()
newViewId = ApplicationView.GetForCurrentView().Id
End Function)
Dim viewShown As Boolean = Await ApplicationViewSwitcher.TryShowAsStandaloneAsync(newViewId)
End Sub
In the above code, newViewId is the identifier of the window, if you need to use it to switch between windows later, you can save it as a global variable.
Later, if you want a window to be displayed in the foreground, you can write:
Await ApplicationViewSwitcher.SwitchAsync(newViewId);
For more related content, you can refer to this document.
Thanks.