Shape class
Defines the Shape Class. When the object is serialized out as xml, its qualified name is dsp:sp.
DocumentFormat.OpenXml.OpenXmlElement
DocumentFormat.OpenXml.OpenXmlCompositeElement
DocumentFormat.OpenXml.Office.Drawing.Shape
Namespace: DocumentFormat.OpenXml.Office.Drawing
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
2.5.40 CT_Shape
Target namespace: http://schemas.microsoft.com/office/drawing/2008/diagram
Referenced by: CT_GroupShape
This element specifies the existence of a single shape. A shape can use either a preset or a custom geometry, defined by using the DrawingML framework. In addition to a geometry, each shape can have both visual and non-visual properties. Text and corresponding styling information can also be attached to a shape. This shape is specified along with all other shapes in group shape elements.
Child Elements:
nvSpPr: A CT_ShapeNonVisual element that specifies non-visual shape properties associated with the shape.
spPr: A CT_ShapeProperties element ([ISO/IEC-29500-1] section A.4.1) that specifies visual shape properties of the shape
style: A CT_ShapeStyle element ([ISO/IEC-29500-1] section A.4.1) that specifies the style of the shape.
txBody: A CT_TextBody element ([ISO/IEC-29500-1] section A.4.1) that specifies the shape text associated with the shape
txXfrm: A CT_Transform2D element ([ISO/IEC-29500-1] section A.4.1) that specifies a 2-D transform to be applied to the text body of the shape.
extLst: A CT_OfficeArtExtensionList element ([ISO/IEC-29500-1] section A.4.1) that enables future extensions to the shape.
Attributes:
modelId: An ST_ModelId attribute ([ISO/IEC-29500-1] section 21.4.7.43) that specifies the identifier of the DataModel element that this shape represents.
The following W3C XML Schema ([XMLSCHEMA1] section 2.1) fragment specifies the contents of this complex type.
<xsd:complexType name="CT_Shape">
<xsd:sequence>
<xsd:element name="nvSpPr" type="CT_ShapeNonVisual" minOccurs="1" maxOccurs="1"/>
<xsd:element name="spPr" type="a:CT_ShapeProperties" minOccurs="1" maxOccurs="1"/>
<xsd:element name="style" type="a:CT_ShapeStyle" minOccurs="0" maxOccurs="1"/>
<xsd:element name="txBody" type="a:CT_TextBody" minOccurs="0" maxOccurs="1"/>
<xsd:element name="txXfrm" type="a:CT_Transform2D" minOccurs="0" maxOccurs="1"/>
<xsd:element name="extLst" type="a:CT_OfficeArtExtensionList" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="modelId" type="d:ST_ModelId" use="required"/>
</xsd:complexType>
See section 5.6 for the full W3C XML Schema ([XMLSCHEMA1] section 2.1).