/// <summary> /// Method called for every mouse move event in which drag-and-drop objects are dragged. /// Begins a drag-and-drop operation on the underlying tree control.</summary> /// <param name="items">Enumeration of items being dragged</param> protected override void OnStartDrag(IEnumerable <object> items) { List <object> convertedItems = new List <object>(); foreach (object item in items) { IPaletteClient client; if (m_objectClients.TryGetValue(item, out client)) { object convertedItem = client.Convert(item); if (convertedItem != null) { convertedItems.Add(convertedItem); } } } if (convertedItems.Count > 0) { TreeControl.DoDragDrop(convertedItems.ToArray(), DragDropEffects.All); } }
/// <summary> /// Called for every mouse move event in which drag-and-drop objects are being dragged. /// Begins a drag-and-drop operation on the underlying tree Control.</summary> /// <param name="items">Enumeration of items being dragged</param> protected override void OnStartDrag(IEnumerable <object> items) { IDataObject dataObject = m_prototypingContext.GetInstances(items); TreeControl.DoDragDrop(dataObject, DragDropEffects.All | DragDropEffects.Link); }