<PackageReference Include="System.Drawing.Common" Version="10.0.0-preview.3.25173.2" />

DragDropHelper<TOleServices, TDataFormat>

static class DragDropHelper<TOleServices, TDataFormat> where TOleServices : IOleServices where TDataFormat : IDataFormat<TDataFormat>
Helper class for drop targets to display the drag image while the cursor is over the target window and allows the application to specify the drag image bitmap that will be displayed during a drag-and-drop operation.
public static void ClearDropDescription(IComVisibleDataObject dataObject)

Sets the drop object image and accompanying text back to the default.

public static void DragEnter(HWND targetWindowHandle, IDragEvent e)

Notifies the drag-image manager that the drop target has been entered, and provides it with the information needed to display the drag image.

public static void DragEnter(HWND targetWindowHandle, IComVisibleDataObject dataObject, ref Point point, DROPEFFECT effect)

Notifies the drag-image manager that the drop target has been entered, and provides it with the information needed to display the drag image.

public static void DragLeave()

Notifies the drag-image manager that the cursor has left the drop target.

public static void DragOver(IDragEvent e)

Notifies the drag-image manager that the cursor position has changed and provides it with the information needed to display the drag image.

public static void Drop(IDragEvent e)

Notifies the drag-image manager that the object has been dropped, and provides it with the information needed to display the drag image.

public static bool IsInDragLoop(IDataObjectInternal dataObject)

Determines whether the data object is in a drag loop.

public static bool IsInDragLoopFormat(FORMATETC format)

Determines whether the specified format is a drag loop format.

public static void ReleaseDragDropFormats(IComVisibleDataObject dataObject)

Releases formats used by the drag-and-drop helper.

public static void SetDragImage(IComVisibleDataObject dataObject, IGiveFeedbackEvent e)

Initializes the drag-image manager and sets the drag image bitmap into a data object.

public static void SetDragImage(IComVisibleDataObject dataObject, IBitmap dragImage, Point cursorOffset, bool usingDefaultDragImage)

Initializes the drag-image manager and sets the drag image bitmap into a data object.

public static void SetDropDescription(IDragEvent e)

Sets the drop description into a data object. Describes the image and accompanying text for a drop object.

public static void SetDropDescription(IComVisibleDataObject dataObject, DROPIMAGETYPE dropImageType, string message, string messageReplacementToken)

Sets the drop description into a data object. Describes the image and accompanying text for a drop object.

public static void SetInDragLoop(IComVisibleDataObject dataObject, bool inDragLoop)

Sets the InDragLoop format into a data object.