TX Text Control .NET Server

RemoveEmptyBlocks Property

Property|Introduced in 31.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

Specifies whether the content of empty merge blocks should be removed from the template or not. The default value is true.

Syntax

public bool RemoveEmptyBlocks { get; set; }

Examples

The following example uses MergeSettings.RemoveEmptyBlocks to configure remove empty blocks as part of the merge settings workflow. The configured value is checked before the workflow continues.

mergeSettings.RemoveEmptyBlocks = true;
if (mergeSettings.RemoveEmptyBlocks)
{
    Console.WriteLine("Merge Settings: Remove Empty Blocks is enabled.");
}