AllowDrop Property
- Namespace
TXTextControl.ServerVisualisation
- Package
TXTextControl.asTextControl. Core. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesServer. Core. dll
- Also in
TXTextControl.asTextControl. ASP. SDK 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; }Public Property AllowDrop As BooleanExamples
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.");
}Dim formattedSelection As Selection = textViewGenerator.Selection
formattedSelection.Bold = True
textViewGenerator.Selection = formattedSelection
textViewGenerator.AllowDrop = True
If textViewGenerator.AllowDrop Then
Console.WriteLine("Text View Generator: Allow Drop is enabled.")
End If