Spread WPF Documentation
StopIfTrue Property (FormattingRuleBase)
Example 


GrapeCity.Windows.SpreadSheet.Data Namespace > FormattingRuleBase Class : StopIfTrue Property
Gets or sets whether rules with lower priority are applied over this rule. If this property is true and this rule evaluates to true, no rules with lower priority are applied over this rule.
Syntax
'Declaration
 
Public Property StopIfTrue As System.Boolean
'Usage
 
Dim instance As FormattingRuleBase
Dim value As System.Boolean
 
instance.StopIfTrue = value
 
value = instance.StopIfTrue
public System.bool StopIfTrue {get; set;}
Example
This example sets the StopIfTrue property.
gcSpreadSheet1.ActiveSheet.SetArray(0, 0, new object[,] { { 1 }, { 2 }, { 3 }, { 4 }, { 5 }, { 6 }, { 7 }, { 8 }, { 9 }, { 10 } });

GrapeCity.Windows.SpreadSheet.Data.CellValueRule cell = new GrapeCity.Windows.SpreadSheet.Data.CellValueRule();
cell.Operator = GrapeCity.Windows.SpreadSheet.Data.ComparisonOperator.GreaterThan;
cell.Value1 = 5;
cell.Ranges = new GrapeCity.Windows.SpreadSheet.Data.CellRange[] { new GrapeCity.Windows.SpreadSheet.Data.CellRange(0, 0, 10, 1) };
cell.Style = new GrapeCity.Windows.SpreadSheet.Data.StyleInfo() { Background = new SolidColorBrush(Colors.Red) };
this.gcSpreadSheet1.ActiveSheet.ConditionalFormats.AddRule(cell);

GrapeCity.Windows.SpreadSheet.Data.Top10Rule top = new GrapeCity.Windows.SpreadSheet.Data.Top10Rule();
top.Operator = GrapeCity.Windows.SpreadSheet.Data.Top10ConditionType.Top;
top.Rank = 3;
top.StopIfTrue = true;
top.Ranges = new GrapeCity.Windows.SpreadSheet.Data.CellRange[] { new GrapeCity.Windows.SpreadSheet.Data.CellRange(0, 0, 10, 1) };
top.Style = new GrapeCity.Windows.SpreadSheet.Data.StyleInfo() { Foreground = new SolidColorBrush(Colors.Cyan) };
this.gcSpreadSheet1.ActiveSheet.ConditionalFormats.AddRule(top);
GcSpreadSheet1.ActiveSheet.SetArray(0, 0, New Object(,) {{1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}})

Dim cell As New GrapeCity.Windows.SpreadSheet.Data.CellValueRule()
cell.Operator = GrapeCity.Windows.SpreadSheet.Data.ComparisonOperator.GreaterThan
cell.Value1 = 5
cell.Ranges = New GrapeCity.Windows.SpreadSheet.Data.CellRange() {New GrapeCity.Windows.SpreadSheet.Data.CellRange(0, 0, 10, 1)}
cell.Style = New GrapeCity.Windows.SpreadSheet.Data.StyleInfo() With {.Background = New SolidColorBrush(Colors.Red)}
GcSpreadSheet1.ActiveSheet.ConditionalFormats.AddRule(cell)

Dim top As New GrapeCity.Windows.SpreadSheet.Data.Top10Rule()
top.Operator = GrapeCity.Windows.SpreadSheet.Data.Top10ConditionType.Top
top.Rank = 3
top.StopIfTrue = True
top.Ranges = New GrapeCity.Windows.SpreadSheet.Data.CellRange() {New GrapeCity.Windows.SpreadSheet.Data.CellRange(0, 0, 10, 1)}
top.Style = New GrapeCity.Windows.SpreadSheet.Data.StyleInfo() With {.Foreground = New SolidColorBrush(Colors.Cyan)}
GcSpreadSheet1.ActiveSheet.ConditionalFormats.AddRule(top)
See Also

Reference

FormattingRuleBase Class
FormattingRuleBase Members