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


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
    MemberValueDescription
    Formula6

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

    Said formula is entered as the Val parameter.

    Max2

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

    The Val parameter is not used.

    Min1

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

    The Val parameter is not used.

    None0No ThresholdType is used.
    Number3

    Uses a number on which sits the ColorThreshold.

    The Val parameter will be a number.

    Percent4

    Uses a percent on which sits the ColorThreshold.

    The Val parameter will be a number.

    Percentile5

    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

    Supported Frameworks

    .NET: net5.0, net5.0-windows, net6.0, net6.0-macos, net6.0-windows, net7.0, net7.0-macos, net7.0-windows, net8.0, net8.0-browser, net8.0-macos, net8.0-windows, net9.0, net9.0-browser, net9.0-macos, net9.0-windows, net10.0, net10.0-browser, net10.0-macos, net10.0-windows.

    .NET Framework: net40, net403, net45, net451, net452, net46, net461, net462, net463, net47, net471, net472, net48, net481.

    See Also