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.
Unfortunately, activation email could not send to your email. Please try again.

WPF TreeViewAdv: How to disable drop for specific TreeViewItemAdv

Thread ID:

Created:

Updated:

Platform:

Replies:

116232 Apr 30,2014 01:25 AM May 21,2014 04:27 AM WPF 3
loading
Tags: TreeViewAdv
Kevin Walsh
Asked On April 30, 2014 01:25 AM

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?

Thanks,

Kevin


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

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.

Regards,
Muhukumar A

Attachment: TreeviewItem_116232_5b686cdd.zip

Kevin Walsh
Replied On May 16, 2014 01:14 PM

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

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

Hi Kevin Walsh,

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

Regards,
Muthukumar A

CONFIRMATION

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.

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.

;