I am writing a small UWP app which is going to be launched from another app (the main app). I am hoping to decrease the window size of the UWP app.
I was able to change the window size by adding the code commented below into the App constructor. But I couldn't figure out how to make the UWP app center screen after I changed the window size. Any advices on making the UWP center screen is appreciated.
public App()
{
this.InitializeComponent();
this.Suspending += OnSuspending;
ApplicationView.PreferredLaunchViewSize = new Size(600, 400); //added code
ApplicationView.PreferredLaunchWindowingMode = ApplicationViewWindowingMode.PreferredLaunchViewSize; //added code
}