Awes.UiKit.OpenSilver
0.2.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Awes.UiKit.OpenSilver --version 0.2.0
NuGet\Install-Package Awes.UiKit.OpenSilver -Version 0.2.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Awes.UiKit.OpenSilver" Version="0.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Awes.UiKit.OpenSilver" Version="0.2.0" />
<PackageReference Include="Awes.UiKit.OpenSilver" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Awes.UiKit.OpenSilver --version 0.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Awes.UiKit.OpenSilver, 0.2.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Awes.UiKit.OpenSilver@0.2.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Awes.UiKit.OpenSilver&version=0.2.0
#tool nuget:?package=Awes.UiKit.OpenSilver&version=0.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Awes.UiKit.OpenSilver
Minimal integration layer for OpenSilver applications.
- Targets:
netstandard2.0,net10.0 - Provides hosting builders for OpenSilver and Blazor WebAssembly
- Integrates with the layout manager and menu system from
Awes.UiKit.Core
This package focuses on OpenSilver hosting, DI integration, and services.
Install
PM> Install-Package Awes.UiKit.OpenSilver
# or
> dotnet add package Awes.UiKit.OpenSilver
Quick Start
1. Blazor WebAssembly + OpenSilver (net10.0)
using Awes.UiKit;
using Awes.UiKit.OpenSilver.Builder;
using Awes.UiKit.OpenSilver.Service;
using Microsoft.Extensions.DependencyInjection;
public class Program
{
public static async Task Main(string[] args)
{
// Create default WASM host with root component
var kit = OpenSilverWasmHostBuilder.CreateHost<App>(args);
// Register UI Kit services and app-specific services
kit.ConfigureServices(services =>
{
services.AddSingleton<ILayoutManagerService, LayoutManagerService>();
services.AddScoped<DashBoardView>();
services.AddScoped<TestContentView>();
services.AddScoped<TestViewModel>();
});
var host = kit.Build();
await host.RunAsync();
}
}
2. OpenSilver application startup (App.xaml.cs)
using Awes.UiKit;
using Awes.UiKit.OpenSilver.Builder;
using Awes.UiKit.OpenSilver.Service;
using Microsoft.Extensions.DependencyInjection;
public sealed partial class App : Application
{
public App()
{
this.InitializeComponent();
OpenSilverHostBuilder.CreateBuilder()
.ConfigureServices(services =>
{
services.AddSingleton<ILayoutManagerService, LayoutManagerService>();
services.AddScoped<DashBoardView>();
services.AddScoped<TestContentView>();
services.AddScoped<TestViewModel>();
})
.ConfigureStartPage<MainPage>()
.Build();
}
}
3. Register menus in your page
using Awes.UiKit;
using Awes.UiKit.Service;
public partial class MainPage : Page
{
private bool _menuInitialized;
public MainPage()
{
InitializeComponent();
Loaded += Page_Loaded;
}
private void Page_Loaded(object sender, RoutedEventArgs e)
{
if (_menuInitialized)
{
return;
}
_menuInitialized = true;
var serviceProvider = AwesUiKit.GetServiceProvider();
var layoutService = serviceProvider?.GetService(typeof(ILayoutManagerService)) as ILayoutManagerService;
layoutService?.AddMenu("Dashboard", typeof(DashBoardView), typeof(TestViewModel));
layoutService?.AddMenu("Test", typeof(TestContentView), typeof(TestViewModel));
}
}
Dependencies
- OpenSilver 3.x
- Microsoft.Extensions.DependencyInjection
- Awes.UiKit.Core
License
MIT
Source & issues: https://github.com/JakobSung/Awes.UiKit
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Awes.UiKit.Control (>= 0.2.0)
- Awes.UiKit.Core (>= 0.2.0)
- CommunityToolkit.Mvvm (>= 8.4.0)
- Microsoft.AspNetCore.Components (>= 10.0.0)
- Microsoft.AspNetCore.Components.WebAssembly (>= 10.0.0)
- Microsoft.Extensions.DependencyInjection (>= 10.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- OpenSilver (>= 3.2.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.