Windows 10 automatically applies a scale factor to UWP apps, to give a similar effective pixel size across multiple devices.
I want my UWP UI to look the same across any screen of the same resolution, regardless of the scale factor. Is this possible?
For instance, when running my app on the Hololens it applies a 150% scale factor. This means the UI looks squished when compare to a desktop screen of a similar resolution (1280x720).
A suggestion (How to disable auto-scaling on UWP mobile) says to use TrySetDisableLayoutScaling on the ApplicationViewScaling Class. But this doesn't work. The documentation says it only works for Xbox.
Another possibility is to apply a scale transform (How to scale a windows universal desktop app programatically). However, I would have to apply a different scale, depending on the device, to negate the scale factor windows automatically applies. But this is not ideal.
It seems my only option is to make different UIs for each device family, that take into account the different scale factors.
I am suprised there is no way to just turn is off! Any help would be greatly appreciated.
Disabling the layout scaling is currently only possible for the Xbox devices.
This is confirmed by the ApplicationViewScaling class documentation which states, "This method will always return false on devices other than Xbox".
I have created a request to allow this for the Hololens. You can vote for it here: https://wpdev.uservoice.com/forums/110705-universal-windows-platform/suggestions/32441581-disable-layout-scaling-for-hololens-trysetdisabl