zhaw-dnet2/Tasks/Lab12/TodoDetails/MauiProgram.cs

31 lines
843 B
C#
Raw Normal View History

2024-06-06 20:52:07 +00:00
using Microsoft.Extensions.Logging;
using TodoDetails.Services;
using TodoDetails.ViewModel;
2024-06-06 20:52:07 +00:00
namespace TodoDetails
{
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
});
#if DEBUG
builder.Logging.AddDebug();
#endif
builder.Services.AddSingleton<TodoService>();
builder.Services.AddSingleton<TodosViewModel>();
builder.Services.AddSingleton<MainPage>();
2024-06-06 20:52:07 +00:00
return builder.Build();
}
}
}