Device & UX
Plugin.Maui.DeviceOrientationPlus
Lock and unlock landscape or portrait, per page
Lock, unlock, and listen for screen orientation in MAUI. DeviceDisplay orientation is read-only; this package is the missing write path for video, scanning, POS, and inspection.
Install
dotnet add package Plugin.Maui.DeviceOrientationPlusPackage ID: Plugin.Maui.DeviceOrientationPlus
Overview
Plugin.Maui.DeviceOrientationPlus locks, unlocks, and listens for screen orientation in MAUI on Android and iOS. DeviceDisplay.MainDisplayInfo.Orientation is read-only. This package is the missing write path: Orientation.Lock(Portrait), Unlock, SetAsync(Landscape), Changed, and a stack so a video page can lock landscape on top of a portrait lock and restore on disappear.
Capabilities
- Lock portrait or landscape.
- Per-page lock in OnAppearing / OnDisappearing.
- Changed with previous, current, and locked state.
- Scoped locks that restore automatically.
- .NET MAUI
- Orientation
- Landscape
- C#