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

    Show / Hide Table of Contents

    ContainTextCondition Class

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

    Represents a condition that formats only cells with text that satisfies the specified criteria.

    • C#
    • VB.NET
    public sealed class ContainTextCondition : ContainCondition
    Public NotInheritable Class ContainTextCondition
        Inherits ContainCondition
    Inheritance:
    System.Object
    FormatCondition
    ContainCondition
    ContainTextCondition

    Properties

    Operator

    Gets or sets the operator of this ContainTextCondition.

    • C#
    • VB.NET
    public ContainTextOperator Operator { get; set; }
    Public Property Operator As ContainTextOperator
    Property Value
    ContainTextOperator

    The operator of this ContainTextCondition.

    Value

    Gets or sets the value of this ContainTextCondition.

    Value can be either constant or formula.

    If value is constant, then it cannot be null.

    If value is formula, it must start with '='.

    • C#
    • VB.NET
    public string Value { get; set; }
    Public Property Value As String
    Property Value
    System.String

    The value of this ContainTextCondition.

    Exceptions
    System.ArgumentNullException

    Value is null.

    Methods

    ToString()

    Returns a System.String that represents this ContainTextCondition instance.

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

    A System.String that represents this ContainTextCondition instance.

    Overrides
    ContainCondition.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).

    Inherited Properties

    ConditionType

    Gets the Contain value.

    (Inherited from ContainCondition)

    ContainConditionType

    Gets the ContainCondition type.

    (Inherited from ContainCondition)

    Rule

    Gets the conditional formatting rule associated with this condition.

    (Inherited from FormatCondition)

    Style

    Gets the actual formatting which will be applied to a cell if its value satisfies this ContainCondition.

    (Inherited from ContainCondition)

    Examples

    Excel Conditional Formatting example
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.