This is a migrated thread and some comments may be shown as answers.

Prevent DragDrop Placement

1 Answer 42 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 12 Nov 2012, 11:24 PM
Hi,

How do I prevent the user from dragging content such as text and images and relocating it to a different location in the document?

Thanks,

Rob

1 Answer, 1 is accepted

Sort by
0
Accepted
Petya
Telerik team
answered on 14 Nov 2012, 02:05 PM
Hi Rob,

The behavior you want to achieve can be done by canceling the MoveSelectionCommand in the event handler of CommandExecuting.
void editor_CommandExecuting(object sender, CommandExecutingEventArgs e)
{
    if (e.Command is MoveSelectionCommand)
    {
        e.Cancel = true;
    }
}

I hope this helps! Feel free to contact us if you need additional assistance.
 
All the best,
Petya
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
RichTextBox
Asked by
Robert
Top achievements
Rank 1
Answers by
Petya
Telerik team
Share this question
or