Interface IWordShapeObject
Path object from a Word document
Namespace: IronWord.Models
Assembly: IronWord.dll
Syntax
public interface IWordShapeObject
When a routine handles a drawn path or shape inside a Word document in C#, it works through IWordShapeObject. The contract represents a single shape element a document already contains, so traversal and editing code can treat every drawn object uniformly instead of binding to one concrete class. It composes the shared shape, color, document-object, cloning, positioning, and serialization abstractions, which is what gives a shape its geometry, fill, placement, and identity in a consistent shape across the model.
The concrete implementor in IronWord is ShapeContent, the type code receives when it reaches a shape while walking a document. Most code names ShapeContent directly; the interface matters when a method accepts or returns a shape by contract. Because IWordShapeObject extends IColored, an implementation exposes color settings, and because it extends ICloneable, a shape can be copied within the document. Reach for the contract when writing code that should accept any document shape regardless of how it was created.
The document element tutorial covers the element model that shapes belong to.