Skip to main content
A newer version of this page is available. .

FormatConditionRuleMinMaxBase.MaximumType Property

Gets or sets whether the target range’s maximum is automatically calculated or specified manually (as a number or percentage).

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v19.1.dll

Declaration

[DefaultValue(FormatConditionValueType.Automatic)]
[XtraSerializableProperty]
[DXCategory("Behavior")]
public FormatConditionValueType MaximumType { get; set; }

Property Value

Type Default Description
FormatConditionValueType **Automatic**

A value that specifies how the maximum of the target range is defined.

Available values:

Name Description
Number

A numeric value.

Percent

A percentage value.

Automatic

A cuttoff/minimum/maximum value is calculated automatically.

Remarks

If the MaximumType property is set to FormatConditionValueType.Automatic, the range’s maximum value is calculated automatically. With the FormatConditionRuleMinMaxBase.AutomaticType property, you can choose between two calculation modes: Default/ValueBased and ZeroBased. The effect produced by these modes on the range’s maximum value is noticeable when a column contains only negative values.

  • If the FormatConditionRuleMinMaxBase.AutomaticType property is set to Default or ValueBased, the range’s maximum value is the highest column value.

    In the image below, notice that a cell with the highest value (-5) has no visible data bar.

    FormatRules-DataBar-AutomaticType-ValueBased

  • If the FormatConditionRuleMinMaxBase.AutomaticType property is set to ZeroBased, the range’s maximum value cannot be less than 0, and it is calculated according to the formula:

    MaximumValue = Math.Max(0, highestColumnValue)

    The image below shows the same data (as in the previous image). A cell with the highest value has a visible data bar, since the maximum value now evaluates to zero.

    FormatRules-DataBar-AutomaticType-ZeroBased.png

In FormatConditionValueType.Number and FormatConditionValueType.Percent modes, the maximum value is specified by the FormatConditionRuleMinMaxBase.Maximum property.

If the MaximumType property is set to Number, the FormatConditionRuleMinMaxBase.Maximum property value is regarded as a numeric value. If it is set to Percent, the FormatConditionRuleMinMaxBase.Maximum property specifies a percentage of the difference between the highest and lowest column values.

See Also