Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
2 contributors

Users who have contributed to this file

@enchev @akorchev
49 lines (42 sloc) 1.97 KB
@page "/textarea"
@using NorthwindBlazor.Data
@using NorthwindBlazor.Models.Northwind
@using Microsoft.EntityFrameworkCore
<h1 style="display:inline">TextArea</h1><a style="margin-left: 10px" href="https://github.com/akorchev/blazor.radzen.com/blob/master/Pages/TextAreaPage.razor" target="_blank">[source code]</a><a style="margin-left: 10px" href="https://www.radzen.com/documentation/blazor/textarea/" target="_blank">[documentation]</a>
<p>This page demonstrates <b>TextArea</b> component.</p>
<RadzenCard>
<div class="row">
<div class="col-md-6">
<h3>TextArea</h3>
<RadzenTextArea Style="margin-bottom: 20px" Change="@(args => Change(args, "TextArea"))" />
<br />
<h3>TextArea with placeholder</h3>
<RadzenTextArea Placeholder="Enter here..." Change="@(args => Change(args, "TextArea with placeholder"))" Style="margin-bottom: 20px" />
<br />
<h3>TextArea with 5 maximum characters</h3>
<RadzenTextArea MaxLength="5" Change="@(args => Change(args, "TextArea with 5 maximum characters"))" Style="margin-bottom: 20px" />
<br />
<h3>TextArea with 3 rows and 30 columns</h3>
<RadzenTextArea @bind-Value="@value" Cols="30" Rows="3" Change="@(args => Change(args, "TextArea with 3 rows and 30 columns"))" Style="margin-bottom: 20px" />
</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 {
string value;
Dictionary<DateTime, string> events = new Dictionary<DateTime, string>();
void Change(string value, string name)
{
events.Add(DateTime.Now, $"{name} value changed to {value}");
StateHasChanged();
}
}
You can’t perform that action at this time.