Skip to main content
A newer version of this page is available. .
All docs
V21.2

FormatRuleCollection<T, TColumnType>.Add2ColorScale(TColumnType, Color, Color, FormatConditionValueType, FormatConditionValueType, Decimal, Decimal) Method

Applies a format that uses a range of colors to illustrate data distribution. You can specify the minimum and maximum values and colors for them.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v21.2.dll

NuGet Packages: DevExpress.Win.Design, DevExpress.Win.Navigation

Declaration

public T Add2ColorScale(
    TColumnType column,
    Color minColor,
    Color maxColor,
    FormatConditionValueType minType = FormatConditionValueType.Automatic,
    FormatConditionValueType maxType = FormatConditionValueType.Automatic,
    decimal minValue = 0M,
    decimal maxValue = 0M
)

Parameters

Name Type Description
column TColumnType

A {TColumnType} object that specifies a column (row in a vertical grid) to which the format should be applied.

minColor Color

The color that corresponds to the minimum threshold. This value is assigned to the MinimumColor property.

maxColor Color

The color that corresponds to the maximum threshold. This value is assigned to the MaximumColor property.

Optional Parameters

Name Type Default Description
minType FormatConditionValueType 2

A value that specifies whether the minimum value is automatically calculated or specified manually (as a number or percentage). This value is assigned to the MinimumType property.

maxType FormatConditionValueType 2

A value that specifies whether the maximum value is automatically calculated or specified manually (as a number or percentage). This value is assigned to the MaximumType property.

minValue Decimal 0

The minimum value of the target range. This value is assigned to the Minimum property.

maxValue Decimal 0

The maximum value of the target range. This value is assigned to the Maximum property.

Returns

Type Description
T

A {T} object that specifies a format.

See Also