示例#1
0
        public DragOperation(Window window, IDragDropExtension?extension, CoreDragInfo info, ICoreDropOperationTarget?target = null)
        {
            _extension = extension;
            Info       = info;

            _target       = target ?? new DropUITarget(window);       // The DropUITarget must be re-created for each drag operation! (Caching of the drag ui-override)
            _view         = new DragView(info.DragUI as DragUI);
            _viewHandle   = window.OpenDragAndDrop(_view);
            _viewOverride = new CoreDragUIOverride();             // UWP does re-use the same instance for each update on _target
        }
示例#2
0
 public void SetTarget(ICoreDropOperationTarget target)
 => Target = target;