DropAction ExecuteBlocking()

robot_2Generated
code_blocksInput

Description

The ExecuteBlocking method in the Editor.Drag class is used to perform a drag-and-drop operation that blocks the current thread until the operation is complete. This method returns an Editor.DropAction which indicates the result of the drag-and-drop operation.

Usage

To use the ExecuteBlocking method, you need to have an instance of the Editor.Drag class. This method does not take any parameters and should be called when you want to perform a drag-and-drop operation that requires the current thread to wait for the operation to finish.

Ensure that the drag data is set up correctly using the Data property before calling this method. The method will return an Editor.DropAction which can be used to determine the outcome of the operation.

Example

// Create an instance of the Drag class
Editor.Drag dragOperation = new Editor.Drag();

// Set up the drag data
Editor.DragData dragData = new Editor.DragData();
dragOperation.Data = dragData;

// Execute the drag operation and block until it completes
Editor.DropAction result = dragOperation.ExecuteBlocking();

// Check the result of the drag operation
if (result == Editor.DropAction.Copy)
{
    // Handle the copy action
}
else if (result == Editor.DropAction.Move)
{
    // Handle the move action
}
else if (result == Editor.DropAction.None)
{
    // Handle the case where no action was taken
}