Created
June 15, 2021 15:44
-
-
Save lgolubyev/2282e7bbb8469403b7a3a60c11b0bc63 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Application : MauiApp | |
{ | |
public override IAppHostBuilder CreateBuilder() => | |
base.CreateBuilder() | |
.RegisterCompatibilityRenderers() | |
.ConfigureServices((ctx, services) => | |
{ | |
services.AddTransient<MainPage>(); | |
services.AddTransient<IWindow, MainWindow>(); | |
}) | |
.ConfigureFonts((hostingContext, fonts) => | |
{ | |
fonts.AddFont("ionicons.ttf", "IonIcons"); | |
}); | |
public override IWindow CreateWindow(IActivationState state) | |
{ | |
Microsoft.Maui.Controls.Compatibility.Forms.Init(state); | |
return Services.GetService<IWindow>(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment