TX Text Control .NET Server

AllowDrop 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 accept data that the user drags onto it. This property allows the view generator to be a target for drop operations. To allow the view generator to be a source of a Drag&Drop operation the ServerVisualization.TextViewGenerator.AllowDrag property must be set to true.

Syntax

public bool AllowDrop { get; set; }

Examples

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

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

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