How detect the orientation of the device (Portrait or Landscape) in Xamarin Forms?
Check to see if the width of the page is greater than the height in the OnSizeAllocated overload, as seen in this doc:
You could also check out the DeviceOrientation Plugin for Xamarin.
Use plugin for change and lock device orientation in runtime:
Xamarin Inc., as a wholly-owned Microsoft subsidiary acting as a separate legal entity, adheres to the Microsoft Privacy Statement: Privacy & cookies