# TextControl.Paste Method

> Replaces the current selection in the Text Control with the contents of the Clipboard.

- **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.Paste Method
- **607 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/paste-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/paste-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/paste-method/llms-full.txt

---

### Description

Replaces the current selection in the Text Control with the contents of the Clipboard.

### Syntax

#### Paste()

Replaces the current selection in the Text Control with the contents of the Clipboard. If the data in the clipboard are provided in several formats, the format with the maximum of information is used.

```csharp
public void Paste();
```

```vbnet
Public Sub Paste()
```

#### Paste(ClipboardFormat)

Replaces the current selection in the Text Control with the contents of the Clipboard. Only data provided in the specified format is inserted.

```csharp
public void Paste(ClipboardFormat format);
```

```vbnet
Public Sub Paste(format As ClipboardFormat)
```

| Parameter | Description |
|---|---|
| format | Specifies the format to paste. It must be one of the [ClipboardFormat](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/clipboardformat/enumeration/llms-full.txt) values contained in the array returned through the [GetClipboardFormats](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/getclipboardformats-method/llms-full.txt) method. This parameter can be used to change the default behaviour, if the clipboard contains the data in more than one format. By default, TXTextControl inserts data from the clipboard in the following order: textframe, formatted image, formatted text (TXTextControl format), formatted text (RTF format), formatted text (HTML format), plain text, image. |

### Examples

The following example pastes compatible clipboard content at the input position. The created object is then available to the surrounding document workflow.

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

```vbnet
textControl.Paste(ClipboardFormat.TXTextControlFormat)
Console.WriteLine("Text Control is ready for use.")
```

---

## Nearby

- **Previous:** [TextControl.ParagraphStyles Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/paragraphstyles-property/llms-full.txt)
- **Next:** [TextControl.PermanentControlChars Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/permanentcontrolchars-property/llms-full.txt)
