Rotate page programmatically

Hi there,

I’m building a video player for Jellyfin. One of the features I want to implement is to automatically rotate the screen when it detects the video is in landscape or portrait.

I’ve tried setting the orientation property of the Page, but that doesn’t work since it’s readonly. Same goes for the ApplicationWindow. Are there any other options available?

I think you can look at rotate
You could also set Allowed orientations to landscape

Use the allowedOrientations property and set accordingly, Orientation.Landscape, Orientation.Portrait or Orientation.All

1 Like

That seems to work. Too bad it won’t let you override the rotation as an user later, but I think it’s fair to assume that there are no users willing to watch landscape videos in portrait mode.