[성현모] Radzen Blazor 적용

This commit is contained in:
SHM
2025-07-22 10:51:47 +09:00
parent b8775cb523
commit 369dfa9800
9 changed files with 45 additions and 21 deletions

View File

@ -1,23 +1,19 @@
@inherits LayoutComponentBase
<div class="page">
<div class="sidebar">
<NavMenu />
<RadzenLayout>
<RadzenBody>
<div>
@* <RadzenText Text="@($"{_configService?.GetConfig()?.ProjectName}")"></RadzenText> *@
<RadzenText Text="@("Project Name")"></RadzenText>
</div>
<main>
<div class="top-row px-4">
<a href="https://learn.microsoft.com/aspnet/core/" target="_blank">About</a>
</div>
<article class="content px-4">
<div style="margin:0; padding:0;">
@Body
</article>
</main>
</div>
<div id="blazor-error-ui" data-nosnippet>
An unhandled error has occurred.
<a href="." class="reload">Reload</a>
<span class="dismiss">🗙</span>
</div>
</div>
</RadzenBody>
<RadzenFooter>
<div>
<RadzenLabel Text="@("Copyright © 2025, SystemX Inc. All rights reserved.")"></RadzenLabel>
</div>
</RadzenFooter>
</RadzenLayout>
<RadzenComponents />

View File

@ -8,7 +8,14 @@
Welcome to your new app running on <em>@factor</em> using <em>@platform</em>.
<RadzenButton Click="@ButtonClicked" Text="Hi"></RadzenButton>
@code {
private string factor => FormFactor.GetFormFactor();
private string platform => FormFactor.GetPlatform();
void ButtonClicked()
{
// Handle the Click event of RadzenButton
}
}

View File

@ -6,3 +6,6 @@
@using static Microsoft.AspNetCore.Components.Web.RenderMode
@using Microsoft.AspNetCore.Components.Web.Virtualization
@using Microsoft.JSInterop
@using Radzen
@using Radzen.Blazor

View File

@ -11,7 +11,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="9.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="9.0.7" />
<PackageReference Include="Radzen.Blazor" Version="7.1.5" />
</ItemGroup>
</Project>

View File

@ -10,10 +10,13 @@
<link rel="stylesheet" href="eCIA.Web.styles.css" />
<link rel="icon" type="image/png" href="_content/eCIA.Shared/favicon.png" />
<HeadOutlet @rendermode="InteractiveAuto" />
<RadzenTheme Theme="material-dark" @rendermode="InteractiveAuto" />
</head>
<body>
<Routes @rendermode="InteractiveAuto" />
<script src="_content/Radzen.Blazor/Radzen.Blazor.js?v=@(typeof(Radzen.Colors).Assembly.GetName().Version)"></script>
<script src="_framework/blazor.web.js"></script>
</body>

View File

@ -10,3 +10,6 @@
@using eCIA.Web
@using eCIA.Web.Client
@using eCIA.Web.Components
@using Radzen
@using Radzen.Blazor

View File

@ -1,6 +1,7 @@
using eCIA.Shared.Services;
using eCIA.Web.Components;
using eCIA.Web.Services;
using Radzen;
var builder = WebApplication.CreateBuilder(args);
@ -12,6 +13,9 @@ builder.Services.AddRazorComponents()
// Add device-specific services used by the eCIA.Shared project
builder.Services.AddSingleton<IFormFactor, FormFactor>();
//radzen
builder.Services.AddRadzenComponents();
var app = builder.Build();
// Configure the HTTP request pipeline.

View File

@ -1,6 +1,7 @@
using eCIA.Services;
using eCIA.Shared.Services;
using Microsoft.Extensions.Logging;
using Radzen;
namespace eCIA
{
@ -21,6 +22,10 @@ namespace eCIA
builder.Services.AddMauiBlazorWebView();
//radzen
builder.Services.AddRadzenComponents();
builder.Services.AddMauiBlazorWebView();
#if DEBUG
builder.Services.AddBlazorWebViewDeveloperTools();
builder.Logging.AddDebug();

View File

@ -7,6 +7,7 @@
<base href="/" />
<link rel="stylesheet" href="_content/eCIA.Shared/bootstrap/bootstrap.min.css" />
<link rel="stylesheet" href="_content/eCIA.Shared/app.css" />
<link rel="stylesheet" href="_content/Radzen.Blazor/css/material-dark-base.css" />
<link rel="stylesheet" href="app.css" />
<link rel="stylesheet" href="eCIA.styles.css" />
<link rel="icon" href="data:,">
@ -18,6 +19,7 @@
<div id="app">Loading...</div>
<script src="_content/Radzen.Blazor/Radzen.Blazor.js"></script>
<script src="_framework/blazor.webview.js" autostart="false"></script>
</body>