[]
        
(Showing Draft Content)

GrapeCity.Documents.Word.Shape

Class Shape

Namespace
GrapeCity.Documents.Word
Assembly
GcDocs.Word.dll

Represents a shape element in a body content.

public class Shape : ShapeBase, IBrowsable<Shape>
Inheritance
object
Shape
Implements
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Properties

Effects

Gets the shape effects formatting properties.

public ShapeEffects Effects { get; }

Property Value

ShapeEffects

Fill

Gets the fill formatting properties.

public FillFormat Fill { get; }

Property Value

FillFormat

GeometryType

Gets or sets the geometry type of this shape.

public GeometryType GeometryType { get; set; }

Property Value

GeometryType

Line

Gets the line formatting properties.

public LineFormat Line { get; }

Property Value

LineFormat

LinkedTextFrame

Gets the first linked text frame that participates in a text frame story.

public LinkedTextFrame LinkedTextFrame { get; }

Property Value

LinkedTextFrame

Next

Gets the next shape.

public Shape Next { get; }

Property Value

Shape

Previous

Gets the previous shape.

public Shape Previous { get; }

Property Value

Shape

Style

Gets the style information for this shape.

public ShapeStyle Style { get; }

Property Value

ShapeStyle

TextFrame

Gets the text content of this shape.

public TextFrame TextFrame { get; }

Property Value

TextFrame

Methods

AddLinkedTextFrame(TextFrame, int)

Adds a linked text frame that participates in a text frame story.

Note that some geometries do not allow text frames (see TextFrameSupported(GeometryType)). If GeometryType of this shape does not support text frames, an exception will be thrown.

public LinkedTextFrame AddLinkedTextFrame(TextFrame linkTo, int index)

Parameters

linkTo TextFrame

The main text frame that starts the text frame story.

index int

The 1-based index of the linked text frame in the story.

Returns

LinkedTextFrame

The added LinkedTextFrame.

AddLinkedTextFrame(TextFrame)

Adds a linked text frame that participates in a text frame story.

Note that some geometries do not allow text frames (see TextFrameSupported(GeometryType)). If GeometryType of this shape does not support text frames, an exception will be thrown.

public LinkedTextFrame AddLinkedTextFrame(TextFrame linkTo)

Parameters

linkTo TextFrame

The main text frame that starts the text frame story.

Returns

LinkedTextFrame

The added LinkedTextFrame.

AddTextFrame(string, Style)

Adds a text frame to this shape.

Note that some geometries do not allow text frames (see TextFrameSupported(GeometryType)). If GeometryType of this shape does not support text frames, an exception will be thrown.

public TextFrame AddTextFrame(string text = null, Style style = null)

Parameters

text string

The text frame content.

style Style

The text frame content style.

Returns

TextFrame

The added TextFrame.

ApplyEffectsPreset(ShapeEffectsPreset)

public void ApplyEffectsPreset(ShapeEffectsPreset preset)

Parameters

preset ShapeEffectsPreset

ApplyPreset(LineShapePreset)

Applies a predefined outline (LineShapePreset) to this shape.

Note that LineShapePresets can only be applied to line geometries (see IsLineGeometry(GeometryType)). If GeometryType of this shape is not a line geometry, this method will do nothing and return false. For non-line geometries use ApplyPreset(ShapePreset) instead.

public bool ApplyPreset(LineShapePreset preset)

Parameters

preset LineShapePreset

The preset to apply.

Returns

bool

True if the preset was applied, false otherwise (if this shape is not a line geometry).

ApplyPreset(ShapePreset)

Applies a predefined fill and outline (ShapePreset) to this shape.

Note that ShapePresets cannot be applied to line geometries (see IsLineGeometry(GeometryType)). If GeometryType of this shape is a line geometry, this method will do nothing and return false. For line geometries use ApplyPreset(LineShapePreset) instead.

public bool ApplyPreset(ShapePreset preset)

Parameters

preset ShapePreset

The preset to apply.

Returns

bool

True if the preset was applied, false otherwise (if this shape is a line geometry).

ApplyThemedStyle(ThemedLineStyle)

Applies a predefined ThemedLineStyle to this shape.

Note that ThemedLineStyles cannot be applied to non-line geometries (see IsLineGeometry(GeometryType)). If GeometryType of this shape is not a line geometry, this method will do nothing and return false. For line geometries use ApplyThemedStyle(ThemedShapeStyle) instead.

public bool ApplyThemedStyle(ThemedLineStyle themedStyle)

Parameters

themedStyle ThemedLineStyle

The style to apply.

Returns

bool

True if the style was applied, false otherwise (if this shape is not a line geometry).

ApplyThemedStyle(ThemedShapeStyle)

Applies a predefined ThemedShapeStyle to this shape.

Note that ThemedShapeStyles cannot be applied to line geometries (see IsLineGeometry(GeometryType)). If GeometryType of this shape is a line geometry, this method will do nothing and return false. For line geometries use ApplyThemedStyle(ThemedLineStyle) instead.

public bool ApplyThemedStyle(ThemedShapeStyle themedStyle)

Parameters

themedStyle ThemedShapeStyle

The style to apply.

Returns

bool

True if the style was applied, false otherwise (if this shape is a line geometry).