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

TreeView Unwanted Drag&Drop Bug

1 Answer 16 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 1
Dan asked on 30 Mar 2010, 03:51 PM
If I catch SelectionChanged or PreviewSelectionChanged on the TreeView and in those methods, open a ChildWindow, when the ChildWindow is closed I find myself in the middle of a very much unwanted Drag and Drop. 

As a work around I've been checking to see if the Left mouse button is down in the PreviewDragStarted, but there seem to be some edge cases where that is not working  (haven't look too much into why not)

I've uploaded a sample: http://cid-59ff4ebecaa94076.skydrive.live.com/self.aspx/Public/UnWantedDragDrop.zip


Is there a better work around or fix?

1 Answer, 1 is accepted

Sort by
0
Valentin.Stoychev
Telerik team
answered on 02 Apr 2010, 01:52 PM
Hi Dan,

You can solve this scenario - this way:
private void RadTreeView_PreviewSelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
{
    TestChildWindow window = new TestChildWindow();
    window.Show();
    window.Closed += new EventHandler(window_Closed);
}
void window_Closed(object sender, EventArgs e)
{
    RadDragAndDropManager.CancelDrag();
}


Kind regards,
Valentin.Stoychev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
TreeView
Asked by
Dan
Top achievements
Rank 1
Answers by
Valentin.Stoychev
Telerik team
Share this question
or