I am writing an app which should be able to run multiple views to edit different documents each in their own window. I\'ve wrote some code which works, but I\'m having some
Actually the proper way to still be able to open up new windows after the main one is closed is to use one of the overloads provided by TryShowAsStandaloneAsync.
protected override async void OnLaunched(LaunchActivatedEventArgs e)
{
// Create the newWindowId and stuff...
await ApplicationViewSwitcher.TryShowAsStandaloneAsync(newWindowId,
ViewSizePreference.Default,
e.CurrentlyShownApplicationViewId,
ViewSizePreference.Default);
Basically, you need to specify the third parameter anchorViewId which is
the ID of the calling (anchor) window.
In this case, you just need to pass in e.CurrentlyShownApplicationViewId.