mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-03-20 00:16:35 +08:00
feat: add sample in web app.
This commit is contained in:
26
demo/Semi.Avalonia.Demo.Web/Program.cs
Normal file
26
demo/Semi.Avalonia.Demo.Web/Program.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System.Runtime.Versioning;
|
||||
using Avalonia;
|
||||
using Avalonia.Media;
|
||||
using Avalonia.Web;
|
||||
using Semi.Avalonia.Demo.Web;
|
||||
|
||||
[assembly: SupportedOSPlatform("browser")]
|
||||
|
||||
internal partial class Program
|
||||
{
|
||||
private static void Main(string[] args) => BuildAvaloniaApp()
|
||||
.With(new FontManagerOptions
|
||||
{
|
||||
FontFallbacks = new[]
|
||||
{
|
||||
new FontFallback
|
||||
{
|
||||
FontFamily = new FontFamily("avares://Semi.Avalonia.Demo.Web/Assets/SourceHanSansCN-Regular.otf#Source Han Sans CN")
|
||||
}
|
||||
}
|
||||
})
|
||||
.SetupBrowserApp("out");
|
||||
|
||||
public static AppBuilder BuildAvaloniaApp()
|
||||
=> AppBuilder.Configure<App>();
|
||||
}
|
||||
Reference in New Issue
Block a user