GroupShape Class

Group shape.When the object is serialized out as xml, its qualified name is a:grpSp.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Drawing.GroupShape

Namespace:  DocumentFormat.OpenXml.Drawing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(VisualGroupShapeProperties))> _
<ChildElementInfoAttribute(GetType(NonVisualGroupShapeProperties))> _
<ChildElementInfoAttribute(GetType(GroupShape))> _
<ChildElementInfoAttribute(GetType(GraphicFrame))> _
<ChildElementInfoAttribute(GetType(Shape))> _
<ChildElementInfoAttribute(GetType(ConnectionShape))> _
<ChildElementInfoAttribute(GetType(Picture))> _
<ChildElementInfoAttribute(GetType(GvmlContentPart), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(GvmlGroupShapeExtensionList))> _
<ChildElementInfoAttribute(GetType(TextShape))> _
Public Class GroupShape _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As GroupShape
[ChildElementInfoAttribute(typeof(VisualGroupShapeProperties))]
[ChildElementInfoAttribute(typeof(NonVisualGroupShapeProperties))]
[ChildElementInfoAttribute(typeof(GroupShape))]
[ChildElementInfoAttribute(typeof(GraphicFrame))]
[ChildElementInfoAttribute(typeof(Shape))]
[ChildElementInfoAttribute(typeof(ConnectionShape))]
[ChildElementInfoAttribute(typeof(Picture))]
[ChildElementInfoAttribute(typeof(GvmlContentPart), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(GvmlGroupShapeExtensionList))]
[ChildElementInfoAttribute(typeof(TextShape))]
public class GroupShape : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • NonVisualGroupShapeProperties <a:nvGrpSpPr>

  • VisualGroupShapeProperties <a:grpSpPr>

  • TextShape <a:txSp>

  • Shape <a:sp>

  • ConnectionShape <a:cxnSp>

  • Picture <a:pic>

  • DocumentFormat.OpenXml.Office2010.Drawing.GvmlContentPart <a14:contentPart>

  • GraphicFrame <a:graphicFrame>

  • GroupShape <a:grpSp>

  • GvmlGroupShapeExtensionList <a:extLst>

[ISO/IEC 29500-1 1st Edition]

20.1.2.2.20 grpSp (Group shape)

This element specifies a group shape that represents many shapes grouped together. This shape is to be treated just as if it were a regular shape but instead of being described by a single geometry it is made up of all the shape geometries encompassed within it. Within a group shape each of the shapes that make up the group are specified just as they normally would. The idea behind grouping elements however is that a single transform can apply to many shapes at the same time.

[Example: Consider the following group shape.

<p:grpSp>
<p:nvGrpSpPr>
<p:cNvPr id="10" name="Group 9"/>
<p:cNvGrpSpPr/>
<p:nvPr/>
</p:nvGrpSpPr>
  <p:grpSpPr>
<a:xfrm>
<a:off x="838200" y="990600"/>
<a:ext cx="2426208" cy="978408"/>
<a:chOff x="838200" y="990600"/>
<a:chExt cx="2426208" cy="978408"/>
</a:xfrm>
</p:grpSpPr>
  <p:sp>
…
</p:sp>
<p:sp>
…
</p:sp>
  <p:sp>
…
</p:sp>
</p:grpSp>

In the above example we see three shapes specified within a single group. These three shapes have their position and sizes specified just as they normally would within the shape tree. The generating application should apply the transformation after the bounding box for the group shape has been calculated. end example]

Parent Elements

grpSp (§20.1.2.2.20); lockedCanvas (§20.3.2.1)

Child Elements

Subclause

cxnSp (Connection Shape)

§20.1.2.2.10

extLst (Extension List)

§20.1.2.2.15

graphicFrame (Graphic Frame)

§20.1.2.2.18

grpSp (Group shape)

§20.1.2.2.20

grpSpPr (Visual Group Shape Properties)

§20.1.2.2.22

nvGrpSpPr (Non-Visual Properties for a Group Shape)

§20.1.2.2.27

pic (Picture)

§20.1.2.2.30

sp (Shape)

§20.1.2.2.33

txSp (Text Shape)

§20.1.2.2.41

[Note: The W3C XML Schema definition of this element’s content model (CT_GvmlGroupShape) is located in §A.4.1. end note]

© ISO/IEC29500: 2008.

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

GroupShape Members

DocumentFormat.OpenXml.Drawing Namespace