« Radzen » : différence entre les versions
De Banane Atomic
Aller à la navigationAller à la recherche
(→Themes) |
|||
Ligne 52 : | Ligne 52 : | ||
<link rel="stylesheet" href="_content/Radzen.Blazor/css/[theme].css"> | <link rel="stylesheet" href="_content/Radzen.Blazor/css/[theme].css"> | ||
</filebox> | </filebox> | ||
{{info | {{boxx|[theme]}} will theme the whole application while {{boxx|[theme-base]}} will only theme the Razor components.}} | |||
= [https://blazor.radzen.com/get-started Installation] = | = [https://blazor.radzen.com/get-started Installation] = |
Version du 29 mai 2021 à 15:44
Links
CheckBoxList
MyPage.razor |
<RadzenCheckBoxList @bind-Value="@selectedItemIds" TValue="int" Data="@items" TextProperty="Name" ValueProperty="Id" /> |
MyPage.razor.cs |
// has to be an IEnumerable private IEnumerable<int> selectedItemIds; private IReadOnlyCollection<ItemDto> items; |
Numeric
MyPage.razor |
<RadzenNumeric TValue="int?" Min="1" Max="10" @bind-Value=@value Placeholder="Enter or clear value" /> |
MyPage.razor.cs |
int? value; |
Themes
Theme | Description |
---|---|
default | |
dark | dark theme |
humanistic | |
software |
_Host.cshtml |
<head> <link rel="stylesheet" href="_content/Radzen.Blazor/css/[theme].css"> |
[theme] will theme the whole application while [theme-base] will only theme the Razor components. |
Installation
dotnet add package Radzen.Blazor |
_Imports.razor |
@using Radzen @using Radzen.Shared @using Radzen.Blazor |
_Host.cshtml |
<head> <link rel="stylesheet" href="_content/Radzen.Blazor/css/default-base.css"> @* ... *@ <script src="_content/Radzen.Blazor/Radzen.Blazor.js"></script> </body> |