Class DocumentShape
Represents an object in the drawing layer, such as an AutoShape, textbox, freeform, OLE object, ActiveX control, or picture.
Inherited Members
Namespace: DRIT.Document.Drawing
Assembly: DRIT.Document.dll
Syntax
public class DocumentShape : ShapeBase, IEnumerable<Node>, IEnumerable
Properties
DrawingShape
Gets the rich drawing properties for this shape (fill, line, effects, geometry, size, position). Populated during OpenXml conversion. Null if the shape was not loaded from an OpenXml source.
Declaration
public AbstractShape DrawingShape { get; }
Property Value
| Type | Description |
|---|---|
| AbstractShape |
EmbeddedChart
Gets the embedded chart model when this shape represents a chart graphic frame. Null for non-chart shapes.
Declaration
public Chart EmbeddedChart { get; }
Property Value
| Type | Description |
|---|---|
| Chart |
HasSmartArt
Gets whether this shape is backed by SmartArt relationship wiring.
Declaration
public bool HasSmartArt { get; }
Property Value
| Type | Description |
|---|---|
| bool |
NodeType
Gets node type.
Declaration
public override NodeType NodeType { get; }
Property Value
| Type | Description |
|---|---|
| NodeType |
Overrides
SignatureLine
Gets or sets the signature-line metadata for this shape.
Declaration
public SignatureLine SignatureLine { get; set; }
Property Value
| Type | Description |
|---|---|
| SignatureLine |
SmartArt
Gets read-only SmartArt relationship and package metadata for this shape. Null when the shape is not SmartArt-backed.
Declaration
public SmartArtMetadata SmartArt { get; }
Property Value
| Type | Description |
|---|---|
| SmartArtMetadata |
SmartArtInfo
Gets a semantic, editable view of this shape's SmartArt tree. The existing SmartArt metadata property remains available for relationship and package details.
Declaration
public SmartArtShapeInfo SmartArtInfo { get; }
Property Value
| Type | Description |
|---|---|
| SmartArtShapeInfo |
StoryType
Gets or sets story type.
Declaration
public StoryType StoryType { get; }
Property Value
| Type | Description |
|---|---|
| StoryType |
TextBox
Gets or sets text box.
Declaration
public TextBox TextBox { get; }
Property Value
| Type | Description |
|---|---|
| TextBox |
TextPath
Gets or sets the legacy VML WordArt text path for this shape.
Declaration
public TextPath TextPath { get; set; }
Property Value
| Type | Description |
|---|---|
| TextPath |
Methods
AddSmartArtChildNode(string, string, string)
Provides the add Smart Art Child Node behavior for this object.
Declaration
public bool AddSmartArtChildNode(string parentModelId, string childModelId, string text = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parentModelId | The parent Model Id used by the operation. |
| string | childModelId | The child Model Id used by the operation. |
| string | text | The text used by the operation. |
Returns
| Type | Description |
|---|---|
| bool | The resulting value. |
MoveSmartArtNode(string, string, int?)
Provides the move Smart Art Node behavior for this object.
Declaration
public bool MoveSmartArtNode(string modelId, string newParentModelId, int? destinationOrder = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | modelId | The model Id used by the operation. |
| string | newParentModelId | The new Parent Model Id used by the operation. |
| int? | destinationOrder | The destination Order used by the operation. |
Returns
| Type | Description |
|---|---|
| bool | The resulting value. |
RemoveSmartArtNode(string)
Provides the remove Smart Art Node behavior for this object.
Declaration
public bool RemoveSmartArtNode(string modelId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | modelId | The model Id used by the operation. |
Returns
| Type | Description |
|---|---|
| bool | The resulting value. |
ReorderSmartArtChildren(string, IReadOnlyList<string>)
Provides the reorder Smart Art Children behavior for this object.
Declaration
public bool ReorderSmartArtChildren(string parentModelId, IReadOnlyList<string> orderedChildModelIds)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parentModelId | The parent Model Id used by the operation. |
| IReadOnlyList<string> | orderedChildModelIds | The ordered Child Model Ids used by the operation. |
Returns
| Type | Description |
|---|---|
| bool | The resulting value. |
SetSmartArtNodeText(string, string)
Sets the smart Art Node Text for this object.
Declaration
public bool SetSmartArtNodeText(string modelId, string text)
Parameters
| Type | Name | Description |
|---|---|---|
| string | modelId | The model Id used by the operation. |
| string | text | The text used by the operation. |
Returns
| Type | Description |
|---|---|
| bool | The resulting value. |