VDocs.NET
Back to DOM

DOM.Elements.ElementsContainer

Namespace: DOM.Elements

Generic container for flow elements (images, paragraphs, shapes, tables, text, paths).

inherits from and provides convenience accessors and factory-style methods for common child element types. Concrete document parts (sections, headers, footers, pages, etc.) use this container to manage and create their child elements in a consistent way.

15 members

Properties

Images

Gets all image children contained in this container.

Paragraphs

Gets all paragraph children contained in this container.

Paths

Gets all SVG path children contained in this container.

Shapes

Gets all shape children contained in this container.

Tables

Gets all table children contained in this container.

Texts

Gets all text nodes contained in this container.

Methods

AddImage

3 overloads
AddImage(IImage image)

Adds an existinginstance to this container.

Parameters

image
The image instance to add.

Returns

The sameinstance that was added.

IImage AddImage(Stream imageStream)

Creates anfrom a stream and adds it to this container.

Parameters

imageStream
Stream containing image data. The caller is responsible for keeping the stream valid while the image is being read.

Returns

IImage

The createdinstance that was added to the container.

IImage AddImage(string imagePath)

Creates anfrom a file path and adds it to this container.

Parameters

imagePath
Path to the image file to load.

Returns

IImage

The createdinstance that was added to the container.

AddParagraph

AddParagraph(IParagraph paragraph)

Adds the specified paragraph to this container. Ifis null, a new emptyinstance is created, added and returned.

Parameters

paragraph
Optional paragraph instance to add. If null a new paragraph is created.

Returns

The paragraph instance that was added to the container.

AddPath

AddPath(ISVGPath path)

Adds aninstance to this container.

Parameters

path
The SVG path to add.

Returns

The sameinstance that was added.

AddShape

AddShape(IShape shape)

Adds the providedinstance to this container.

Parameters

shape
Shape to add.

Returns

The sameinstance that was added.

AddTable

AddTable(ITable table)

Adds the providedinstance to this container.

Parameters

table
Table to add.

Returns

The sameinstance that was added.

AddText

2 overloads
IText AddText(string text)

Adds a newnode containingto this container.

Parameters

text
The string content to add.

Returns

IText

The createdinstance.

AddText(IText text)

Adds an existing text node to this container.

Parameters

text
Theinstance to add.

Returns

The sameinstance that was added.

VDocs.NET
The .NET Word Document Library

Generate Word
documents.
Not XML.

Create professional documents in .NET without the complexity of OpenXML or Word Interop.

Reset Password

Enter your email and we'll send you a link to reset your password.

Remember your password? Sign in