Use Radzen

This commit is contained in:
2025-09-24 16:56:35 +09:00
parent a08fffb6db
commit e2f404fdef
5 changed files with 14 additions and 0 deletions

View File

@ -7,12 +7,14 @@
<base href="/" /> <base href="/" />
<link rel="stylesheet" href="app.css" /> <link rel="stylesheet" href="app.css" />
<link rel="stylesheet" href="Hcs.WebApp.styles.css" /> <link rel="stylesheet" href="Hcs.WebApp.styles.css" />
<RadzenTheme Theme="material" @rendermode="InteractiveServer" />
<HeadOutlet /> <HeadOutlet />
</head> </head>
<body> <body>
<Routes /> <Routes />
<script src="_framework/blazor.web.js"></script> <script src="_framework/blazor.web.js"></script>
<script src="_content/Radzen.Blazor/Radzen.Blazor.js?v=@(typeof(Radzen.Colors).Assembly.GetName().Version)"></script>
</body> </body>
</html> </html>

View File

@ -1,5 +1,7 @@
@inherits LayoutComponentBase @inherits LayoutComponentBase
<RadzenComponents @rendermode="InteractiveServer" />
@Body @Body
<div id="blazor-error-ui"> <div id="blazor-error-ui">

View File

@ -5,3 +5,8 @@
<h1>Привет, мир!</h1> <h1>Привет, мир!</h1>
Добро пожаловать! Добро пожаловать!
<RadzenButton Click="@ButtonClicked" Text="Нажми меня"></RadzenButton>
@code {
void ButtonClicked() { }
}

View File

@ -8,3 +8,5 @@
@using Microsoft.JSInterop @using Microsoft.JSInterop
@using Hcs.WebApp @using Hcs.WebApp
@using Hcs.WebApp.Components @using Hcs.WebApp.Components
@using Radzen
@using Radzen.Blazor

View File

@ -1,10 +1,13 @@
using Hcs.WebApp.Components; using Hcs.WebApp.Components;
using Radzen;
var builder = WebApplication.CreateBuilder(args); var builder = WebApplication.CreateBuilder(args);
builder.Services builder.Services
.AddRazorComponents() .AddRazorComponents()
.AddInteractiveServerComponents(); .AddInteractiveServerComponents();
builder.Services.AddRadzenComponents();
var app = builder.Build(); var app = builder.Build();
if (!app.Environment.IsDevelopment()) if (!app.Environment.IsDevelopment())
{ {