InsertMergeBlockDialog Class
- Namespace
TXTextControl.DocumentServer. Windows. Forms
- Package
TXTextControl.from the private NuGet feed or Text Control Offline PackagesTextControl. WinForms. SDK
- Assembly
TXDocumentServer.Windows. Forms. dll
- Install
dotnet add package TXTextControl..NET 8 and later. For .NET Framework, referenceTextControl. WinForms. SDK TXDocumentServer.from the setup.Windows. Forms. dll
- Inherits
- Form
- HighDpiForm
- Insert
Merge Block Dialog
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 : HighDpiFormPublic Class InsertMergeBlockDialog
Inherits HighDpiFormExamples
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();
}Dim dataSourceManager As New TXTextControl.DocumentServer.DataSources.DataSourceManager()
dataSourceManager.LoadJson("[{""CustomerName"":""Contoso Ltd.""}]")
Dim tableInfo As TXTextControl.DocumentServer.DataSources.DataTableInfo = dataSourceManager.MasterDataTableInfo
Using dialog As New TXTextControl.DocumentServer.Windows.Forms.InsertMergeBlockDialog(dataSourceManager, textControl, tableInfo)
If dataSourceManager.IsMergingPossible Then dialog.ShowDialog()
End UsingMembers
Constructors
| Constructor | Description |
|---|---|
| InsertMergeBlockDialog | Creates a InsertMergeBlockDialog object for the specified DocumentServer.DataSources.DataSourceManager. |
Properties
| Property | Description |
|---|---|
| AddResult | Returns whether the new block has successfully been inserted. |
| AddTableHeaderRow | Indicates 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. |
| BlockType | Indicates the type of the merge block to be created. |
| CreatedTable | Returns the newly created TXTextControl.Table if the merge block was inserted as a table row. |
| HighlightColor | Returns the selected highlight color to be used for the sub text part representing the merge block. |
| MergeBlockInfo | Returns a MergeBlockInfo object describing the merge block to be inserted. |
Methods
| Method | Description |
|---|---|
| Show | Not described in the reference. public void Show(IWin32Window owner); |
| ShowDialog | Not described in the reference. public System.Windows.Forms.DialogResult ShowDialog(); |