0

In the Microsoft documentation I found the following:

Controls that maintain their own orientation property might call InvalidateArrange

How do I implement this in my code so that the page or frame does not change its orientation?

Already grateful for the help!

Renan Gueiros
  • 27
  • 1
  • 5

1 Answers1

1

InvalidateArrange method can only be used for updating the layout of the UIElement which has their own orientation property, for example StackPanel.

How do I implement this in my code so that the page or frame does not change its orientation?

So, this method is not related to your problem, I think what you need is to forbidden your layout to update from landscape mode or portrait mode?

To do this, you can open up your manifest file and check the Supported rotations for example just enable the Landscape layout:

enter image description here

By default they are unchecked so can your page or frame update its layout to adjust to the window. Or you can refer to this thread: How to enable only landscape mode in a UWP app? The Api in the question can also be used.

Community
  • 1
  • 1
Grace Feng
  • 16,564
  • 2
  • 22
  • 45