Freigeben über


Shape-Klasse

Shape Definition.When the object is serialized out as xml, its qualified name is cdr:sp.

Vererbungshierarchie

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Drawing.ChartDrawing.Shape

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

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(Style))> _
<ChildElementInfoAttribute(GetType(ShapeProperties))> _
<ChildElementInfoAttribute(GetType(NonVisualShapeProperties))> _
<ChildElementInfoAttribute(GetType(TextBody))> _
Public Class Shape _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As Shape
[ChildElementInfoAttribute(typeof(Style))]
[ChildElementInfoAttribute(typeof(ShapeProperties))]
[ChildElementInfoAttribute(typeof(NonVisualShapeProperties))]
[ChildElementInfoAttribute(typeof(TextBody))]
public class Shape : OpenXmlCompositeElement

Hinweise

The following table lists the possible child types:

  • NonVisualShapeProperties <cdr:nvSpPr>

  • ShapeProperties <cdr:spPr>

  • Style <cdr:style>

  • TextBody <cdr:txBody>

[ISO/IEC 29500-1 1. Ausgabe]

21.3.2.22 sp (Shape)

This element specifies the existence of a single shape. A shape can either be a preset or a custom geometry, defined using the DrawingML framework. In addition to geometry, each shape can have both visual and non-visual properties attached. Text and corresponding styling information can also be attached to a shape. This shape is specified along with all other shapes within either the shape tree or group shape elements.

Parent Elements

absSizeAnchor (§21.3.2.1); grpSp (§21.3.2.13); relSizeAnchor (§21.3.2.21)

Child Elements

Subclause

nvSpPr (Non-Visual Shape Properties)

§21.3.2.19

spPr (Shape Properties)

§21.3.2.23

style (Shape Style)

§21.3.2.24

txBody (Shape Text Body)

§21.3.2.26

Attributes

Description

fLocksText (Lock Text)

Specifies whether to allow for the editing of text within this shape when the worksheet on which the shape resides has been protected as defined by SpreadsheetML. This allows for the specifying of locked or "protected" text on a per-shape basis within a spreadsheet document. If this attribute is not specified then a value of 0, or false is assumed.

[Example: Consider the following shape that does not have locked text on.

<cdr:relSizeAnchor>
  …
  <cdr:sp fLocksText="0">
  …
  </cdr:sp>
  …
</cdr:relSizeAnchor>

end example]

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

fPublished (Publish to Server)

Specifies whether the shape shall be published with the worksheet when sent to the spreadsheet server. This is for use when interfacing with a document server.

[Example: Consider the following shape that is not published with the worksheet when it is published back on the spreadsheet server.

<cdr:relSizeAnchor>
  …
  <cdr:sp fPublished="0">
  …
  </cdr:sp>
  …
</cdr:relSizeAnchor>

end example]

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

macro (Reference to Custom Function)

This element specifies the custom function associated with the chart. [Example: A macro script, add-in function, and so on. end example]

The format of this string shall be application-defined, and should be ignored if not understood.

[Example:

<… macro="DoWork()" >

end example]

The possible values for this attribute are defined by the W3C XML Schema string datatype.

textlink (Text Link)

Specifies whether the text contained within this shape is linked to a cell within the spreadsheet. That is the text within the shape has the value defined in the referenced spreadsheet cell.

[Example: Consider the following shape with text linked to cell A1.

<cdr:relSizeAnchor>
  …
  <cdr:sp macro="" textlink="A1">
  …
  </cdr:sp>
  …
</cdr:relSizeAnchor>

end example]

The possible values for this attribute are defined by the W3C XML Schema string datatype.

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

© ISO/IEC29500: 2008. Die oben aufgeführten Textauszüge wurden von Microsoft (und/oder den Microsoft-Vendoren) von Englisch nach Deutsch übersetzt, und im Rahmen von ISO wird keinerlei Verantwortung für diese Übersetzungen übernommen.

Threadsicherheit

Alle öffentlichen static (Shared in Visual Basic) Member dieses Typs sind threadsicher. Bei Instanzmembern ist die Threadsicherheit nicht gewährleistet.

Siehe auch

Referenz

Shape-Member

DocumentFormat.OpenXml.Drawing.ChartDrawing-Namespace