Blazor-radzen-blazor

[删除(380066935@qq.com或微信通知)]

radzenhq/radzen-blazor: The home of the Radzen Blazor components. (github.com)

Radzen Blazor Components

Radzen Blazor Components are open source and free for commercial use. You can install them from nuget or build your own copy from source.


Get started with Radzen Blazor Components

1. Install

Radzen Blazor Components are distributed as a Radzen.Blazor nuget package. You can add them to your project in one of the following ways


Install the package from command line by running dotnet add package Radzen.Blazor

Add the project from the Visual Nuget Package Manager

Manually edit the .csproj file and add a project reference

2. Import the namespace

Open the _Imports.razor file of your Blazor application and add this line @using Radzen.Blazor.


3. Include a theme

Open the _Host.cshtml file (server-side Blazor) or wwwroot/index.html (client-side Blazor) and include a theme CSS file by adding this snippet


<link rel="stylesheet" href="_content/Radzen.Blazor/css/default.css">

If you either add Bootstrap manually or don't use it at all, include this instead:


<link rel="stylesheet" href="_content/Radzen.Blazor/css/default-base.css">

4. Include Radzen.Blazor.js

Open the _Host.cshtml file (server-side Blazor) or wwwroot/index.html (client-side Blazor) and include this snippet:


<script src="_content/Radzen.Blazor/Radzen.Blazor.js"></script>

5. Use a component

Use any Radzen Blazor component by typing its tag name in a Blazor page e.g.


<RadzenButton Text="Hi"></RadzenButton>

Data-binding a property

<RadzenButton Text=@text />

<RadzenTextBox @bind-Value=@text />

@code {

  string text = "Hi";

}

Handing events

<RadzenButton Click="@ButtonClicked" Text="Hi"></RadzenButton>

@code {

  void ButtonClicked()

  {


  }

}