Hi I have a xamDataGrid which i got drag and drop enabled so the user can reorder the rows. But the problem is that if i resize the data grid so that horizontal or vertical scrollbar appears, and if i have a record row selected in the grid, when i drag the scroll bar the mouse move will also trigger the reordering.
How can i disable the drag and drop behavior if I just want to drag the scroll bar?
Or is there a way to determine that the mouse click is on the scroll bar? thanks.
When you start dragging you can check the e.OriginalSource or its visual ancestors and see if you have clicked on a scrollbar or not.
e.OriginalSource is detecting the scroll bar. That works fine.
I have another issue though. the datagrid header is also invoking the drag and drop and the e.OriginalSource seems cannot differentiate the header drag and the content drag. Any ideas? Thanks.