blob: fae2e76ab3702ab1f52c75082feb7fb5f028ce8b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
using System.ComponentModel;
namespace Xamarin.Forms.Internals
{
[EditorBrowsable(EditorBrowsableState.Never)]
public static class DeviceOrientationExtensions
{
public static bool IsLandscape(this DeviceOrientation orientation)
{
return orientation == DeviceOrientation.Landscape || orientation == DeviceOrientation.LandscapeLeft || orientation == DeviceOrientation.LandscapeRight;
}
public static bool IsPortrait(this DeviceOrientation orientation)
{
return orientation == DeviceOrientation.Portrait || orientation == DeviceOrientation.PortraitDown || orientation == DeviceOrientation.PortraitUp;
}
}
}
|