I'm trying to implement drag/drop in my TreeView and have it all working except once the scroll bar appears inside the TreeView. When the user attempts to scroll the bar by dragging it up or down PreviewMouseMove naturally gets fired. However, I cannot figure out a way to recognize that the mouse is over the scrollbar and not initiate the beginning of a drag/drop. Any ideas?
A:
Instead of linking to the previewmousemove on the treeview for starting the drag/drop, maybe you can link to the previewmousemove of the treeview item.
Sort of like this:
<TreeView>
<TreeView.ItemTemplate>
<HierarchicalDataTemplate>
<TextBlock PreviewMouseMove="TextBlock_PreviewMouseMove"/>
</HierarchicalDataTemplate>
</TreeView.ItemTemplate>
</TreeView>
Mark Synowiec
2010-05-04 16:48:02