# TextControl.AllowDrag Property

> Gets or sets a value indicating whether the control can be a source of a Drag&Drop operation. To allow the control to accept data that the user drags onto it, the TextControl.AllowDrop property must be set to true.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 15.1
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXTextControl.Windows.Forms.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.Windows.Forms.dll` from the setup
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl > TextControl.AllowDrag Property
- **302 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/allowdrag-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/allowdrag-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/allowdrag-property/llms-full.txt

---

### Description

Gets or sets a value indicating whether the control can be a source of a Drag&Drop operation. To allow the control to accept data that the user drags onto it, the [TextControl.AllowDrop](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/allowdrop-property/llms-full.txt) property must be set to true.

### Syntax

```csharp
public bool AllowDrag { get; set; }
```

```vbnet
Public Property AllowDrag As Boolean
```

### Examples

The following example uses `TextControl.AllowDrag` to enable drag-and-drop editing. The change is then applied to the active document or user interface.

```csharp
textControl.AllowDrag = true;
textControl.Update();
```

```vbnet
textControl.AllowDrag = True
textControl.Update()
```

---

## Nearby

- **Previous:** [TextControl.AddSymbolDialog Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/addsymboldialog-method/llms-full.txt)
- **Next:** [TextControl.AllowDrop Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/allowdrop-property/llms-full.txt)
