Back to Devexpress

DxTextFormatSettings.Type Property

blazor-devexpress-dot-blazor-dot-dxtextformatsettings.md

latest3.3 KB
Original Source

DxTextFormatSettings.Type Property

Specifies the element’s text format.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[DefaultValue(TextFormat.Default)]
[Parameter]
public TextFormat Type { get; set; }

Property Value

TypeDefaultDescription
TextFormatDefault

An enumeration value.

|

Available values:

Show 29 items

NameDescription
Billions

Formats numbers as billions.

| | Currency |

Adds a currency symbol to numbers.

| | Day |

Displays days.

| | Decimal |

Formats numbers as decimals.

| | Exponential |

Displays numbers in exponential notation.

| | FixedPoint |

Displays numbers with a fixed point.

| | LargeNumber |

Uses the Thousands, Millions, Billions, or Trillions format based on the current value.

| | LongDate |

Displays a date in dddd, MMMM dd, yyyy format.

| | LongTime |

Displays a time value in hh:mm:ss format.

| | Millions |

Formats numbers as millions.

| | Millisecond |

Displays milliseconds.

| | Month |

Displays months.

| | MonthAndDay |

Displays a date in MMMM dd format.

| | MonthAndYear |

Displays a date in yyyy MMMM format.

| | Percent |

Formats numbers as percentages.

| | Quarter |

Displays a quarter of the year.

| | QuarterAndYear |

Displays a quarter and year.

| | ShortDate |

Displays a date in m/dd/yyyy format.

| | ShortTime |

Displays a time value in hh:mm format.

| | Thousands |

Formats numbers as thousands.

| | Trillions |

Formats numbers as trillions.

| | Year |

Displays years.

| | DayOfWeek |

Displays week days.

| | Hour |

Displays hours.

| | LongDateLongTime |

Displays a date-time value in dddd, MMMM dd, yyyy, hh:mm:ss format.

| | Minute |

Displays minutes.

| | Second |

Displays seconds.

| | ShortDateShortTime |

Displays a date-time value in m/dd/yyyy, hh:mm format.

| | Default |

Values are displayed as is (without a formatting pattern).

|

Remarks

The following code snippet sets the format type of DxBarGauge labels to Currency:

razor
<DxBarGauge Width="100%"
            Height="500px"
            StartValue="-5"
            EndValue="5"
            BaseValue="0"
            Values="@Values">
    <DxBarGaugeLabelSettings>
        <DxTextFormatSettings Type="TextFormat.Currency"
                              Currency="GBP"
                              Precision="2"
                              UseCurrencyAccountingStyle="false"/>
    </DxBarGaugeLabelSettings>
</DxBarGauge>

@code {
    double[] Values = new double[] { -2.13, 1.48, -3.09, 4.52, 4.9, 3.9 };
}

See Also

DxTextFormatSettings Class

DxTextFormatSettings Members

DevExpress.Blazor Namespace