Sure, you can share a GoUndoManager amongst multiple GoDocuments.
You need to override GoView.DoExternalDrop so that you can replace the standard copying behavior with the moving of objects from one document to another.
protected override IGoCollection DoExternalDrop(DragEventArgs evt) { IDataObject data = evt.Data; GoSelection sel = data.GetData(typeof(GoSelection)) as GoSelection; if (sel != null) { StartTransaction(); SizeF offset = GoTool.SubtractPoints(this.LastInput.DocPoint, sel.View.FirstInput.DocPoint); sel.View.DoCancelMouse(); this.Selection.Clear(); foreach (GoObject obj in sel.CopyArray()) { obj.Remove(); this.Document.Add(obj); this.Selection.Add(obj); } MoveSelection(this.Selection, offset, true); FinishTransaction("moved between docs"); return this.Selection; } return base.DoExternalDrop(evt); }
The only tricky point here is the cancellation of the drag in the source view.