有谁知道如何在两个不同的wpf窗口之间进行拖放? 在Window1中检测拖动动作,
void textBoxName_IsMouseCapturedChanged(object sender, DependencyPropertyChangedEventArgs e)
{
if ((bool)e.NewValue == false)
return;
DataObject dataObj = null;
DragDropInAction = true;
TextBox tB = (TextBox)sender;
int Itemrow = -1;
if (tB != null)
{
Itemrow = Grid.GetRow(tB);
}
dataObj = new DataObject(Itemrow);
DragDrop.DoDragDrop(tB, dataObj, DragDropEffects.Move);
DragDropInAction = false;
}
但我不知道如何在其他窗口中进行放置操作
答案 0 :(得分:0)
根据此链接:WPF Drag and Drop between two window