55 references to DragDropHelper
System.Private.Windows.Core (3)
System\Private\Windows\Ole\Composition.ManagedToNativeAdapter.cs (3)
48
if (
DragDropHelper
<TOleServices, TDataFormat>.IsInDragLoop(_dataObject))
206
if (
DragDropHelper
<TOleServices, TDataFormat>.IsInDragLoopFormat(*pformatetc)
207
||
DragDropHelper
<TOleServices, 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)
165
DragDropHelper
.DragEnter(_owner.HWND, e);
175
DragDropHelper
.ClearDropDescription(_lastDataObject);
176
DragDropHelper
.Drop(e);
177
DragDropHelper
.DragLeave();
264
DragDropHelper
.DragOver(e);
297
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)
76
Assert.Throws<ArgumentNullException>(nameof(dataObject), () =>
DragDropHelper
.IsInDragLoop(dataObject));
83
Assert.Throws<ArgumentNullException>(nameof(dataObject), () =>
DragDropHelper
.IsInDragLoop(dataObject));
107
Assert.Equal(expectedIsInDragLoopFormat,
DragDropHelper
.IsInDragLoopFormat(Unsafe.As<FORMATETC, Com.FORMATETC>(ref formatEtc)));
116
DragDropHelper
.SetDragImage(dataObject, dragImage, cursorOffset, useDefaultDragImage);
133
DragDropHelper
.ReleaseDragDropFormats(dataObject);
143
DragDropHelper
.SetDragImage(dataObject, e);
160
DragDropHelper
.ReleaseDragDropFormats(dataObject);
169
Assert.Throws<InvalidOperationException>(() =>
DragDropHelper
.SetDragImage(new DataObject(), bitmap, new Point(0, 0), false));
178
() =>
DragDropHelper
.SetDragImage(dataObject, bitmap, new Point(0, 0), false));
185
Assert.Throws<ArgumentNullException>(nameof(e), () =>
DragDropHelper
.SetDragImage(new DataObject(), e));
213
DragDropHelper
.SetDropDescription(dragEvent);
214
DragDropHelper
.ClearDropDescription(dataObject);
229
DragDropHelper
.ReleaseDragDropFormats(dataObject);
239
() =>
DragDropHelper
.SetDropDescription(new DataObject(), (DROPIMAGETYPE)dropImageType, string.Empty, string.Empty));
248
DragDropHelper
.SetDropDescription(dataObject, (DROPIMAGETYPE)dropImageType, message, messageReplacementToken);
249
Assert.True(
DragDropHelper
.IsInDragLoop(dataObject));
253
DragDropHelper
.ReleaseDragDropFormats(dataObject);
261
Assert.Throws<ArgumentOutOfRangeException>(() =>
DragDropHelper
.SetDropDescription(dataObject, (DROPIMAGETYPE)dropImageType, message, messageReplacementToken));
269
() =>
DragDropHelper
.SetDropDescription(dataObject, (DROPIMAGETYPE)DropImageType.Invalid, string.Empty, string.Empty));
276
DragDropHelper
.SetDropDescription(dataObject, (DROPIMAGETYPE)dropImageType, message, messageReplacementToken);
277
DragDropHelper
.ReleaseDragDropFormats(dataObject);
296
DragDropHelper
.SetDropDescription(e);
312
DragDropHelper
.ReleaseDragDropFormats(dataObject);
323
DragDropHelper
.SetDropDescription(dataObject, (DROPIMAGETYPE)dropImageType, message, messageReplacementToken);
337
DragDropHelper
.ReleaseDragDropFormats(dataObject);
345
Assert.Throws<ArgumentNullException>(nameof(dataObject), () =>
DragDropHelper
.SetInDragLoop(dataObject, true));
354
DragDropHelper
.SetInDragLoop(dataObject, inDragLoop);
363
DragDropHelper
.ReleaseDragDropFormats(dataObject);