GemBox.Spreadsheet
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    FormatCondition Class

    Namespace:
    GemBox.Spreadsheet.ConditionalFormatting
    Assembly:
    GemBox.Spreadsheet.dll

    Represents a base class for all conditions that can be specified in a conditional formatting rule.

    • C#
    • VB.NET
    public abstract class FormatCondition
    Public MustInherit Class FormatCondition
    Inheritance:
    System.Object
    FormatCondition
    Derived
    AboveOrBelowAverageCondition
    ColorScaleCondition
    ContainCondition
    DataBarCondition
    FormulaCondition
    IconSetCondition
    TopOrBottomRankedCondition
    UniqueOrDuplicateCondition

    Properties

    ConditionType

    Gets the condition type.

    • C#
    • VB.NET
    public abstract FormatConditionType ConditionType { get; }
    Public MustOverride ReadOnly Property ConditionType As FormatConditionType
    Property Value
    FormatConditionType

    The condition type.

    Rule

    Gets the conditional formatting rule associated with this condition.

    • C#
    • VB.NET
    public ConditionalFormatRule Rule { get; }
    Public ReadOnly Property Rule As ConditionalFormatRule
    Property Value
    ConditionalFormatRule

    The conditional formatting rule associated with this condition.

    Exceptions
    System.InvalidOperationException

    Format condition is invalid because it is no longer associated with any conditional formatting rule.

    Methods

    ToString()

    Returns a System.String that represents this FormatCondition instance.

    • C#
    • VB.NET
    public abstract override string ToString()
    Public MustOverride Overrides Function ToString As String
    Returns
    System.String

    A System.String that represents this FormatCondition instance.

    Overrides
    System.Object.ToString()
    Remarks

    This method should be used primarily for debugging purposes and should be considered volatile (format of its return value might change in future versions).

    Examples

    Excel Conditional Formatting example
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.