0

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?

1 Answer 1

1

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>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.