c# - Windows 10 UWP app - Setting window size on desktop -


i've started learning uwp app development on windows 10 pro using visual studio 2015 community edition. tried modify c# version of official "hello, world" sample setting width , height attributes of page tag in mainpage.xaml. interestingly, when start app, size different. moreover, if resize window , restart it, app seems remember previous window size.

is possible force uwp app have predefined window size, @ least on desktop pcs?

try setting preferredlaunchviewsize in mainpage's constructor this.

public mainpage() {     this.initializecomponent();      applicationview.preferredlaunchviewsize = new size(480, 800);     applicationview.preferredlaunchwindowingmode = applicationviewwindowingmode.preferredlaunchviewsize; } 

update

as @kol pointed out, if want size smaller default 500x320, need manually reset it.

applicationview.getforcurrentview().setpreferredminsize(new size(200, 100)); 

Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -