maui-linux/Xamarin.Forms.Core/DeviceOrientationExtensions.cs

18 строки
627 B
C#
Исходник Обычный вид История

using System.ComponentModel;
namespace Xamarin.Forms.Internals
2016-03-22 23:02:25 +03:00
{
[EditorBrowsable(EditorBrowsableState.Never)]
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;
}
}
}