Net8Blazor/NET8Blazor/PhotinoApp/Program.cs
2024-01-21 15:58:31 +01:00

28 lines
693 B
C#

using Photino.Blazor;
using UI.Components;
namespace UI;
public class Program
{
[STAThread]
public static void Main(string[] _)
{
var builder = PhotinoBlazorAppBuilder.CreateDefault();
builder.Services.AddRazorComponents()
.AddInteractiveServerComponents();
builder.RootComponents.Add<App>("app");
var app = builder.Build();
var window = app.MainWindow;
window.Title = "Title";
AppDomain.CurrentDomain.UnhandledException += (sender, error) =>
{
window.ShowMessage("Fatal exception", error.ExceptionObject.ToString());
};
app.Run();
}
}