Hello @Mielesplayz ,
If you want to lock the screen orientation in your app, you can set it individually on each platform.
On Android:
You could open MainActivity.cs under Platforms/Android, then change the the orientation attribute.
[Activity(... ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation, ScreenOrientation = ScreenOrientation.Landscape)] //This is what controls orientation, you could force the application orientation to be Landscape or Portrait
On iOS:
You could double-click to open info.plist
file under Platforms/iOS, then find Device Orientation option and set the screen orientation according to your needs.
For more details, you can see Device Orientation - Xamarin | Microsoft Learn (These settings apply to Xamarin and MAUI, even though the documentation is about Xamarin)
Best Regards,
Wenyan Zhang
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.