55 references to DragDropHelper
System.Private.Windows.Core (3)
System\Private\Windows\Ole\Composition.ManagedToNativeAdapter.cs (3)
48
if (
DragDropHelper
<TRuntime, TDataFormat>.IsInDragLoop(_dataObject))
206
if (
DragDropHelper
<TRuntime, TDataFormat>.IsInDragLoopFormat(*pformatetc)
207
||
DragDropHelper
<TRuntime, TDataFormat>.IsInDragLoop(_dataObject))
System.Windows.Forms (24)
System\Windows\Forms\Control.cs (2)
4883
if (
DragDropHelper
.IsInDragLoop(dataObject))
4885
DragDropHelper
.SetInDragLoop(dataObject, inDragLoop: false);
System\Windows\Forms\Controls\RichTextBox\RichTextBox.OleCallback.cs (6)
160
DragDropHelper
.DragEnter(_owner.HWND, e);
170
DragDropHelper
.ClearDropDescription(_lastDataObject);
171
DragDropHelper
.Drop(e);
172
DragDropHelper
.DragLeave();
259
DragDropHelper
.DragOver(e);
292
DragDropHelper
.SetDropDescription(_lastDragEventArgs);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropTargetManager.cs (4)
202
DragDropHelper
.ClearDropDescription(((IDragEvent)e).DataObject);
203
DragDropHelper
.DragLeave();
226
DragDropHelper
.SetDropDescription(dragEnterArgs);
227
DragDropHelper
.DragEnter(toolStrip.HWND, dragEnterArgs);
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (2)
2202
if (
DragDropHelper
.IsInDragLoop(dataObject))
2204
DragDropHelper
.SetInDragLoop(dataObject, inDragLoop: false);
System\Windows\Forms\OLE\DropSource.cs (4)
28
DragDropHelper
.SetDragImage(_dataObject, _lastGiveFeedbackEventArgs);
91
DragDropHelper
.SetDragImage(_dataObject, e);
95
DragDropHelper
.DragEnter(lastHwndTarget, dataObject, ref point, (DROPEFFECT)e.Effect);
111
DragDropHelper
.DragLeave();
System\Windows\Forms\OLE\DropTarget.cs (6)
40
DragDropHelper
.ClearDropDescription(_lastDataObject);
124
DragDropHelper
.DragEnter(_hwndTarget, dragEvent);
151
DragDropHelper
.DragOver(dragEvent);
167
DragDropHelper
.DragLeave();
187
DragDropHelper
.Drop(dragEvent);
208
DragDropHelper
.SetDropDescription(_lastDragEventArgs);
System.Windows.Forms.Tests (28)
System\Windows\Forms\DragDropHelperTests.cs (28)
74
Assert.Throws<ArgumentNullException>(nameof(dataObject), () =>
DragDropHelper
.IsInDragLoop(dataObject));
81
Assert.Throws<ArgumentNullException>(nameof(dataObject), () =>
DragDropHelper
.IsInDragLoop(dataObject));
105
Assert.Equal(expectedIsInDragLoopFormat,
DragDropHelper
.IsInDragLoopFormat(Unsafe.As<FORMATETC, Com.FORMATETC>(ref formatEtc)));
114
DragDropHelper
.SetDragImage(dataObject, dragImage, cursorOffset, useDefaultDragImage);
131
DragDropHelper
.ReleaseDragDropFormats(dataObject);
141
DragDropHelper
.SetDragImage(dataObject, e);
158
DragDropHelper
.ReleaseDragDropFormats(dataObject);
167
Assert.Throws<InvalidOperationException>(() =>
DragDropHelper
.SetDragImage(new DataObject(), bitmap, new Point(0, 0), false));
176
() =>
DragDropHelper
.SetDragImage(dataObject, bitmap, new Point(0, 0), false));
183
Assert.Throws<ArgumentNullException>(nameof(e), () =>
DragDropHelper
.SetDragImage(new DataObject(), e));
211
DragDropHelper
.SetDropDescription(dragEvent);
212
DragDropHelper
.ClearDropDescription(dataObject);
227
DragDropHelper
.ReleaseDragDropFormats(dataObject);
237
() =>
DragDropHelper
.SetDropDescription(new DataObject(), (DROPIMAGETYPE)dropImageType, string.Empty, string.Empty));
246
DragDropHelper
.SetDropDescription(dataObject, (DROPIMAGETYPE)dropImageType, message, messageReplacementToken);
247
Assert.True(
DragDropHelper
.IsInDragLoop(dataObject));
251
DragDropHelper
.ReleaseDragDropFormats(dataObject);
259
Assert.Throws<ArgumentOutOfRangeException>(() =>
DragDropHelper
.SetDropDescription(dataObject, (DROPIMAGETYPE)dropImageType, message, messageReplacementToken));
267
() =>
DragDropHelper
.SetDropDescription(dataObject, (DROPIMAGETYPE)DropImageType.Invalid, string.Empty, string.Empty));
274
DragDropHelper
.SetDropDescription(dataObject, (DROPIMAGETYPE)dropImageType, message, messageReplacementToken);
275
DragDropHelper
.ReleaseDragDropFormats(dataObject);
294
DragDropHelper
.SetDropDescription(e);
310
DragDropHelper
.ReleaseDragDropFormats(dataObject);
321
DragDropHelper
.SetDropDescription(dataObject, (DROPIMAGETYPE)dropImageType, message, messageReplacementToken);
335
DragDropHelper
.ReleaseDragDropFormats(dataObject);
343
Assert.Throws<ArgumentNullException>(nameof(dataObject), () =>
DragDropHelper
.SetInDragLoop(dataObject, true));
352
DragDropHelper
.SetInDragLoop(dataObject, inDragLoop);
361
DragDropHelper
.ReleaseDragDropFormats(dataObject);