GradientFillProperties Class

Defines the GradientFillProperties Class.This class is only available in Office2010.When the object is serialized out as xml, its qualified name is w14:gradFill.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Office2010.Word.GradientFillProperties

Namespace:  DocumentFormat.OpenXml.Office2010.Word
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
<OfficeAvailabilityAttribute(FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(LinearShadeProperties), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(PathShadeProperties), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(GradientStopList), FileFormatVersions.Office2010)> _
Public Class GradientFillProperties _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As GradientFillProperties
[OfficeAvailabilityAttribute(FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(LinearShadeProperties), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(PathShadeProperties), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(GradientStopList), FileFormatVersions.Office2010)]
public class GradientFillProperties : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • GradientStopList <w14:gsLst>

  • LinearShadeProperties <w14:lin>

  • PathShadeProperties <w14:path>

2.5.15 CT_GradientFillProperties

Target namespace: https://schemas.microsoft.com/office/word/2009/2/wordml

Referenced by: CT_TextOutlineEffect, CT_FillTextEffect

Specifies a gradient fill.

A gradient fill is a fill that is characterized by a smooth gradual transition from one color to the next.

The desired transition colors and locations are specified in the gradient stop list (gsLst) child element. When this element has neither lin nor path child elements, a default lin element with ang = 0 and scaled = false is assumed.

Child Elements:

gsLst : A CT_GradientStopList element that specifies gradient colors and their relative positions in the color band. Black solid fill is used as a default when this element is absent.

lin : A CT_LinearShadeProperties element that specifies a linear gradient.

path : A CT_PathShadeProperties element that specifies that the gradient fill follows a path vs. a linear line.

The following W3C XML Schema ([XMLSCHEMA1] section 2.1) fragment specifies the contents of this complex type.

<xsd:complexType name="CT_GradientFillProperties">

<xsd:sequence>

<xsd:element name="gsLst" type="CT_GradientStopList" minOccurs="0"/>

<xsd:group ref="EG_ShadeProperties" minOccurs="0"/>

</xsd:sequence>

</xsd:complexType>

See section 5.1 for the full W3C XML Schema ([XMLSCHEMA1] section 2.1).

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

GradientFillProperties Members

DocumentFormat.OpenXml.Office2010.Word Namespace