2010-11-08 112 views
1

我正在使用允許拖動其行的數據網格。我的問題是,當我嘗試使用側滾動器上的鼠標在我的網格上向下滾動時,我得到'沒有進入'的標誌,這意味着「拖放不允許在這裏,夥計...」。我如何修改我的拖放功能以識別這不是拖放操作,而是滾動鼠標操作?WPF DataGrid - 無法使用鼠標滾動,因爲拖動下降

private new void MouseMove(object sender, MouseEventArgs e) 
    { 
     if (e.LeftButton == MouseButtonState.Pressed) 
     { 
      Point currentPosition = e.GetPosition(GridUC); 

      Object selectedItem = GridUC.SelectedItem; 

      if (selectedItem == null) return; 

      DragDropContainerObject ddObject = new DragDropContainerObject(typeof(Actor), selectedItem); 

      DataGridRow container = (DataGridRow)GridUC.ItemContainerGenerator.ContainerFromItem(selectedItem); 

      if (container != null) 
      { 
       DragDropEffects finalDropEffect = DragDrop.DoDragDrop(container, ddObject, DragDropEffects.Link); 
      } 
     } 

    } 
+0

請幫忙嗎? – OrPaz 2010-11-15 16:56:07

回答

-1

沒有一個答案......

我猜IM做的事情真的錯了這裏...

無論如何,我只是切換到使用Telerik的拖放功能,並從這個問題忘了...