# TextControl.Replace Method

> Opens the built-in Replace dialog box.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Method
- **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.Replace Method
- **230 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/replace-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/replace-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/replace-method/llms-full.txt

---

### Description

Opens the built-in Replace dialog box.

### Syntax

```csharp
public void Replace();
```

```vbnet
Public Sub Replace()
```

### Examples

The following example replaces matching document text. The created object is then available to the surrounding document workflow.

```csharp
textControl.Replace();
Console.WriteLine("Text Control is ready for use.");
```

```vbnet
textControl.Replace()
Console.WriteLine("Text Control is ready for use.")
```

---

## Nearby

- **Previous:** [TextControl.RedoActionName Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/redoactionname-property/llms-full.txt)
- **Next:** [TextControl.ResetContents Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/resetcontents-method/llms-full.txt)
