Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
1 contributor

Users who have contributed to this file

40 lines (35 sloc) 1.46 KB
@page "/rating"
@using Radzen
@using NorthwindBlazor.Data
@using NorthwindBlazor.Models.Northwind
@using Microsoft.EntityFrameworkCore
<h1 style="display:inline">Rating</h1><a style="margin-left: 10px" href="https://github.com/akorchev/blazor.radzen.com/blob/master/Pages/RatingPage.razor" target="_blank">[source code]</a><a style="margin-left: 10px" href="https://www.radzen.com/documentation/blazor/rating/" target="_blank">[documentation]</a>
<p>This page demonstrates <b>Rating</b> component.</p>
<RadzenCard>
<div class="row">
<div class="col-md-6">
<h3>Rating with 5 stars</h3>
<RadzenRating Style="margin-bottom: 20px" Change="@((args) => Change(args, "Rating with 5 stars"))" />
<br />
<h3>Rating with 10 stars</h3>
<RadzenRating Stars="10" Style="margin-bottom: 20px" Change="@((args) => Change(args, "Rating with 10 stars"))"/>
</div>
<div class="col-md-6">
<h3>Events</h3>
<RadzenCard style="overflow: auto;height:500px;">
@foreach (var e in events.OrderByDescending(i => i.Key))
{
@e.Value
<br />
}
</RadzenCard>
</div>
</div>
</RadzenCard>
@code {
Dictionary<DateTime, string> events = new Dictionary<DateTime, string>();
void Change(int value, string name)
{
events.Add(DateTime.Now, $"{name} value changed to {value}");
}
}
You can’t perform that action at this time.