37 lines
1.1 KiB
C#
Raw Normal View History

using Avalonia;
2023-02-01 21:33:12 +08:00
using Avalonia.Dialogs;
2023-01-20 23:08:33 +08:00
using Avalonia.Media;
using System;
using System.Linq;
using System.Threading;
2023-01-20 23:08:33 +08:00
namespace Semi.Avalonia.Demo.Desktop;
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]
2023-07-09 09:52:28 +08:00
public static void Main(string[] args) => BuildAvaloniaApp()
.With(new FontManagerOptions
2023-01-20 23:08:33 +08:00
{
FontFallbacks = new[]
{
new FontFallback
{
FontFamily = new FontFamily("Microsoft YaHei")
}
}
2023-07-09 09:52:28 +08:00
})
.StartWithClassicDesktopLifetime(args);
2023-01-20 23:08:33 +08:00
// Avalonia configuration, don't remove; also used by visual designer.
public static AppBuilder BuildAvaloniaApp()
=> AppBuilder.Configure<App>()
2023-02-01 21:33:12 +08:00
.UseManagedSystemDialogs()
2023-01-20 23:08:33 +08:00
.UsePlatformDetect()
.With(new Win32PlatformOptions())
2023-01-20 23:08:33 +08:00
.LogToTrace();
}