Selected Text Drag and Drop
12 Jul 20221 minute to read
You can drag and drop the selected text in a paragraph by setting the AllowDragDrop property to true. By default, Dragging the selected text will perform a move operation, while dragging using the Ctrl key will perform a copy operation.
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Syntaxeditor_sample"
xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
x:Class="Syntaxeditor_sample.MainWindow"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Grid>
<syncfusion:EditControl Name="editControl" BorderThickness="1" AllowDragDrop="True" AllowDrop="True" EnableOutlining="False" DocumentLanguage="Custom" Text="Setting multi-line text from C# using Environment.NewLine." />
</Grid>
</Window>
editControl.AllowDragDrop = true;
editControl.AllowDrop = true;