Skip to content

Commit

Permalink
Merge pull request #100 from punker76/83-dragdrop-mouse-release-issue
Browse files Browse the repository at this point in the history
do nothing if mouse left button is released
  • Loading branch information
punker76 committed May 28, 2014
2 parents 5a67d8a + d62acba commit eb46441
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions GongSolutions.Wpf.DragDrop/DragDrop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,14 @@ private static void DragSource_PreviewMouseLeftButtonUp(object sender, MouseButt
private static void DragSource_PreviewMouseMove(object sender, MouseEventArgs e)
{
if (m_DragInfo != null && !m_DragInProgress) {

// do nothing if mouse left button is released
if (e.LeftButton == MouseButtonState.Released)
{
m_DragInfo = null;
return;
}

var dragStart = m_DragInfo.DragStartPosition;
var position = e.GetPosition((IInputElement)sender);

Expand Down

0 comments on commit eb46441

Please sign in to comment.