-
Notifications
You must be signed in to change notification settings - Fork 0
/
MauiProgram.cs
43 lines (38 loc) · 1.2 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
41
42
43
using Microsoft.AspNetCore.Components.WebView.Maui;
using MyDigitalDiary.Shared;
using MudBlazor.Services;
using Recurop;
using BlazorStrap;
using MudBlazor;
using Syncfusion.Blazor;
using BlazorPro.BlazorSize;
namespace MyDigitalDiary;
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
});
builder.Services.AddMauiBlazorWebView();
#if DEBUG
builder.Services.AddBlazorWebViewDeveloperTools();
#endif
//builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
builder.Services.AddMudServices(config =>
{
config.SnackbarConfiguration.PositionClass = Defaults.Classes.Position.TopCenter;
config.SnackbarConfiguration.VisibleStateDuration = 3000;
});
builder.Services.AddRecurop();
builder.Services.AddBlazorStrap();
builder.Services.AddSyncfusionBlazor();
builder.Services.AddMediaQueryService();
builder.Services.AddScoped<UserState>();
return builder.Build();
}
}