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.v22.2.dll
NuGet Package: DevExpress.Blazor
Declaration
[DefaultValue("")]
[Parameter]
public string DisplayFormat { get; set; }
Property Value
Type | Default | Description |
---|---|---|
String | String.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 date-time data type. See the Format Types in .NET documentation section for more information.
The following example demonstrates how to apply the currency format to numeric edit values:
<DxTextBox @bind-Text="@TextValue" DisplayFormat="C"></DxTextBox>
@code {
string TextValue { get; set; } = "25.5";
}