I have a ListView with DragDrop enabled and some MouseHandlers and a GridView inside:
<ListView AllowDrop="True"
DragEnter="OnDragEnter"
Drop="OnDrop"
ItemsSource="{Binding ...}"
SelectedItem="{Binding ...}"
PreviewMouseRightButtonDown="OnPreviewMouseRightButtonDown"
PreviewMouseRightButtonUp="OnPreviewMouseRightButtonUp"
PreviewMouseLeftButtonUp="OnPreviewMouseLeftButtonUp"
PreviewMouseLeftButtonDown="OnPreviewMouseLeftButtonDown"
MouseMove="OnMouseMove">
<ListView.View>
<GridView>
...
</GridView>
</ListView>
The ScrollBar of the ListView is visible.
When no item is selected in the listview, everthing works fine.
When an item is selected, i notice this behavior:
I click the scrollbar, when the mouse cursor stays inside the bar, everthing is ok, but when it leaves the bar while the mouse button is still pressed,
the scrollbar loses focus and the drag/drop operation which is implemented in MouseMove Handler is executed.
I do not know why the scrollbar loses focus, has anyone an idea?