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

WPF TreeViewAdv: How to disable drop for specific TreeViewItemAdv

Thread ID:





116232 Apr 30,2014 05:25 AM UTC May 21,2014 08:27 AM UTC WPF 3
Tags: TreeViewAdv
Kevin Walsh
Asked On April 30, 2014 05:25 AM UTC

Please note - this question pertains to the WPF Tools TreeViewAdv control. The submission form for the forum doesn't work when trying to create a question with WPF as the platform!

I have a tree view control that allows dragging items for copies and moves within the same tree. Certain types of nodes within this tree cannot be drop targets for certain other types of nodes, so I would like to disallow drops during a drag. Typically, setting the Effects property to None in the DragEnter or DragOver event handler should provide the needed mouse cursor feedback indicating that the operation isn't allowed. However, nothing I've been able to do stops the tree view from completing the drag/drop. It always moves or copies the nodes even when I set the Effect to None.

I've set event handlers at both the TreeViewAdv control level and at the TreeItemAdv control level (through a style) but I can't seem to get the behavior I want.

How can I take deeper control of this capability? None of the samples provided do anything like this.

Can you provide some guidance on this please?



Muthukumar A [Syncfusion]
Replied On May 10, 2014 07:32 AM UTC

Hi Kevin Walsh,

We have created a sample which meets your requirement.Please find it from following location.
In this sample, we have cancelled the drop based on the Dragging item on DragEnter with appropriate DragDropEffects set.
Please let us know if you need further assistance.

Muhukumar A

Attachment: TreeviewItem_116232_5b686cdd.zip

Kevin Walsh
Replied On May 16, 2014 05:14 PM UTC

Thank you, Muhukumar, I will examine the sample and let you know. I appreciate your help.

Muthukumar A [Syncfusion]
Replied On May 21, 2014 08:27 AM UTC

Hi Kevin Walsh,

Thank you for your update
We will wait until we get further information from you.

Muthukumar A


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

or the page will be automatically redirected to 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