Skip to main content

FormatCondition.ValueRule Property

Specifies the rule for conditional formatting.

Namespace: DevExpress.Xpf.PivotGrid

Assembly: DevExpress.Xpf.PivotGrid.v24.2.dll

NuGet Package: DevExpress.Wpf.PivotGrid

Declaration

public ConditionRule ValueRule { get; set; }

Property Value

Type Description
ConditionRule

A ConditionRule object that is a rule formatting based on value.

Available values:

Name Description
None

The style is not applied to any cell.

Equal

The style is applied to cells whose values match the FormatCondition.Value1 (FormatCondition.Value1) property value.

NotEqual

The style is applied to cells whose values do not match the FormatCondition.Value1 (FormatCondition.Value1) property value.

Between

The style is applied to cells whose values fall into the range specified by the FormatCondition.Value1 (FormatCondition.Value1) and FormatCondition.Value2 (FormatCondition.Value2) properties.

NotBetween

The style is applied to cells whose values fall outside of the range specified by the FormatCondition.Value1 (FormatCondition.Value1) and FormatCondition.Value2 (FormatCondition.Value2) properties.

Less

The style is applied to cells whose values are less than that specified by the FormatCondition.Value1 (FormatCondition.Value1) property.

Greater

The style is applied to cells whose values are greater than that specified by the FormatCondition.Value1 (FormatCondition.Value1) property.

GreaterOrEqual

The style is applied to cells whose values are greater or equal to the FormatCondition.Value1 (FormatCondition.Value1) property value.

LessOrEqual

The style is applied to cells whose values are less or equal to the FormatCondition.Value1 (FormatCondition.Value1) property value.

Expression

The style is applied to cells for which the FormatConditionBase.Expression (FormatConditionBase.Expression) evaluates to true.

Remarks

The ValueRule property specifies how cell values should be compared to the FormatCondition.Value1 and FormatCondition.Value2 property values in order to determine whether the conditional formatting style should be applied to them.

If the ValueRule property is set to ConditionRule.None or ConditionRule.Expression, the conditional formatting style is not applied.

To create a custom rule using an expression, set the ValueRule property to ConditionRule.Expression and specify the expression using the FormatConditionBase.Expression property.

See Also