TX Text Control .NET Server

InsertMergeBlock Method

Method|Introduced in 24.0
Namespace
TXTextControl.DocumentServer.DataSources
Package
TXTextControl.TextControl.Core.SDK as TXDocumentServer.Core.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TextControl.ASP.SDK as TXDocumentServer.dll

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);

Parameters

ParameterDescription
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.");