/// <summary> /// Called when a IDragDropSource is dropped on the IDragDropTarget (in any defined drop zone {see 'GetDropZones() method'}) /// </summary> /// <param name="dropZone">The dropzone object that the IDragDropSource dropped into</param> /// <param name="dropData">The data associated with the IDragDropSource.DragDropData. Usually the IDragDropSource object itself.</param> public virtual void OnDrop(DropZoneBase dropZone, object dropData) { }
/// <summary> /// Called when a IDragDropSource is dropped on the IDragDropTarget (in any defined drop zone {see 'GetDropZones() method'}) /// </summary> /// <param name="dropZone">The dropzone object that the IDragDropSource dropped into</param> /// <param name="dropData">The data associated with the IDragDropSource.DragDropData. Usually the IDragDropSource object itself.</param> public override void OnDrop(DropZoneBase dropZone, object dropData) { var wb = dropData as WindowBase; if (wb == null) return; //invalid drop data; ignore //split if (dropZone is EdgeDockingDropZone && ((EdgeDockingDropZone)dropZone).DropZoneAction == "split") { var dz = dropZone as EdgeDockingDropZone; Split(wb, dz); } else if (dropZone is InsertingDropZone) { var dz = dropZone as InsertingDropZone; Insert(wb, dz); } else if (dropZone is EdgeDockingDropZone && ((EdgeDockingDropZone)dropZone).DropZoneAction.StartsWith("splitcell")) { var dz = dropZone as EdgeDockingDropZone; SplitCell(wb, dz); } else if (dropZone is EdgeDockingDropZone && ((EdgeDockingDropZone)dropZone).DropZoneAction.StartsWith("firstlast")) { var dz = dropZone as EdgeDockingDropZone; var ps = dz.DropZoneAction.Split(','); if (ps.Length == 2) { dz.DropZoneAction = ps[1]; //replace the id with the second parameter, which is the index where we want to insert or add if (dz.DropZoneAction == "0") Insert(wb, dz); else AddChild(wb); } } base.OnDrop(dropZone, dropData); }
/// <summary> /// Provides a hook for when an IDragDropSource enters a dropzone associated with this IDragDropTarget /// </summary> /// <param name="dropZone"></param> public virtual void OnDragDropEnter(DropZoneBase dropZone) { }
/// <summary> /// Called when a IDragDropSource is dropped on the IDragDropTarget (in any defined drop zone {see 'GetDropZones() method'}) /// </summary> /// <param name="dropZone">The dropzone object that the IDragDropSource dropped into</param> /// <param name="dropData">The data associated with the IDragDropSource.DragDropData. Usually the IDragDropSource object itself.</param> public override void OnDrop(DropZoneBase dropZone, object dropData) { var win = dropData as LUCATabWindow; if (win != null && dropZone is UpperHighlightingDropZone) { win.ContainerContext.RemoveChild(win); win.MoveItems(this); } base.OnDrop(dropZone, dropData); }