Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to restrict the user from re-sizing a UWP app?

I am trying to port my existing WP8 app to Windows-10. Planning to release it in phases with just WP10 as primary target for phase-1. However I want to be able to release the same/slightly-scaled-up UI to desktop as well in phase-1. I have been playing around with a sample app trying to restrict window resizing by handling CoreWindow's SizeChanged event and preventing it from propagating. However this doesn't seem to do it for me. I am now wondering is it possible to restrict the user from re-sizing a UWP app at all? Any help/pointers would be much appreciated.

like image 881
Win10Devv Avatar asked Sep 15 '25 01:09

Win10Devv


1 Answers

PreferredLaunchViewSize and PreferredLaunchWindowingMode should helps to pre set the screen size. SetPreferredMinSize is used to set the minimum size of the app window.

Personally I don't think its a good practice to restrict the window size of the app since everything should under user's control.

Anyway TryResizeView | tryResizeView method should help to resize the app size.

like image 65
James He Avatar answered Sep 17 '25 15:09

James He