Version

StopIfTrue Property

Returns or sets a boolean indicating whether additional formatting rules are evaluated if this rule evaluates to true. Applicable only in the case where the containing collection contains more than one element.
Syntax
public bool StopIfTrue {get; set;}
Remarks

If a cell value meets more than one condition, the format defined by the first condition takes precedence. Individual format properties are "merged" during the resolution process; for example, if one format has red borders and another has a red foreground color, a cell value which meets both conditions may be formatted with both red borders and a red foreground color.

This property makes it possible to short-circuit the resolution process, so that no other conditional formats are applied after the first condition evaluates to true.

Using the above example, assume StopIfTrue is set to a value of true on the conditional format with red borders, a second conditional format exists with a red foreground color, and a cell value meets both conditions. Because the StopIfTrue setting prevents additional formats from being evaluated, the cell will not show a red foreground color, whereas with StopIfTrue being set to false, it would show both red borders and a red foreground color.

In addition to preventing subsequent conditions from being evaluated, the order in which conditions are evaluated can be controlled using the Priority property.

Requirements

Target Platforms: Android 4.4+, iOS 8+

Development Environments: Visual Studio 2015+, Visual Studio for Mac Preview, Xamarin for Visual Studio 4.2+

See Also