예제 #1
0
        public static IDataObject GetDataObject(this IDragDropHandler dragDropHandler, IEnumerable <IEntryModel> entries)
        {
            var dragHelper = dragDropHandler.GetDragHelper(entries);

            if (dragHelper is ISupportShellDrag)
            {
                return((dragHelper as ISupportShellDrag).GetDataObject(entries.Cast <IDraggable>()));
            }
            else
            {
                return(new DataObject());
            }
        }
예제 #2
0
        public static void OnDragCompleted(this IDragDropHandler dragDropHandler,
                                           IEnumerable <IEntryModel> entries, IDataObject da, DragDropEffectsEx effect)
        {
            var dragHelper = dragDropHandler.GetDragHelper(entries);

            if (dragHelper is ISupportShellDrag)
            {
                (dragHelper as ISupportShellDrag).OnDragCompleted(entries.Cast <IDraggable>(), da, effect);
            }
            else
            {
                dragHelper.OnDragCompleted(entries.Cast <IDraggable>(), effect);
            }
        }
예제 #3
0
        public static DragDropEffectsEx QueryDrag(this IDragDropHandler dragDropHandler, IEnumerable <IEntryModel> ems)
        {
            var dragHelper = dragDropHandler.GetDragHelper(ems);

            return(dragHelper.QueryDrag(ems.Cast <IDraggable>()));
        }