Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

How to lock a single page to landscape orientation?

$
0
0

I have been researching and experimenting all day on this. I found some info but nothing has worked. I am primarily concerned with iOS at the moment.
I have tried creating a custom pagerenderer and hack my way around as explained in this post https://forums.xamarin.com/discussion/15516/unable-to-programatically-set-fixed-orientation-for-a-viewcontroller but I can't get it to work on the latest forms version. I think the post was for pre 1.3.

Can someone point me to some info on how to achieve this with 1.4?

On a related rant, I think it is a huge oversight to put out XF without any support for device orientation. I had to roll my "orientation changed" events in a base page / valueconverter / markupextension so I could change the layout and elements for different orientations. Xamarin is primarily a mobile framework/toolset, orientation is integral to mobile. To say things like "well, if orientation is important then you shouldn't use XF" is stupid. That is to say that I should rewrite a ton of UI code just to support what should be a function supported by the framework. Not to mention guys like me who pay for a business subscription spend a lot of money to speed up the workflow, I don't feel I should spend so much time writing things that should have been included. If thats the case give me a discount and call this XF beta 14 instead of 1.4.

Sorry for the rant, but Im frustrated that I've spent so much time on something that every other open source mobile framework includes and could be set in a page element like 'Orientation="Landscape"' and I haven't even come close to a solution yet.

Thanks,
Jason


Viewing all articles
Browse latest Browse all 58056

Trending Articles