TX Text Control .NET for Windows Forms

Append Method

Method|Introduced in 14.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WinForms.SDK as TXTextControl.Windows.Forms.dll from the private NuGet feed or Text Control Offline Packages

Description

Loads text in a certain format from a file, a byte array or a string and appends it to the existing document.

Syntax

Append(AppendSettings)

Opens a file open dialogbox and appends the selected file to the existing document.

public System.Windows.Forms.DialogResult Append(AppendSettings appendSettings);
ParameterDescription
appendSettings

Specifies settings on how the document is appended. It can be one of the AppendSettings values.

Append(StreamType, AppendSettings)

Opens a file open dialogbox and appends the selected file with the specified format to the existing document.

public System.Windows.Forms.DialogResult Append(StreamType streamType, AppendSettings appendSettings);
ParameterDescription
streamType

Specifies one of the StreamType values.

appendSettings

Specifies settings on how the document is appended. It can be one of the AppendSettings values.

Append(string, StreamType, AppendSettings)

Loads text with the specified format from the specified file and appends it to the existing document.

public void Append(string path, StreamType streamType, AppendSettings appendSettings);
ParameterDescription
path

Specifies a file from which the data is loaded.

streamType

Specifies one of the StreamType values.

appendSettings

Specifies settings on how the document is appended. It can be one of the AppendSettings values.

Append(FileStream, StreamType, AppendSettings)

Loads text with the specified format from the specified file stream and appends it to the existing document.

public void Append(FileStream fileStream, StreamType streamType, AppendSettings appendSettings);
ParameterDescription
fileStream

Specifies a file from which the data is loaded. The data is loaded from the stream's current position.

streamType

Specifies one of the StreamType values.

appendSettings

Specifies settings on how the document is appended. It can be one of the AppendSettings values.

Append(byte[], BinaryStreamType, AppendSettings)

Loads text with the specified format from the specified byte array and appends it to the existing document.

public void Append(byte[] binaryData, BinaryStreamType binaryStreamType, AppendSettings appendSettings);
ParameterDescription
binaryData

Specifies a byte array from which the data is loaded.

binaryStreamType

Specifies one of the BinaryStreamType values.

appendSettings

Specifies settings on how the document is appended. It can be one of the AppendSettings values.

Append(string, StringStreamType, AppendSettings)

Loads text with the specified format from the specified string and appends it to the existing document.

public void Append(string stringData, StringStreamType stringStreamType, AppendSettings appendSettings);
ParameterDescription
stringData

Specifies a string from which the data is loaded.

stringStreamType

Specifies one of the StringStreamType values.

appendSettings

Specifies settings on how the document is appended. It can be one of the AppendSettings values.

Append(StreamType, LoadSettings, AppendSettings)

Opens a file open dialogbox and appends the selected file with the specified format and special settings to the existing document.

public System.Windows.Forms.DialogResult Append(StreamType streamType, LoadSettings loadSettings, AppendSettings appendSettings);
ParameterDescription
streamType

Specifies one of the StreamType values.

loadSettings

Specifies a LoadSettings object with additional information and settings for the load operation.

appendSettings

Specifies settings on how the document is appended. It can be one of the AppendSettings values.

Append(string, StreamType, LoadSettings, AppendSettings)

Loads text with the specified format and special settings from the specified file and appends it to the existing document.

public void Append(string path, StreamType streamType, LoadSettings loadSettings, AppendSettings appendSettings);
ParameterDescription
path

Specifies a file from which the data is loaded.

streamType

Specifies one of the StreamType values.

loadSettings

Specifies a LoadSettings object with additional information and settings for the load operation.

appendSettings

Specifies settings on how the document is appended. It can be one of the AppendSettings values.

Append(FileStream, StreamType, LoadSettings, AppendSettings)

Loads text with the specified format and special settings from the specified file stream and appends it to the existing document.

public void Append(FileStream fileStream, StreamType streamType, LoadSettings loadSettings, AppendSettings appendSettings);
ParameterDescription
fileStream

Specifies a file from which the data is loaded. The data is loaded from the stream's current position.

streamType

Specifies one of the StreamType values.

loadSettings

Specifies a LoadSettings object with additional information and settings for the load operation.

appendSettings

Specifies settings on how the document is appended. It can be one of the AppendSettings values.

Append(string, StringStreamType, LoadSettings, AppendSettings)

Loads text with the specified format and special settings from the specified string and appends it to the existing document.

public void Append(string stringData, StringStreamType stringStreamType, LoadSettings loadSettings, AppendSettings appendSettings);
ParameterDescription
stringData

Specifies a string from which the data is loaded.

stringStreamType

Specifies one of the StringStreamType values.

loadSettings

Specifies a LoadSettings object with additional information and settings for the load operation.

appendSettings

Specifies settings on how the document is appended. It can be one of the AppendSettings values.

Append(byte[], BinaryStreamType, LoadSettings, AppendSettings)

public void Append(byte[] binaryData, BinaryStreamType binaryStreamType, LoadSettings loadSettings, AppendSettings appendSettings);

Return Value

The implementations that open a dialog box return the dialog's result value.

Examples

The following example appends formatted text to the existing document. The created object is then available to the surrounding document workflow.

textControl.Append(@"{\rtf1\ansi Sample document}", StringStreamType.RichTextFormat, AppendSettings.StartWithNewParagraph);
Console.WriteLine("Text Control is ready for use.");