WPF DataGrid - 无法使用鼠标滚动,因为拖动下降
问题描述:
我正在使用允许拖动其行的数据网格。我的问题是,当我尝试使用侧滚动器上的鼠标在我的网格上向下滚动时,我得到'没有进入'的标志,这意味着“拖放不允许在这里,伙计...”。我如何修改我的拖放功能以识别这不是拖放操作,而是滚动鼠标操作?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);
}
}
}
答
没有一个答案......
我猜IM做的事情真的错了这里...
无论如何,我只是切换到使用Telerik的拖放功能,并从这个问题忘了...
请帮忙吗? – OrPaz 2010-11-15 16:56:07