Back to Devexpress

DxTextFormatSettings.UseCurrencyAccountingStyle Property

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

latest2.1 KB
Original Source

DxTextFormatSettings.UseCurrencyAccountingStyle Property

Specifies whether to apply the Accounting style to values of the Currency format type.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[DefaultValue(true)]
[Parameter]
public bool UseCurrencyAccountingStyle { get; set; }

Property Value

TypeDefaultDescription
Booleantrue

true to display negative values with parentheses; false to display negative values with a minus sign.

|

Remarks

The following code snippet configures DxBarGauge labels as follows:

  • Sets the format type to Currency.
  • Assigns the GBP currency code to the Currency property.
  • Specifies value precision.
  • Disables the UseCurrencyAccountingStyle property.

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