How can I launch another app in full screen using LaunchUriForResultAsync?

Viewed 413

I would like to use the LaunchUriForResultAsync to launch my other app and get some results from it. But I want to launch the other app in full screen and if that's not possible maybe just launch it in a bigger size.

When I launch another app using LaunchUriForResultAsync, the modal app launches in 500x500 size. I would need something bigger than that because I need to create a data entry app that requires more space which multiple applications can launch. I tried to set the DesiredRemainingView and PreferredLaunchWindowingMode to FullScreen. It didn't make my other app launch in full screen.

Is there a way I can use LaunchUriForResultAsync to launch my other app in full screen?

2 Answers

If the device is in Tablet Mode, you can use ViewSizePreference.SizeNone and the app will be launched in full screen:

var options = new Windows.System.LauncherOptions();
options.DesiredRemainingView = Windows.UI.ViewManagement.ViewSizePreference.UseNone;
await Windows.System.Launcher.LaunchUriAsync(uri, options);

I think part of the confusion here is that the size preference defines the space your current app desires, not the size you want for the launched app. Because the target app can have its own preferences.

This solution does not work if Tablet Mode is disabled, then you would have to go with a solution as Rob Caplan suggested.

Related