Search Results for

    Show / Hide Table of Contents

    Interface IWordShapeObjectCollection

    Collection of Word path objects

    Namespace: IronWord.Models
    Assembly: IronWord.dll
    Syntax
    public interface IWordShapeObjectCollection

    Every drawn path in a Word document, gathered as one indexable group in C#, is exposed through IWordShapeObjectCollection. The contract extends IList<ShapeContent>, so the shapes behave like a standard list: index them, count them, add and remove entries, and iterate them with foreach. Working against the contract keeps document code independent of the concrete collection while preserving full list semantics over the shapes.

    The concrete implementor in IronWord is ShapeObjectCollection, which derives from ObservableCollection<ShapeContent> and is what code receives when it reaches a document's shapes. Each element is a ShapeContent, so every entry carries the geometry, color, and placement of a shape; the collection layer adds the list operations on top. The contract also extends the serialization abstraction, so the shape set round-trips with the document model. Iterate it to inspect each drawn object, or mutate it to add and reorder shapes before saving.

    The document element tutorial explains the element model these shapes sit inside.

    ☀
    ☾
    Downloads
    • Download with NuGet
    • Start for Free
    In This Article
    Back to top
    Install with NuGet