Files
Semi.Avalonia/src/Semi.Avalonia.Demo/Program.cs

33 lines
1.1 KiB
C#
Raw Normal View History

2022-11-04 22:47:42 +08:00
using Avalonia;
using System;
using Avalonia.Media;
2022-11-04 22:47:42 +08:00
2022-11-05 00:11:50 +08:00
namespace Semi.Avalonia.Demo
2022-11-04 22:47:42 +08:00
{
class Program
{
// Initialization code. Don't use any Avalonia, third-party APIs or any
// SynchronizationContext-reliant code before AppMain is called: things aren't initialized
// yet and stuff might break.
[STAThread]
public static void Main(string[] args) => BuildAvaloniaApp()
.With(new FontManagerOptions
{
FontFallbacks = new[]
{
new FontFallback
{
FontFamily = new FontFamily("Microsoft YaHei")
}
}
})
2022-11-04 22:47:42 +08:00
.StartWithClassicDesktopLifetime(args);
// Avalonia configuration, don't remove; also used by visual designer.
public static AppBuilder BuildAvaloniaApp()
=> AppBuilder.Configure<App>()
.UsePlatformDetect()
2022-12-11 12:17:52 +08:00
.With(new Win32PlatformOptions(){ UseCompositor = true})
2022-11-04 22:47:42 +08:00
.LogToTrace();
}
}