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

View File

@ -8,7 +8,14 @@
Welcome to your new app running on <em>@factor</em> using <em>@platform</em>. Welcome to your new app running on <em>@factor</em> using <em>@platform</em>.
<RadzenButton Click="@ButtonClicked" Text="Hi"></RadzenButton>
@code { @code {
private string factor => FormFactor.GetFormFactor(); private string factor => FormFactor.GetFormFactor();
private string platform => FormFactor.GetPlatform(); 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 static Microsoft.AspNetCore.Components.Web.RenderMode
@using Microsoft.AspNetCore.Components.Web.Virtualization @using Microsoft.AspNetCore.Components.Web.Virtualization
@using Microsoft.JSInterop @using Microsoft.JSInterop
@using Radzen
@using Radzen.Blazor

View File

@ -11,7 +11,8 @@
</ItemGroup> </ItemGroup>
<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> </ItemGroup>
</Project> </Project>

View File

@ -10,10 +10,13 @@
<link rel="stylesheet" href="eCIA.Web.styles.css" /> <link rel="stylesheet" href="eCIA.Web.styles.css" />
<link rel="icon" type="image/png" href="_content/eCIA.Shared/favicon.png" /> <link rel="icon" type="image/png" href="_content/eCIA.Shared/favicon.png" />
<HeadOutlet @rendermode="InteractiveAuto" /> <HeadOutlet @rendermode="InteractiveAuto" />
<RadzenTheme Theme="material-dark" @rendermode="InteractiveAuto" />
</head> </head>
<body> <body>
<Routes @rendermode="InteractiveAuto" /> <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> <script src="_framework/blazor.web.js"></script>
</body> </body>

View File

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

View File

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

View File

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

View File

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