LinearShadeProperties Class

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

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Office2010.Word.LinearShadeProperties

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

Syntax

'Declaration
<OfficeAvailabilityAttribute(FileFormatVersions.Office2010)> _
Public Class LinearShadeProperties _
    Inherits OpenXmlLeafElement
'Usage
Dim instance As LinearShadeProperties
[OfficeAvailabilityAttribute(FileFormatVersions.Office2010)]
public class LinearShadeProperties : OpenXmlLeafElement

Remarks

2.5.12 CT_LinearShadeProperties

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

Referenced by: CT_GradientFillProperties

Specifies linear gradient.

Attributes:

ang : An optional ST_PositiveFixedAngle (as specified in [ISO/IEC-29500-1] §20.1.10.44) attribute that specifies the direction of color change for the gradient. To define this angle, let its value be x measured clockwise. Then (-sin x, cos x) is a vector parallel to the line of constant color in the gradient fill. Default value for this attribute is 0. This attribute MAY<11> be required.

scaled : An optional ST_OnOff attribute that specifies whether the gradient angle scales with the fill area. Mathematically, if this flag is true, then the gradient vector (cos x, sin x) is scaled by the width(w) and height(h) of the fill area, so that the vector becomes (w cos x, h sin x) (before normalization). Observe that now if the gradient angle is 45 degrees, the gradient vector is (w,h), which goes from top-left to bottom–right of the fill area. If this flag is false, the gradient angle is independent of the fill area and is not scaled using the manipulation described earlier. So a 45-degree gradient angle always give a gradient band whose line of constant color is parallel to the vector (1, -1). By default, linear shade is not scaled.

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

<xsd:complexType name="CT_LinearShadeProperties">

<xsd:attribute name="ang" type="a:ST_PositiveFixedAngle" use="optional"/>

<xsd:attribute name="scaled" type="ST_OnOff" use="optional"/>

</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

LinearShadeProperties Members

DocumentFormat.OpenXml.Office2010.Word Namespace