Inserts a new image in a Text Control document.

Add()

public bool Add();
Public Function Add() As Boolean

Add(Image, Int)

public bool Add(Image image, int textPosition);
Public Function Add(ByVal image As Image, ByVal textPosition As Integer) As Boolean

Add(Image, HorizontalAlignment, Int, ImageInsertionMode)

public bool Add(Image image, HorizontalAlignment alignment, int textPosition, ImageInsertionMode insertionMode);
Public Function Add(ByVal image As Image, ByVal alignment As HorizontalAlignment, ByVal textPosition As Integer, _
  ByVal insertionMode As ImageInsertionMode) As Boolean

Add(Image, System.Drawing.Point, Int, ImageInsertionMode)

public bool Add(Image image, System.Drawing.Point location, int textPosition, ImageInsertionMode insertionMode);
Public Function Add(ByVal image As Image, ByVal location As System.Drawing.Point, ByVal textPosition As Integer, _
  ByVal insertionMode As ImageInsertionMode) As Boolean

Add(Image, Int, System.Drawing.Point, ImageInsertionMode)

public bool Add(Image image, int pageNumber, System.Drawing.Point location, ImageInsertionMode insertionMode);
Public Function Add(ByVal image As Image, ByVal pageNumber As Integer, ByVal location As System.Drawing.Point, _
  ByVal insertionMode As ImageInsertionMode) As Boolean

Add(Image, System.Drawing.Point, ImageInsertionMode)

public bool Add(Image image, System.Drawing.Point location, ImageInsertionMode insertionMode);
Public Function Add(ByVal image As Image, ByVal location As System.Drawing.Point, _
  ByVal insertionMode As ImageInsertionMode) As Boolean

Parameters

Parameter Description
image Specifies the image to add.
textPosition Specifies the text position at which the image is to be inserted. If -1 is specified, the image is inserted at the current input position.
alignment Specifies the image's horizontal alignment. It can be one of the HorizontalAlignment values:
Event Description
Left The image is left aligned, relative to the paragraph to which it is anchored.
Right The image is right aligned, relative to the paragraph to which it is anchored.
Centered The image is centered, relative to the paragraph to which it is anchored.
Justify This value is not supported for images.
location Specifies the location, in twips, at which the image is to be inserted. This is a location relative to the top left corner either of a page or of a paragraph.
insertionMode Specifies how the text flow is handled. It can be one of the following values of the ImageInsertionMode enumeration:
Event Description
AboveTheText The image is inserted at a certain geometrical location above the text. This means that the image overwrites the text.
BelowTheText The image is inserted at a certain geometrical location below the text. This means that the text overwrites the image.
DisplaceCompleteLines The text stops at the top and continues at the bottom of the image.
DisplaceText The text flows around the image and empty areas at the left and right side are filled.
Other Vaues All other values cannot be used with the ImageCollection.Add method.
pageNumber Specifies the number of a page beginning with 1 where the image is located.

Return Value

The return value is true, if the image could be added. Otherwise, it is false.