Back to Devexpress

DxTextBox.Text Property

blazor-devexpress-dot-blazor-dot-dxtextbox.md

latest1.4 KB
Original Source

DxTextBox.Text Property

Specifies the text displayed in the Text Box.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[Parameter]
public string Text { get; set; }

Property Value

TypeDescription
String

A string value that represents the text in the Text Box.

|

Remarks

Use the Text property to specify the Text Box value in markup or in code:

razor
<DxTextBox Text="Some text" />

Alternatively, you can bind the Text property to a variable that stores the text:

razor
<DxTextBox @bind-Text="@TextValue" />

@code {
    string TextValue { get; set; } = "Some text";
}

If you bind the editor text to a non-string value (CustomTypeValue), the editor displays the CustomTypeValue.ToString() value.

Each time the editor text has been changed, the TextChanged event fires.

Run Demo: Text Box

YouTube video

See Also

DxTextBox Class

DxTextBox Members

DevExpress.Blazor Namespace