Xceed Workbooks for .NET v3.0 Documentation
Xceed.Workbooks.NET Assembly / Xceed.Workbooks.NET Namespace / ThresholdType Enumeration
Example Example


In This Topic
    ThresholdType Enumeration
    In This Topic
    Contains the various possible behavior of a ColorThreshold.
    Syntax
    'Declaration
     
    
    Public Enum ThresholdType 
       Inherits System.Enum
    'Usage
     
    
    Dim instance As ThresholdType
    public enum ThresholdType : System.Enum 
    Members
    MemberDescription
    Formula

    Uses a formula that determines the value on which sits the ColorThreshold.

    Said formula is entered as the Val parameter.

    Max

    Uses the highest value of the chosen Color to determine the ColorThreshold

    The Val parameter is not used.

    Min

    Uses the lowest value of the chosen Color to determine the ColorThreshold.

    The Val parameter is not used.

    NoneNo ThresholdType is used.
    Number

    Uses a number on which sits the ColorThreshold.

    The Val parameter will be a number.

    Percent

    Uses a percent on which sits the ColorThreshold.

    The Val parameter will be a number.

    Percentile

    Uses a percentile on which sits the ColorThreshold.

    The Val parameter will be a number.

    Example
    ConditionalFormatting cfCustom1= ConditionalFormatting.CreateColorScaleCustom(
    
      new ColorThreshold( ThresholdType.Min, Color.Red),
      new ColorThreshold( ThresholdType.Max, Color.Green ) ).AddAreas( "B1:B10" );
    
    doc.Worksheets[ 0 ].ConditionalFormattings.Add( cfCustom1);
    
    ConditionalFormatting cfCustom2= ConditionalFormatting.CreateColorScaleCustom(
    
      new ColorThreshold( ThresholdType.Percent, Color.BlueViolet, 20 ),
      new ColorThreshold( ThresholdType.Percent, Color.IndianRed, 50 ),
      new ColorThreshold( ThresholdType.Percent, Color.Chartreuse, 70 ) ).AddAreas( "B1:B10" );
    			
    doc.Worksheets[ 0 ].ConditionalFormattings.Add( cfCustom2);
    Inheritance Hierarchy

    System.Object
       System.ValueType
          System.Enum
             Xceed.Workbooks.NET.ThresholdType

    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also