TX Text Control .NET Server

AllowDrag Property

Property|Introduced in 24.0
Namespace
TXTextControl.ServerVisualisation
Package
TXTextControl.TextControl.Core.SDK as TXTextControl.Server.Core.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TextControl.ASP.SDK as TXTextControl.Server.dll

Description

Gets or sets a value indicating whether the view generator can be a source of a Drag&Drop operation. To allow the view generator to accept data, the ServerVisualization.TextViewGenerator.AllowDrop property must be set to true.

Syntax

public bool AllowDrag { get; set; }

Examples

The following example applies bold formatting through the text view generator's selection by using TextViewGenerator.AllowDrag.

Selection formattedSelection = textViewGenerator.Selection;
formattedSelection.Bold = true;
textViewGenerator.Selection = formattedSelection;

textViewGenerator.AllowDrag = true;
if (textViewGenerator.AllowDrag)
{
    Console.WriteLine("Text View Generator: Allow Drag is enabled.");
}