ShapeTarget Class

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

Inheritance Hierarchy


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


<ChildElementInfoAttribute(GetType(BackgroundAnimation))> _
<ChildElementInfoAttribute(GetType(GraphicElement))> _
<ChildElementInfoAttribute(GetType(SubShape))> _
<ChildElementInfoAttribute(GetType(OleChartElement))> _
<ChildElementInfoAttribute(GetType(TextElement))> _
Public Class ShapeTarget _
    Inherits OpenXmlCompositeElement
Dim instance As ShapeTarget
public class ShapeTarget : OpenXmlCompositeElement


The following table lists the possible child types:

  • BackgroundAnimation <p:bg>

  • SubShape <p:subSp>

  • OleChartElement <p:oleChartEl>

  • TextElement <p:txEl>

  • GraphicElement <p:graphicEl>

[ISO/IEC 29500-1 1st Edition]

19.5.72 spTgt (Shape Target)

The element specifies the shape in which to apply a certain animation to.

[Example: Consider a shape whose id is 3 in which we want to apply a fade animation effect. The <spTgt> should be used as follows:

  <p:animEffect transition="in" filter="fade">
      <p:cTn id="7" dur="2000"/>
        <p:spTgt spid="3"/>

end example]

Parent Elements

tgtEl (§19.5.81)

Child Elements


bg (Background)


graphicEl (Graphic Element)


oleChartEl (Embedded Chart Element)


subSp (Subshape)


txEl (Text Element)




spid (Shape ID)

This attribute specifies the shape identifier.

The possible values for this attribute are defined by the ST_ShapeID simple type (§

[Note: The W3C XML Schema definition of this element’s content model (CT_TLShapeTargetElement) 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


ShapeTarget Members

DocumentFormat.OpenXml.Presentation Namespace