[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IColorScaleCriteria.Item

this Property

this[int]

Returns a single IColorScaleCriterion object from the ColorScaleCriteria collection.

Each criterion represents one threshold in a color scale conditional format, such as the minimum, midpoint, or maximum value.

Declaration
IColorScaleCriterion this[int Index] { get; }
ReadOnly Default Property Item(Index As Integer) As IColorScaleCriterion
Parameters
Type Name Description
int Index

The index of the criterion to return.

Examples
worksheet.Range["A1:A5"].Value = new object[,] {{1}, {2}, {3}, {4}, {5}};
IColorScale colorScale = worksheet.Range["A1:A5"].FormatConditions
    .AddColorScale(ColorScaleType.TwoColorScale);
IColorScaleCriterion criterion = colorScale.ColorScaleCriteria[0];
criterion.Type = ConditionValueTypes.Number;