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.
 
 
 

18 lines
671 B

using Avalonia.Compatibility;
using Avalonia.Metadata;
namespace Avalonia.Platform
{
[PrivateApi]
public class StandardRuntimePlatform : IRuntimePlatform
{
public virtual RuntimePlatformInfo GetRuntimeInfo() => new()
{
IsDesktop = OperatingSystemEx.IsWindows()
|| OperatingSystemEx.IsMacOS() || OperatingSystemEx.IsMacCatalyst()
|| OperatingSystemEx.IsLinux() || OperatingSystemEx.IsFreeBSD(),
IsMobile = OperatingSystemEx.IsAndroid() || (OperatingSystemEx.IsIOS() && !OperatingSystemEx.IsMacCatalyst()),
IsTV = OperatingSystemEx.IsTvOS()
};
}
}