A cross-platform UI framework for .NET
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

27 lines
592 B

using System;
using Avalonia.Metadata;
namespace Avalonia.Platform
{
[PrivateApi]
public interface IRuntimePlatform
{
RuntimePlatformInfo GetRuntimeInfo();
}
[PrivateApi]
public record struct RuntimePlatformInfo
{
public FormFactorType FormFactor => IsDesktop ? FormFactorType.Desktop :
IsMobile ? FormFactorType.Mobile : FormFactorType.Unknown;
public bool IsDesktop { get; set; }
public bool IsMobile { get; set; }
}
public enum FormFactorType
{
Unknown,
Desktop,
Mobile
}
}