2017-03-07 22:56:24 +03:00
|
|
|
using System.ComponentModel;
|
|
|
|
|
|
|
|
namespace Xamarin.Forms.Internals
|
2016-03-22 23:02:25 +03:00
|
|
|
{
|
2017-03-09 21:38:06 +03:00
|
|
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
2017-03-07 22:56:24 +03:00
|
|
|
public static class DeviceOrientationExtensions
|
2016-03-22 23:02:25 +03:00
|
|
|
{
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|