# MergeBlockSettings Constructor

> Initializes a new instance of the MergeBlockSettings class.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Constructor
- **Introduced:** 24.0
- **Namespace:** `TXTextControl.DocumentServer.DataSources`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXDocumentServer.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXDocumentServer.dll` from the setup
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl.DocumentServer.DataSources > MergeBlockSettings Constructor
- **1446 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datasources/mergeblocksettings/constructor/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datasources/mergeblocksettings/constructor/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datasources/mergeblocksettings/constructor/llms-full.txt

---

### Description

Initializes a new instance of the MergeBlockSettings class.

### Syntax

#### MergeBlockSettings()

Initializes a new instance of the MergeBlockSettings class.

```csharp
public MergeBlockSettings();
```

```vbnet
Public Sub New()
```

#### MergeBlockSettings(BlockTemplateType)

Initializes a new instance of the MergeBlockSettings class.

```csharp
public MergeBlockSettings(BlockTemplateType blockTemplateType);
```

```vbnet
Public Sub New(blockTemplateType As BlockTemplateType)
```

| Parameter | Description |
|---|---|
| blockTemplateType | A value of type [BlockTemplateType](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datasources/blocktemplatetype/enumeration/llms-full.txt) specifying the block type. (paragraph or table row based) |

#### MergeBlockSettings(BlockTemplateType, bool)

Initializes a new instance of the MergeBlockSettings class.

```csharp
public MergeBlockSettings(BlockTemplateType blockTemplateType, bool createHeaderRow);
```

```vbnet
Public Sub New(blockTemplateType As BlockTemplateType, createHeaderRow As Boolean)
```

| Parameter | Description |
|---|---|
| blockTemplateType | A value of type [BlockTemplateType](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datasources/blocktemplatetype/enumeration/llms-full.txt) specifying the block type. (paragraph or table row based) |
| createHeaderRow | If parameter blockTemplateType is set to `BlockTemplateType.TableRow` and this parameter is set to `true`, a table header row is automatically generated. |

#### MergeBlockSettings(BlockTemplateType, bool, Color, FieldDisplayMode)

Initializes a new instance of the MergeBlockSettings class.

```csharp
public MergeBlockSettings(BlockTemplateType blockTemplateType, bool createHeaderRow, Color highlightColor, FieldDisplayMode fieldDisplayMode);
```

```vbnet
Public Sub New(blockTemplateType As BlockTemplateType, createHeaderRow As Boolean, highlightColor As Color, fieldDisplayMode As FieldDisplayMode)
```

| Parameter | Description |
|---|---|
| blockTemplateType | A value of type [BlockTemplateType](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datasources/blocktemplatetype/enumeration/llms-full.txt) specifying the block type. (paragraph or table row based) |
| createHeaderRow | If parameter blockTemplateType is set to `BlockTemplateType.TableRow` and this parameter is set to `true`, a table header row is automatically generated. |
| highlightColor | The color the merge block is highlighted with if the input position is inside the block boundaries. |
| fieldDisplayMode | A value of type [FieldDisplayMode](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datasources/fielddisplaymode/enumeration/llms-full.txt) which specifies if field text or field codes are shown. |

#### MergeBlockSettings(BlockTemplateType, bool, short)

```csharp
public MergeBlockSettings(BlockTemplateType blockTemplateType, bool createHeaderRow, short tableID);
```

```vbnet
Public Sub New(blockTemplateType As BlockTemplateType, createHeaderRow As Boolean, tableID As Short)
```

### Examples

The following example creates a Merge Block Settings instance and configures its block template type setting for a document workflow.

```csharp
TXTextControl.DocumentServer.DataSources.MergeBlockSettings mergeBlockSettings = new();
mergeBlockSettings.BlockTemplateType = TXTextControl.DocumentServer.DataSources.BlockTemplateType.TableRow;
```

```vbnet
Dim mergeBlockSettings As New TXTextControl.DocumentServer.DataSources.MergeBlockSettings()
mergeBlockSettings.BlockTemplateType = TXTextControl.DocumentServer.DataSources.BlockTemplateType.TableRow
```

---

## Nearby

- **Previous:** [MergeBlockSettings.BlockTemplateType Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datasources/mergeblocksettings/blocktemplatetype-property/llms-full.txt)
- **Next:** [MergeBlockSettings.CreatedTable Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datasources/mergeblocksettings/createdtable-property/llms-full.txt)
