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

    Show / Hide Table of Contents

    GradientShadingStyle Enum

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

    Represents a shading style and variant of a gradient fill effect.

    Gradient fill is currently supported in XLSX, XLSB and partially in rendering formats (PDF, XPS, and image formats).

    • C#
    • VB.NET
    public enum GradientShadingStyle
    Public Enum GradientShadingStyle
    Remarks

    Conceptually, cell formatting is divided into following groups:

    • Number - indicates how to format and render the numeric value of a cell. Associated property is NumberFormat.
    • Alignment - formatting information pertaining to text alignment in cells. Associated properties are HorizontalAlignment, VerticalAlignment, Indent, Rotation, IsTextVertical, WrapText and ShrinkToFit.
    • Font - defines the properties for the used font. Associated property is Font.
    • Border - expresses a single set of cell border formats (left, right, top, bottom and diagonal). Associated property is Borders.
    • Fill - specifies fill formatting (pattern or gradient). Associated property is FillPattern.
    • Protection - contains protection properties associated with the cell. Associated properties are Locked and FormulaHidden.

    Additional CellStyle properties not associated with any formatting group are:

    • Name - name of the referenced Style.
    • QuotePrefix - true to store numeric value of a cell as text; otherwise, false.
    • IsDefault - true if Name Style is default (Normal) and there are no additional modifications of cell formatting; otherwise, false.

    ExcelFile contains a set of Styles which can be referenced by multiple cells.

    ExcelFile must always contain at least one Style which cannot be removed and is, by default, referenced by all cells. This default style is Normal.

    Style can either be built-in or user-defined. Built-in style is accessible from Styles via BuiltInCellStyleName enumeration.

    Cell formatting group (Number, Alignment, Font, Border, Fill or Protection) (and its associated properties) is resolved from Name Style, unless cell formatting group or its associated property is modified.

    Cell formatting is available for one or more cells through Style property which is available on ExcelCell and CellRange types. Cell formatting specified on ExcelColumn and ExcelRow types through Style property is simply propagated to cell formatting of its Cells.

    note

    For performance reasons, cell formatting on CellRange is resolved based just on its top-left cell formatting, except borders which are resolved based on corner cells depending on border side.

    Setting cell formatting property on CellRange is propagated to each cell in a range.

    To set Style to one or more cells, simply assign it to Style property.

    tip

    Preferable way to modify formatting property of multiple cells is to get CellRange to which all those cells belong, and use Style property of that range to make the modification.

    If modifying multiple formatting properties of a CellRange, without preserving unmodified formatting properties, preferable way is to create new instance of CellStyle, make modifications on it, and assign it to Style property of that range.

    GemBox.Spreadsheet internally takes care not to allocate unnecessary cells when formatting a range of cells (for example, when formatting Cells) and to cache formatting information of equally formatted cells, at the appropriate time, to reduce memory footprint.

    Fields

    Complex

    Gradient fill effect is too complex to be described with this enumeration.

    DiagonalDown

    Linear gradient where the first color starts at the top-right and bottom-left corners of the cell and blends diagonally with the second color which starts in the middle of the cell [1 \ 2 \ 1].

    DiagonalDownHigh

    Linear gradient where the first color starts at the top-right corner of the cell and blends diagonally with the second color which starts at the bottom-left corner of the cell [2 \ 1].

    DiagonalDownLow

    Linear gradient where the first color starts at the bottom-left corner of the cell and blends diagonally with the second color which starts at the top-right corner of the cell [1 \ 2].

    DiagonalUp

    Linear gradient where the first color starts at the top-left and bottom-right corners of the cell and blends diagonally with the second color which starts in the middle of the cell [1 / 2 / 1].

    DiagonalUpHigh

    Linear gradient where the first color starts at the top-left corner of the cell and blends diagonally with the second color which starts at the bottom-right corner of the cell [1 / 2].

    DiagonalUpLow

    Linear gradient where the first color starts at the bottom-right corner of the cell and blends diagonally with the second color which starts at the top-left corner of the cell [2 / 1].

    FromBottomLeftCorner

    Path gradient where the first color starts at the bottom-left corner of the cell and blends with the second color which starts at the other corners of the cell.

    FromBottomRightCorner

    Path gradient where the first color starts at the bottom-right corner of the cell and blends with the second color which starts at the other corners of the cell.

    FromCenter

    Path gradient where the first color starts in the middle of the cell and blends with the second color which starts at the corners of the cell.

    FromTopLeftCorner

    Path gradient where the first color starts at the top-left corner of the cell and blends with the second color which starts at the other corners of the cell.

    FromTopRightCorner

    Path gradient where the first color starts at the top-right corner of the cell and blends with the second color which starts at the other corners of the cell.

    Horizontal

    Linear gradient where the first color starts at the top and bottom sides of the cell and blends horizontally with the second color which starts in the middle of the cell [1 - 2 - 1].

    HorizontalHigh

    Linear gradient where the first color starts at the top side of the cell and blends horizontally with the second color which starts at the bottom side of the cell [1 - 2].

    HorizontalLow

    Linear gradient where the first color starts at the bottom side of the cell and blends horizontally with the second color which starts at the top side of the cell [2 - 1].

    None

    Cell doesn't have any gradient fill effect.

    Vertical

    Linear gradient where the first color starts at the left and right sides of the cell and blends vertically with the second color which starts in the middle of the cell [1 | 2 | 1].

    VerticalHigh

    Linear gradient where the first color starts at the right side of the cell and blends vertically with the second color which starts at the left side of the cell [2 | 1].

    VerticalLow

    Linear gradient where the first color starts at the left side of the cell and blends vertically with the second color which starts at the right side of the cell [1 | 2].

    See Also
    GradientStyle
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.