TX Text Control .NET for Windows Forms

InsertMergeBlockDialog Class

Class|Introduced in 24.0
Namespace
TXTextControl.DocumentServer.Windows.Forms
Package
TXTextControl.TextControl.WinForms.SDK from the private NuGet feed or Text Control Offline Packages
Assembly
TXDocumentServer.Windows.Forms.dll
Install
dotnet add package TXTextControl.TextControl.WinForms.SDK .NET 8 and later. For .NET Framework, reference TXDocumentServer.Windows.Forms.dll from the setup.
Inherits
  1. Form
  2. HighDpiForm
  3. InsertMergeBlockDialog

Description

The InsertMergeBlockDialog class allows the user to design and insert a merge block based on the currently selected master table. It is inserted at the current input position of a given Text Control instance. The InsertMergeBlockDialog is a modal dialog box which must be shown with the InsertMergeBlockDialog.ShowDialog method.

Syntax

public class InsertMergeBlockDialog : HighDpiForm

Examples

The following example loads a small customer data source, selects its master table, and opens the merge-block dialog only when merging is available.

TXTextControl.DocumentServer.DataSources.DataSourceManager dataSourceManager = new();
dataSourceManager.LoadJson("[{\"CustomerName\":\"Contoso Ltd.\"}]");
TXTextControl.DocumentServer.DataSources.DataTableInfo tableInfo = dataSourceManager.MasterDataTableInfo;
using TXTextControl.DocumentServer.Windows.Forms.InsertMergeBlockDialog dialog = new(dataSourceManager, textControl, tableInfo);
if (dataSourceManager.IsMergingPossible)
{
    dialog.ShowDialog();
}

Members

Constructors

ConstructorDescription
InsertMergeBlockDialogCreates a InsertMergeBlockDialog object for the specified DocumentServer.DataSources.DataSourceManager.

Properties

PropertyDescription
AddResultReturns whether the new block has successfully been inserted.
AddTableHeaderRowIndicates whether a separate header row has to be added to the table containing the repeating merge block. In case of a paragraph based merge block the value of this property can be ignored.
BlockTypeIndicates the type of the merge block to be created.
CreatedTableReturns the newly created TXTextControl.Table if the merge block was inserted as a table row.
HighlightColorReturns the selected highlight color to be used for the sub text part representing the merge block.
MergeBlockInfoReturns a MergeBlockInfo object describing the merge block to be inserted.

Methods

MethodDescription
ShowNot described in the reference. public void Show(IWin32Window owner);
ShowDialogNot described in the reference. public System.Windows.Forms.DialogResult ShowDialog();