Append Method
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesWindows. Forms. dll
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);Public Function Append(appendSettings As AppendSettings) As System.Windows.Forms.DialogResult| Parameter | Description |
|---|---|
| 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);Public Function Append(streamType As StreamType, appendSettings As AppendSettings) As System.Windows.Forms.DialogResult| Parameter | Description |
|---|---|
| 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);Public Sub Append(path As String, streamType As StreamType, appendSettings As AppendSettings)| Parameter | Description |
|---|---|
| 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);Public Sub Append(fileStream As FileStream, streamType As StreamType, appendSettings As AppendSettings)| Parameter | Description |
|---|---|
| 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);Public Sub Append(binaryData As Byte(), binaryStreamType As BinaryStreamType, appendSettings As AppendSettings)| Parameter | Description |
|---|---|
| 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);Public Sub Append(stringData As String, stringStreamType As StringStreamType, appendSettings As AppendSettings)| Parameter | Description |
|---|---|
| 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);Public Function Append(streamType As StreamType, loadSettings As LoadSettings, appendSettings As AppendSettings) As System.Windows.Forms.DialogResult| Parameter | Description |
|---|---|
| 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);Public Sub Append(path As String, streamType As StreamType, loadSettings As LoadSettings, appendSettings As AppendSettings)| Parameter | Description |
|---|---|
| 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);Public Sub Append(fileStream As FileStream, streamType As StreamType, loadSettings As LoadSettings, appendSettings As AppendSettings)| Parameter | Description |
|---|---|
| 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);Public Sub Append(stringData As String, stringStreamType As StringStreamType, loadSettings As LoadSettings, appendSettings As AppendSettings)| Parameter | Description |
|---|---|
| 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);Public Sub Append(binaryData As Byte(), binaryStreamType As BinaryStreamType, loadSettings As LoadSettings, appendSettings As 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.");textControl.Append("{\rtf1\ansi Sample document}", StringStreamType.RichTextFormat, AppendSettings.StartWithNewParagraph)
Console.WriteLine("Text Control is ready for use.")