TX Text Control .NET for Windows Forms

Apply Method

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

Description

Stores the meta data (filters, sorting instructions and the block merging condition) in the SubTextPart which represents the block. Manipulating any of the aforementioned collections does not update the block automatically, so this method must be called to actually store changes. If a MergeBlockInfo instance is not based on an existing SubTextPart, this method throws an exception.

Syntax

public void Apply();

Examples

The following example applies the merge block info to the current content. The created object is then available to the surrounding document workflow.

mergeBlockInfo.Apply();
Console.WriteLine("Merge Block Info is ready for use.");

Remarks

This method does not update the children of a block recursively, so you have to call it for each altered child individually. If this method is called on a MergeBlockInfo instance that was not created from an existing SubTextPart, an exception is thrown.