Back to Devexpress

DxTextBox.DisplayFormat Property

blazor-devexpress-dot-blazor-dot-dxtextbox-4926d018.md

latest1.9 KB
Original Source

DxTextBox.DisplayFormat Property

Specifies the pattern used to format the Text Box’s display value when the editor is not focused.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[DefaultValue("")]
[Parameter]
public string DisplayFormat { get; set; }

Property Value

TypeDefaultDescription
StringString.Empty

The format pattern.

|

Remarks

Use the DisplayFormat property to format the Text Box’s display value when the editor is not focused. The specified format is applied when the Text Box’s edit value (the Text property value) can be converted to a numeric or DateTime data type. See the Format strings and .NET types documentation section for additional information.

The following example applies the currency format to numeric edit values:

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

@code {
    string TextValue { get; set; } = "25.5";
}

See Also

DxTextBox Class

DxTextBox Members

DevExpress.Blazor Namespace