Spread WinRT Documentation
GrapeCity.Xaml.SpreadSheet.Data Namespace / AverageConditionType Enumeration
Example Example


In This Topic
    AverageConditionType Enumeration
    In This Topic
    Specifies the type for the average condition.
    Syntax
    'Declaration
     
    Public Enum AverageConditionType 
       Inherits System.Enum
    'Usage
     
    Dim instance As AverageConditionType
    public enum AverageConditionType : System.Enum 
    Members
    MemberDescription
    AboveSpecifies the above average condition.
    Above1StdDevSpecifies the above standard deviation condition.
    Above2StdDevSpecifies the above the two standard deviation condition.
    Above3StdDevSpecifies the above the three standard deviation condition.
    BelowSpecifies the below average condition.
    Below1StdDevSpecifies the below standard deviation condition.
    Below2StdDevSpecifies the below the two standard deviation condition.
    Below3StdDevSpecifies the below the three standard deviation condition.
    EqualOrAboveSpecifies the above average or equal average condition.
    EqualOrBelowSpecifies the below average or equal average condition.
    Example
    This example uses the AverageConditionType enumeration.
    gcSpreadSheet1.Sheets[0].Cells[0, 0].Value = 1;
    gcSpreadSheet1.Sheets[0].Cells[1, 0].Value = 10;
    gcSpreadSheet1.Sheets[0].Cells[2, 0].Value = 6;
    gcSpreadSheet1.Sheets[0].Cells[3, 0].Value = -3;
    
    var style = new GrapeCity.Xaml.SpreadSheet.Data.StyleInfo();
    style.Background = new SolidColorBrush(Windows.UI.Colors.Blue);
    style.BorderLeft = new GrapeCity.Xaml.SpreadSheet.Data.BorderLine(Windows.UI.Colors.Red);
    style.BorderTop = new GrapeCity.Xaml.SpreadSheet.Data.BorderLine(Windows.UI.Colors.Red);
    style.BorderRight = new GrapeCity.Xaml.SpreadSheet.Data.BorderLine(Windows.UI.Colors.Red);
    style.BorderBottom = new GrapeCity.Xaml.SpreadSheet.Data.BorderLine(Windows.UI.Colors.Red);
    
    var style1 = new GrapeCity.Xaml.SpreadSheet.Data.StyleInfo();
    style1.Background = new SolidColorBrush(Windows.UI.Colors.Green);
    var style2 = new GrapeCity.Xaml.SpreadSheet.Data.StyleInfo();
    style2.Background = new SolidColorBrush(Windows.UI.Colors.Yellow);
    
    var rule = GrapeCity.Xaml.SpreadSheet.Data.AverageRule.Create(GrapeCity.Xaml.SpreadSheet.Data.AverageConditionType.Above, style);
    rule.Ranges = new GrapeCity.Xaml.SpreadSheet.Data.CellRange[] { new GrapeCity.Xaml.SpreadSheet.Data.CellRange(0, 0, 5, 1) };
    gcSpreadSheet1.Sheets[0].ConditionalFormats.AddRule(rule);
    GcSpreadSheet1.Sheets(0).Cells(0, 0).Value = 1
    GcSpreadSheet1.Sheets(0).Cells(1, 0).Value = 10
    GcSpreadSheet1.Sheets(0).Cells(2, 0).Value = 6
    GcSpreadSheet1.Sheets(0).Cells(3, 0).Value = -3
    
    Dim style As New GrapeCity.Xaml.SpreadSheet.Data.StyleInfo()
    style.Background = New SolidColorBrush(Windows.UI.Colors.Blue)
    style.BorderLeft = New GrapeCity.Xaml.SpreadSheet.Data.BorderLine(Windows.UI.Colors.Red)
    style.BorderTop = New GrapeCity.Xaml.SpreadSheet.Data.BorderLine(Windows.UI.Colors.Red)
    style.BorderRight = New GrapeCity.Xaml.SpreadSheet.Data.BorderLine(Windows.UI.Colors.Red)
    style.BorderBottom = New GrapeCity.Xaml.SpreadSheet.Data.BorderLine(Windows.UI.Colors.Red)
    
    Dim style1 As New GrapeCity.Xaml.SpreadSheet.Data.StyleInfo()
    style1.Background = New SolidColorBrush(Windows.UI.Colors.Green)
    Dim style2 As New GrapeCity.Xaml.SpreadSheet.Data.StyleInfo()
    style2.Background = New SolidColorBrush(Windows.UI.Colors.Yellow)
    
    Dim s As New GrapeCity.Xaml.SpreadSheet.Data.StyleInfo()
    Dim rule = GrapeCity.Xaml.SpreadSheet.Data.AverageRule.Create(GrapeCity.Xaml.SpreadSheet.Data.AverageConditionType.Above, Style)
    rule.Ranges = New GrapeCity.Xaml.SpreadSheet.Data.CellRange() {New GrapeCity.Xaml.SpreadSheet.Data.CellRange(0, 0, 5, 1)}
    GcSpreadSheet1.Sheets(0).ConditionalFormats.AddRule(rule)
    Inheritance Hierarchy

    System.Object
       System.ValueType
          System.Enum
             GrapeCity.Xaml.SpreadSheet.Data.AverageConditionType

    See Also