Partager via


ShapeTree Class

Shape Tree.When the object is serialized out as xml, its qualified name is p:spTree.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Presentation.GroupShapeType
        DocumentFormat.OpenXml.Presentation.ShapeTree

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

Syntax

'Declaration
Public Class ShapeTree _
    Inherits GroupShapeType
'Usage
Dim instance As ShapeTree
public class ShapeTree : GroupShapeType

Remarks

The following table lists the possible child types:

  • NonVisualGroupShapeProperties <p:nvGrpSpPr>

  • GroupShapeProperties <p:grpSpPr>

  • Shape <p:sp>

  • GroupShape <p:grpSp>

  • GraphicFrame <p:graphicFrame>

  • ConnectionShape <p:cxnSp>

  • Picture <p:pic>

  • ContentPart <p:contentPart>

  • ExtensionListWithModification <p:extLst>

[ISO/IEC 29500-1 1st Edition]

19.3.1.45 spTree (Shape Tree)

This element specifies all shape-based objects, either grouped or not, that can be referenced on a given slide. As most objects within a slide are shapes, this represents the majority of content within a slide. Text and effects are attached to shapes that are contained within the spTree element.

[Example: Consider the following PresentationML slide

<p:sld>
  <p:cSld>
    <p:spTree>
      <p:nvGrpSpPr>
        …
      </p:nvGrpSpPr>
      <p:grpSpPr>
        …
      </p:grpSpPr>
      <p:sp>
        …
      </p:sp>
    </p:spTree>
  </p:cSld>
  …
</p:sld>

In the above example the shape tree specifies all the shape properties for this slide. end example]

Each shape-based object within the shape tree, whether grouped or not, shall represent one unique level of z-ordering on the slide. The z-order for each shape-based object shall be determined by the lexical ordering of each shape-based object within the shape tree: the first shape-based object shall have the lowest z-order, while the last shape-based object shall have the highest z-order.

The z-ordering of shape-based objects within the shape tree shall also determine the navigation (tab) order of the shape-based objects: the shape-based object with the lowest z-order (the first shape in lexical order) shall be first in navigation order, with objects being navigated in ascending z-order.

[Example: Consider the following PresentationML slide with two shapes

<p:sld>
  <p:cSld>
    <p:spTree>      
      …       
      <p:sp>
        <p:nvSpPr>
          <p:cNvPr id="5" name="Oval 4" />
          …
        </p:nvSpPr>
        …
      </p:sp>
      <p:sp>
        <p:nvSpPr>
          <p:cNvPr id="4" name="Isosceles Triangle 3" />
          …
        </p:nvSpPr>
        …
      </p:sp>
    </p:spTree>
  </p:cSld>
  …
</p:sld>

In the above example the shape with name Oval 4 has the lowest z-order value since that shape is the first shape in the shape tree. Oval 4 is also the first shape in navigation order. The shape with name Isosceles Triangle 3 has the highest z positioning value since that shape is the last shape in the shape tree. Isosceles Triangle 3 is also the last shape in navigation order. end example]

Parent Elements

cSld (§19.3.1.16)

Child Elements

Subclause

contentPart (Content Part)

§19.3.1.14

cxnSp (Connection Shape)

§19.3.1.19

extLst (Extension List with Modification Flag)

§19.3.1.20

graphicFrame (Graphic Frame)

§19.3.1.21

grpSp (Group Shape)

§19.3.1.22

grpSpPr (Group Shape Properties)

§19.3.1.23

nvGrpSpPr (Non-Visual Properties for a Group Shape)

§19.3.1.31

pic (Picture)

§19.3.1.37

sp (Shape)

§19.3.1.43

[Note: The W3C XML Schema definition of this element’s content model (CT_GroupShape) is located in §A.3. 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

ShapeTree Members

DocumentFormat.OpenXml.Presentation Namespace