Handling the cursor when moving the files using drag drop

0
0

When dragging a file or files if the location is valid example folder the cursor should be changed to move and if not it should show block cursor. This is my code in DragOver event but the cursor is not taking effect.

if (IsValidDropTarget(targetItem))
{
e.Effect = DragDropEffects.Move;
this.Cursor = Cursors.Arrow;
string folderName = GetCleanFolderName(targetItem[“CloudFileName”]?.ToString());
DragVisualHelper.UpdateFloatingLabelWithColor($”Drop into {folderName}”, Color.Brown);
}
else
{
DragVisualHelper.UpdateFloatingLabelWithColor(dragText, Color.AliceBlue);
}

 

  • Ravi Keshwani
    e.Effect = DragDropEffects.Move; this.Cursor = Cursors.Arrow; This code wittent in the DragOver event is not taking effect .. and it always shows not allowed cursor icon when moving the file to folder
  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.