0

I noticed that Microsoft Edge is capable of opening multiple windows, but i can not seem to find any example of this anywhere to open multiple windows.

I need to open multiple windows in my app for popups from my main windows WebView, i know this is possible but i dont know where to start nor is there anything on the internet

enter image description here

Connor S
  • 264
  • 1
  • 3
  • 12

1 Answers1

2

You can try following sample code

var currentAV = ApplicationView.GetForCurrentView();
var newAV = CoreApplication.CreateNewView();
await newAV.Dispatcher.RunAsync(
            CoreDispatcherPriority.Normal,
            async () =>
            {
                var newWindow = Window.Current;
                var newAppView = ApplicationView.GetForCurrentView();
                newAppView.Title = "New window";

                var frame = new Frame();
                frame.Navigate(typeof(MainPage), null);
                newWindow.Content = frame;
                newWindow.Activate();

                await ApplicationViewSwitcher.TryShowAsStandaloneAsync(
                    newAppView.Id,
                    ViewSizePreference.UseMinimum,
                    currentAV.Id,
                    ViewSizePreference.UseMinimum);
            });

Source: https://social.msdn.microsoft.com/Forums/sqlserver/en-US/f1328991-b5e5-48e1-b4ff-536a0013ef9f/uwpis-it-possible-to-open-a-new-window-in-uwp-apps?forum=wpdevelop

Muhammad Hassan
  • 1,037
  • 1
  • 8
  • 22