We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Drag and Drop a TreeViewItemAdv from a treeview onto a textbox

Thread ID:





95049 Jun 17,2010 01:52 PM UTC Jun 23,2010 06:29 PM UTC WPF 4
Tags: Tools
Administrator [Syncfusion]
Asked On June 17, 2010 01:52 PM UTC


I am trying to allow users to drop a tree node onto/into a TextBox. However, when I drag the node over the TextBox, the drop indicator changes into "can't be dropped" image and the DragEnter and DragOver events of the TextBox are not firing.

Is there anyway to allow tree nodes to have a drop target that is a TextBox?


David C [Syncfusion]
Replied On June 18, 2010 12:54 PM UTC

Hi Chad,

Thanks for your interest in syncfusion products.

We can Drag the TreeViewItemAdv into TextBox."PreviewDragEnter" event of the TextBox is the best choice for that. Here we have attached the small workaround sample which illustrates this scenario. We hope it will satisfy your needs.

Please let us know if you have any queries.

David C


Administrator [Syncfusion]
Replied On June 18, 2010 05:26 PM UTC

Thanks David,

This is very close to what I am looking for. There are two things:

1) From a visual perspective, when I drag the tree node onto the text box, the drap indicator changes to the "cannot drop" circle with a line through it. I tried setting the dragged node's AllowDrop to true in the text box's PreviewDragEnter, but the indicator remained "cannot drop".

2) Neither the PreviewDrop or the Drop event are firing for the text box.

Are there any workarounds to these two issues?


David C [Syncfusion]
Replied On June 21, 2010 01:59 PM UTC

Hi Chad,

Thanks for your update.

1. Change the "cannot drop indicator".
You can change the appearance of the Mouse cursor by using the DragDropEffects enum. The attached sample which illustrates in detail.
2. Neither the PreviewDrop or the Drop event are firing for the text box.
TexBox will fire the Drop event only when e.Handled is equal to true on DragOver. The sample attachment explains that clearly.

David C


Administrator [Syncfusion]
Replied On June 23, 2010 06:29 PM UTC



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon