# Tip: force the orientation of a WinRT page

> Here's a little tip for multi oriented apps. When developing a WinRT application, when creating it you can choose whether to manage several types of orientations…

- Author: Jérôme Giacomini
- Language: en
- Canonical URL: [Tip: force the orientation of a WinRT page](https://jeromegiacomini.net/articles/2015/05/10/tip-force-the-orientation-of-a-winrt-page)
- Published: 2015-05-10
- Last modified: 2026-09-05
- Topics: C#, Windows

Here's a little tip for multi-oriented apps.

When developing a WinRT application, when creating it you can choose whether to manage several types of orientations (Portrait/Landscape).

![rotation](/media/2015/forcer-lorientation-dune-page-winrt/images/51-rotation.webp)

If nothing is specified, the framework itself translates a page into a landscape or portrait, depending on the phone's orientation.

But it can be convenient to have a page that supports only Portrait visuals and other pages that support all displays!

The framework provides us with the DisplayInformation class that can change this behavior.

For example, I can only force portrait mode:

```csharp
DisplayInformation.AutoRotationPreferences = DisplayOrientations.Portrait;
```


Or reactivate portrait and landscape mode:

```csharp
DisplayInformation.AutoRotationPreferences = DisplayOrientations.Portrait | DisplayOrientations.Landscape;
```
