# TextControl Constructor

> Initializes a new instance of the WPF.TextControl class.

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

---

### Description

Initializes a new instance of the WPF.TextControl class.

### Syntax

```csharp
public TextControl();
```

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

### Examples

The following example creates a WPF editor and places it in a window.

```csharp
System.Windows.Window window = new();
TXTextControl.WPF.TextControl textControl = new();
window.Content = textControl;
```

```vbnet
Dim window As New System.Windows.Window()
Dim textControl As New TXTextControl.WPF.TextControl()
window.Content = textControl
```

---

## Nearby

- **Previous:** [TextControl.ConditionalInstructionDialog Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/conditionalinstructiondialog-method/llms-full.txt)
- **Next:** [TextControl.ContentsReset Event](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/contentsreset-event/llms-full.txt)
