InsertMergeBlock Method
- Namespace
TXTextControl.DocumentServer. DataSources
- Package
TXTextControl.asTextControl. WinForms. SDK TXDocumentServer.from the private NuGet feed or Text Control Offline Packagesdll
Description
Inserts a repeating merge block into a TextControl instance, a WPF.TextControl instance or a ServerTextControl instance at the current input position.
Syntax
public void InsertMergeBlock(object textControl, MergeBlockInfo mergeBlockInfo, MergeBlockSettings settings);Public Sub InsertMergeBlock(textControl As Object, mergeBlockInfo As MergeBlockInfo, settings As MergeBlockSettings)Parameters
| Parameter | Description |
|---|---|
| textControl | A TextControl instance, a WPF.TextControl instance or a ServerTextControl instance. |
| mergeBlockInfo | A MergeBlockInfo object which describes the merge block to insert into the TextControl instance. |
| settings | A MergeBlockSettings object which describes the settings of the merge block to insert into the TextControl instance. |
Examples
The following example uses Insert Merge Block in a focused Data Source Manager workflow. The created object is then available to the surrounding document workflow.
dataSourceManager.InsertMergeBlock("Approved", new TXTextControl.DocumentServer.DataSources.MergeBlockInfo("CustomerName"), new TXTextControl.DocumentServer.DataSources.MergeBlockSettings());
Console.WriteLine("Data Source Manager is ready for use.");dataSourceManager.InsertMergeBlock("Approved", New TXTextControl.DocumentServer.DataSources.MergeBlockInfo("CustomerName"), New TXTextControl.DocumentServer.DataSources.MergeBlockSettings())
Console.WriteLine("Data Source Manager is ready for use.")