TX Text Control .NET for WPF

AllowDrop Property

Property|Introduced in 16.0
Namespace
TXTextControl.WPF
Package
TXTextControl.TextControl.WPF.SDK as TXTextControl.WPF.dll from the private NuGet feed or Text Control Offline Packages

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 property must be set to true. The DropFormats property determines which formats the control accepts automatically.

Syntax

public bool AllowDrop { get; set; }

Examples

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

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