Chapter.Net.BLZ
0.0.1
dotnet add package Chapter.Net.BLZ --version 0.0.1
NuGet\Install-Package Chapter.Net.BLZ -Version 0.0.1
<PackageReference Include="Chapter.Net.BLZ" Version="0.0.1" />
<PackageVersion Include="Chapter.Net.BLZ" Version="0.0.1" />
<PackageReference Include="Chapter.Net.BLZ" />
paket add Chapter.Net.BLZ --version 0.0.1
#r "nuget: Chapter.Net.BLZ, 0.0.1"
#:package Chapter.Net.BLZ@0.0.1
#addin nuget:?package=Chapter.Net.BLZ&version=0.0.1
#tool nuget:?package=Chapter.Net.BLZ&version=0.0.1
<img src="https://raw.githubusercontent.com/dwndland/Chapter.Net.BLZ/master/Icon.png" alt="logo" width="64"/>
Chapter.Net.BLZ Library
Overview
Chapter.Net.BLZ provides features for an easy work with MVVM for blazor applications.
Features
- ViewModelComponent: A component for an easy connecting of viewmodels to a UI component.
- AddAutoViewModels: Automatically registers all IViewModels to the IOC.
Getting Started
Installation:
- Install the Chapter.Net.BLZ library via NuGet Package Manager:
dotnet add package Chapter.Net.BLZ
ViewModelComponent (Connect a razor page to its viewmodel)
@inherits ViewModelComponent<SetupViewModel> <div class="input-group"> <FluentTextField Class="inputField" @bind-Value="@DataContext.Directory"></FluentTextField> <FluentButton OnClick="DataContext.Browse">Browse...</FluentButton> </div>
builder.Services.AddTransient<SetupViewModel>();
public class SetupViewModel : ObservableObject, IViewModel { public string Directory; public void Browse() { Directory = "DemoDirectory"; // NotifyAndSetIfChanged(ref Directory, "DemoDirectory"); // NotifyPropertyChanged(nameof(Directory)); } }
AddAutoViewModels (Automatically registers all IViewModels to the IOC)
var builder = WebApplication.CreateBuilder(args); builder.Services.AddAutoViewModels(Assembly.GetExecutingAssembly()); builder.Services.AddAutoViewModels(ExtraAssembliesProvider.Assemblies);
public partial class SetupView : ComponentBase { [Inject] public SetupViewModel DataContext { get; set; } }
public class SetupViewModel : ObservableObject, IViewModel { }
Links
License
Copyright (c) David Wendland. All rights reserved. Licensed under the MIT License. See LICENSE file in the project root for full license information.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
-
net8.0
- Microsoft.AspNetCore.Components.Web (>= 8.0.11)
-
net9.0
- Microsoft.AspNetCore.Components.Web (>= 9.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|