public static IScriptCommand StartShellDrag(string iShellDragVariable = "{DragDrop.SupportDrag}", IScriptCommand nextCommand = null) { return //If CanDrag (ItemUnderMouse is selected), Check and set IsDraggingProperty to true. (ScriptCommands.SetPropertyValue(iShellDragVariable, (ISupportDrag d) => d.IsDraggingFrom, true, HubScriptCommands.AssignDragMethod(QueryDrag.DragMethodKey, //Initialize shell based drag drop HubScriptCommands.QueryDrag(iShellDragVariable, "{DragResult}", //Reset IsDragging property. ScriptCommands.SetPropertyValue(iShellDragVariable, (ISupportDrag d) => d.IsDraggingFrom, false, //Reset IShellDrag variable. ScriptCommands.Assign(iShellDragVariable, null, false, nextCommand)))))); }