« MudBlazor » : différence entre les versions

De Banane Atomic
Aller à la navigationAller à la recherche
Ligne 30 : Ligne 30 :


<script src="_content/MudBlazor/MudBlazor.min.js"></script>
<script src="_content/MudBlazor/MudBlazor.min.js"></script>
</filebox>
<filebox fn='Program.cs'>
builder.Services.AddMudServices();
</filebox>
<filebox fn='Shared/MainLayout.razor'>
<MudThemeProvider/>
<MudDialogProvider/>
<MudSnackbarProvider/>
</filebox>
</filebox>

Version du 11 juillet 2023 à 22:16

Links

Installation

New project

Bash.svg
# install MudBlazor templates
dotnet new install MudBlazor.Templates

# help on new project
dotnet new mudblazor --help

# new server project named MudBlazor
dotnet new mudblazor --host server --output MudBlazor

Already existing project

Bash.svg
dotnet add package MudBlazor
_Imports.razor
@using MudBlazor
Pages/_Host.cshtml
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" rel="stylesheet" />
<link href="_content/MudBlazor/MudBlazor.min.css" rel="stylesheet" />

<script src="_content/MudBlazor/MudBlazor.min.js"></script>
Program.cs
builder.Services.AddMudServices();
Shared/MainLayout.razor
<MudThemeProvider/>
<MudDialogProvider/>
<MudSnackbarProvider/>