DOM.Elements.ElementsContainer
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
Gets all image children contained in this container.
Gets all paragraph children contained in this container.
Gets all SVG path children contained in this container.
Gets all shape children contained in this container.
Gets all table children contained in this container.
Gets all text nodes contained in this container.
Methods
AddImage
3 overloadsAddImage(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 overloadsIText 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.