# TextControl.AllowDrop Property

> Inherited from System.Windows.UIElement. Gets or sets a value indicating whether the control can accept data that the user drags onto it. This property allows the control to be a target for drop operations. To allow the control to be a source of a Drag&Drop operation the AllowDrag property must be set to true. The DropFormats property determines which formats the control accepts automatically.

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

---

### Description

Inherited from System.Windows.UIElement. Gets or sets a value indicating whether the control can accept data that the user drags onto it. This property allows the control to be a target for drop operations. To allow the control to be a source of a Drag&Drop operation the [AllowDrag](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/allowdrag-property/llms-full.txt) property must be set to true. The [DropFormats](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/dropformats-property/llms-full.txt) property determines which formats the control accepts automatically.

### Syntax

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

```vbnet
Public Property AllowDrop() As Boolean
```

### Examples

The following example uses `TextControl.AllowDrop` to enable drag-and-drop editing. The configured value is checked before the workflow continues.

```csharp
textControl.AllowDrop = true;
if (textControl.AllowDrop)
{
    Console.WriteLine("Text Control: Allow Drop is enabled.");
}
```

```vbnet
textControl.AllowDrop = True
If textControl.AllowDrop Then
    Console.WriteLine("Text Control: Allow Drop is enabled.")
End If
```

---

## Nearby

- **Previous:** [TextControl.AllowDrag Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/allowdrag-property/llms-full.txt)
- **Next:** [TextControl.Append Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/append-method/llms-full.txt)
