# DialogButton Constructor

> Initializes a new instance of the DialogButton class.

- **Product:** TX Spell .NET for WPF
- **Section:** Reference
- **Kind:** Constructor
- **Introduced:** 3.0
- **Namespace:** `TXTextControl.WPF.Proofing`
- **Package:** `TXTextControl.TXSpell.WPF.SDK` (assembly `TXSpell.WPF.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXSpell.WPF.dll` from the setup
- **Path:** TX Spell .NET for WPF > Reference > TXTextControl.WPF.Proofing > DialogButton Constructor
- **411 words**
- **Web URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/dialogbutton/constructor/
- **LLMs URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/dialogbutton/constructor/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/dialogbutton/constructor/llms-full.txt

---

### Description

Initializes a new instance of the DialogButton class.

### Syntax

```csharp
public DialogButton(TXSpell.ButtonType type);
```

```vbnet
Public Sub New(type As TXSpell.ButtonType)
```

### Parameters

| Parameter | Description |
|---|---|
| type | Specifies one of the [ButtonType](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/txspell-buttontype/enumeration/llms-full.txt) values. |

### Examples

The following example creates a Dialog Button instance and configures its enabled setting for a document workflow.

```csharp
TXTextControl.WPF.Proofing.DialogButton dialogButton = new(TXTextControl.Proofing.TXSpell.ButtonType.AddToDictionary);
dialogButton.Enabled = true;
```

```vbnet
Dim dialogButton As New TXTextControl.WPF.Proofing.DialogButton(TXTextControl.Proofing.TXSpell.ButtonType.AddToDictionary)
dialogButton.Enabled = True
```

---

## Nearby

- **Previous:** [DialogButton Class](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/dialogbutton/llms-full.txt)
- **Next:** [DialogButton.Enabled Property](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/dialogbutton/enabled-property/llms-full.txt)
