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

    Show / Hide Table of Contents

    GradientFillFormat Class

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

    Represents a fill with a smooth gradual transition of colors at the specified locations that either follows a line or a path.

    • C#
    • VB.NET
    public sealed class GradientFillFormat : FillFormat
    Public NotInheritable Class GradientFillFormat
        Inherits FillFormat
    Inheritance:
    System.Object
    FillFormat
    GradientFillFormat

    Properties

    Angle

    Specifies the direction of color change for the gradient.

    • C#
    • VB.NET
    public double Angle { get; set; }
    Public Property Angle As Double
    Property Value
    System.Double

    The direction of the color change for the gradient, expressed as a value between 0 and 1.

    Remarks

    This property is applicable only when GradientType is Linear.

    FillRectangle

    Gets or sets the rectangle defining the fill area for the gradient.

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

    A RelativeRectangle that defines the fill area.

    Remarks

    This property is not applicable when GradientType is Linear.

    FillType

    Gets the Gradient value.

    • C#
    • VB.NET
    public override FillFormatType FillType { get; }
    Public Overrides ReadOnly Property FillType As FillFormatType
    Property Value
    FillFormatType

    The Gradient value.

    Overrides
    FillFormat.FillType

    GradientType

    Gets or sets the type of the fill gradient.

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

    The type of the fill gradient.

    Remarks

    Currently, only Linear and Radial types are supported when saving to PDF, XPS, or image formats.

    RotateWithShape

    Gets or sets a value indicating whether the fill should rotate with the shape.

    • C#
    • VB.NET
    public bool RotateWithShape { get; set; }
    Public Property RotateWithShape As Boolean
    Property Value
    System.Boolean

    true if fill should rotate with the shape; otherwise, false.

    Remarks

    If set to true and a shape that has been filled with a gradient is transformed with a rotation, then the fill will be transformed with the same rotation.

    Scaled

    Specifies whether the gradient angle scales with the fill region.

    • C#
    • VB.NET
    public bool Scaled { get; set; }
    Public Property Scaled As Boolean
    Property Value
    System.Boolean

    true if the gradient angle scales with the fill region, false otherwise.

    Remarks

    This property is applicable only when GradientType is Linear.

    Stops

    Gets the collection of gradient stops in this fill format.

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

    The collection of gradient stops in this fill format

    TileRectangle

    Gets or sets the rectangle defining the tile area for repeating gradient patterns.

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

    A RelativeRectangle that defines the tile area.

    Remarks

    This property is not applicable when GradientType is Linear.

    Inherited Methods

    SetGradient(GradientFillType)

    Sets the fill to the gradient fill.

    (Inherited from FillFormat)

    SetNone()

    Sets the fill to none, thus making the area transparent.

    (Inherited from FillFormat)

    SetPattern(PatternFillType, DrawingColor, DrawingColor)

    Sets the fill to the pattern fill.

    (Inherited from FillFormat)

    SetPicture(Content)

    Sets the fill to the picture fill.

    This method is not applicable on Fill property.

    (Inherited from FillFormat)

    SetPicture(System.IO.Stream)

    Sets the fill to the picture fill.

    This method is not applicable on Fill property.

    (Inherited from FillFormat)

    SetPicture(System.IO.Stream, PictureContentType)

    Sets the fill to the picture fill.

    This method is not applicable on Fill property.

    (Inherited from FillFormat)

    SetPicture(System.IO.Stream, System.String)

    Sets the fill to the picture fill.

    This method is not applicable on Fill property.

    (Inherited from FillFormat)

    SetPicture(System.String, System.Boolean)

    Sets the fill to the picture fill.

    This method is not applicable on Fill property.

    (Inherited from FillFormat)

    SetPicture(System.String, PictureContentType)

    Sets the fill to the picture fill.

    This method is not applicable on Fill property.

    (Inherited from FillFormat)

    SetPicture(System.String, System.String)

    Sets the fill to the picture fill.

    This method is not applicable on Fill property.

    (Inherited from FillFormat)

    SetSolid(DrawingColor)

    Sets the fill to the solid fill.

    (Inherited from FillFormat)

    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.