diff --git a/Program.cs b/Program.cs index d2749f4..f442c14 100644 --- a/Program.cs +++ b/Program.cs @@ -10,14 +10,10 @@ internal sealed class Program [STAThread] private static async Task Main(string[] args) { - try - { - AppBuilder.Configure() - .UsePlatformDetect() - .WithInterFont() - .StartWithClassicDesktopLifetime(args); - } + try { BuildAvaloniaApp().StartWithClassicDesktopLifetime(args); } catch (Exception ex) { await MessageBoxManager.GetMessageBoxStandard(string.Empty, $"Error: {ex.Message}").ShowAsync(); } } + + private static AppBuilder BuildAvaloniaApp() => AppBuilder.Configure().UsePlatformDetect().WithInterFont(); }