You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.
When you run the UWP app on a PC for the first time, the app will open in size(other than the height and width we set) other than the size we set. From second time when we open the app in that PC there is no issue, it will open in the size which we set. Issue is present only during first time open of the app on that particular PC.
To reproduce this issue on the same PC we need to unistall and install the app and open the app. So that it behaves as if it is installed freshly on this PC and it opens in a size it wish(may be some default size values it taking when opened for first time).
Our team tried to fix this by searching the place to put the default height and width values, but we didn't find any way. Is there any other way or is this a bug?
The temporary solution we made is we are resizing the screen to the required size(height and width) values if the app is open for the first time on that PC.
eg: we need to write this code in onnavigated to and onlaunched methods of app,xaml.cs:
When you run the UWP app on a PC for the first time, the app will open in size(other than the height and width we set) other than the size we set. From second time when we open the app in that PC there is no issue, it will open in the size which we set. Issue is present only during first time open of the app on that particular PC.
To reproduce this issue on the same PC we need to unistall and install the app and open the app. So that it behaves as if it is installed freshly on this PC and it opens in a size it wish(may be some default size values it taking when opened for first time).
Our team tried to fix this by searching the place to put the default height and width values, but we didn't find any way. Is there any other way or is this a bug?
The temporary solution we made is we are resizing the screen to the required size(height and width) values if the app is open for the first time on that PC.
eg: we need to write this code in onnavigated to and onlaunched methods of app,xaml.cs:
`Size size = new Size(width, height);
ApplicationView.GetForCurrentView().SetPreferredMinSize(size);
ApplicationView.PreferredLaunchViewSize = size;
ApplicationView.PreferredLaunchWindowingMode=ApplicationViewWindowingMode.PreferredLaunchViewSize;`
The text was updated successfully, but these errors were encountered: