I wanted my UWP app, running on windows 10, to support only Landscape orientations, but here is a one problem. First i founded this question: link
This example from GitHub works fine then I try to set orientation with checkboxes, and when i set orientation like this:
DisplayOrientations orientations = DisplayOrientations.Landscape;
DisplayInformation.AutoRotationPreferences = orientations;
it works too. Great.
But here is an issue. If you'll try to press Start to suspend app and press it again to resume app all rotation preferences will be set in default. It works like reset for rotation preferences.
I tried to set Suspending method, but it doesn't work. Tried with debugger and without it, this doesn't works. Setting "Supported rotations" and "Lock Screen" declaration in manifest file doesn't work too. Can somebody help me?