ScreenOrientation


How to use the ScreenOrientation class of the bit Butil?

Usage
To use the browser ScreenOrientation features you need to inject the Bit.Butil.ScreenOrientation class and use it like this:
@inject Bit.Butil.ScreenOrientation screenOrientation

@code {
    var angle = await screenOrientation.GetAngle();
}
Methods

GetOrientationType:
Returns the document's current orientation type. (MDN).



GetAngle:
Returns the document's current orientation angle. (MDN).



Lock:
Locks the orientation of the containing document to the specified orientation. Typically orientation locking is only enabled on mobile devices, and when the browser context is full screen. (MDN).


Unlock:
Unlocks the orientation of the containing document from its default orientation. (MDN).


AddChange, RemoveChange:
The change event of the ScreenOrientation interface fires when the orientation of the screen has changed, for example when a user rotates their mobile phone. (MDN).