TX Text Control .NET for WPF

Append Method

Method|Introduced in 14.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WPF.SDK as TXTextControl.Server.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(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 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 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 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 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 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 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 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);

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("Server Text Control is ready for use.");