Forum Xamarin.Forms

Xamarin Forms force ContentView orientation on fixed portrait mode

I have a Xamarin Forms app that is fixed to only displaying in portrait mode on both Android and iOS platforms. On one of the ContentPages I have a ContentView that hosts a custom Video Player implementation. The player has a maximize button that when pressed, extends the bounds of the ContentView in such a way that it occupies whole screen to mimic full screen effect. However, my requirement is for the Video Player to maximize only to landscape mode, but it obviously displays in portrait mode only. Is this possible with Xamarin Forms and/or custom renderer for ContentView?
For example, BBC's official app does this on iOS - it's article pages are fixed to portrait mode, but when an article contains a video, and you press the maximize video button, the video maximizes to landscape mode.

Best Answer


  • astralmasterastralmaster Member ✭✭

    Yes, that's what I ended up doing as well. Thank you for answering.

Sign In or Register to comment.