-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMauiProgram.cs
40 lines (36 loc) · 1.24 KB
/
MauiProgram.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using CommunityToolkit.Maui;
using ExpTracApp.Model;
using ExpTracApp.Services;
using ExpTracApp.View;
using ExpTracApp.ViewModel;
using Microsoft.Extensions.Logging;
using Syncfusion.Maui.Core.Hosting;
namespace ExpTracApp
{
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.UseMauiCommunityToolkit()
.ConfigureSyncfusionCore()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
fonts.AddFont("open-iconic.ttf", "Icons");
});
builder.Services.AddSingleton<ServiceInterface, ServiceImplementation>();
builder.Services.AddScoped<HomePageViewModel>();
builder.Services.AddScoped<HomePage>();
builder.Services.AddScoped<ManageExpensesPageViewModel>();
builder.Services.AddScoped<ManageExpensesPage>();
#if DEBUG
builder.Logging.AddDebug();
#endif
return builder.Build();
}
}
}