371 references to DragDropEffects
System.Windows.Forms (57)
System\Windows\Forms\Control.cs (8)
4790
public
DragDropEffects
DoDragDrop(object data,
DragDropEffects
allowedEffects)
4809
/// A value from the <see cref="
DragDropEffects
"/> enumeration that represents the final effect that was performed
4814
/// Because <see cref="DoDragDrop(object,
DragDropEffects
, Bitmap, Point, bool)"/> always performs the
4821
public
DragDropEffects
DoDragDrop(
4823
DragDropEffects
allowedEffects,
4839
return
DragDropEffects
.None;
4850
return (
DragDropEffects
)finalEffect;
System\Windows\Forms\Controls\RichTextBox\RichTextBox.OleCallback.cs (16)
20
private
DragDropEffects
_lastEffect;
126
_lastEffect =
DragDropEffects
.None;
134
DragDropEffects
.All,
140
DragDropEffects
.All,
160
e.Effect = keyState.HasFlag(MODIFIERKEYS_FLAGS.MK_CONTROL) ?
DragDropEffects
.Copy :
DragDropEffects
.Move;
183
return e.Effect ==
DragDropEffects
.None ? HRESULT.E_FAIL : HRESULT.S_OK;
212
?
DragDropEffects
.All |
DragDropEffects
.None
213
:
DragDropEffects
.None;
235
DragDropEffects
.All,
241
DragDropEffects
.All,
248
if (_lastEffect !=
DragDropEffects
.None)
251
?
DragDropEffects
.Copy
252
:
DragDropEffects
.Move;
287
=> e.Effect !=
DragDropEffects
.None && e.DropImageType > DropImageType.Invalid && _owner.IsHandleCreated;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropTargetManager.cs (1)
214
Effect =
DragDropEffects
.None,
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (9)
2069
DoDragDrop(item,
DragDropEffects
.Move);
2137
public
DragDropEffects
DoDragDrop(object data,
DragDropEffects
allowedEffects)
2156
/// A value from the <see cref="
DragDropEffects
"/> enumeration that represents the final effect that was performed
2161
/// Because <see cref="DoDragDrop(object,
DragDropEffects
, Bitmap, Point, bool)"/> always performs the
2168
public unsafe
DragDropEffects
DoDragDrop(object data,
DragDropEffects
allowedEffects, Bitmap? dragImage, Point cursorOffset, bool useDefaultDragImage)
2205
return
DragDropEffects
.None;
2216
return (
DragDropEffects
)finalEffect;
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackDragDropHandler.cs (3)
25
e.Effect =
DragDropEffects
.Move;
50
e.Effect =
DragDropEffects
.Move;
56
e.Effect =
DragDropEffects
.None;
System\Windows\Forms\GiveFeedbackEventArgs.cs (3)
16
public GiveFeedbackEventArgs(
DragDropEffects
effect, bool useDefaultCursors)
24
public GiveFeedbackEventArgs(
DragDropEffects
effect, bool useDefaultCursors, Bitmap? dragImage, Point cursorOffset, bool useDefaultDragImage)
36
public
DragDropEffects
Effect { get; }
System\Windows\Forms\OLE\DragEventArgs.cs (6)
20
DragDropEffects
allowedEffect,
21
DragDropEffects
effect)
34
DragDropEffects
allowedEffect,
35
DragDropEffects
effect,
76
public
DragDropEffects
AllowedEffect { get; }
81
public
DragDropEffects
Effect { get; set; }
System\Windows\Forms\OLE\DropImageType.cs (3)
24
Copy =
DragDropEffects
.Copy,
29
Move =
DragDropEffects
.Move,
34
Link =
DragDropEffects
.Link,
System\Windows\Forms\OLE\DropSource.cs (3)
27
_lastGiveFeedbackEventArgs = new(
DragDropEffects
.None, useDefaultCursors: false, dragImage, cursorOffset, useDefaultDragImage);
61
? new((
DragDropEffects
)dwEffect, useDefaultCursors: true)
63
(
DragDropEffects
)dwEffect,
System\Windows\Forms\OLE\DropTarget.cs (5)
15
private
DragDropEffects
_lastEffect =
DragDropEffects
.None;
79
? new DragEventArgs(data, (int)grfKeyState, pt.x, pt.y, (
DragDropEffects
)pdwEffect, _lastEffect)
85
(
DragDropEffects
)pdwEffect,
187
_lastEffect =
DragDropEffects
.None;
System.Windows.Forms.Design (144)
System\Windows\Forms\Design\Behavior\Behavior.cs (3)
328
else if (e.Effect !=
DragDropEffects
.None)
330
e.Effect = (Control.ModifierKeys == Keys.Control) ?
DragDropEffects
.Copy :
DragDropEffects
.Move;
System\Windows\Forms\Design\Behavior\BehaviorService.cs (7)
185
internal
DragDropEffects
DoDragDrop(DropSourceBehavior dropSourceBehavior)
191
DragDropEffects
res =
DragDropEffects
.None;
228
res =
DragDropEffects
.None;
644
if (g is ControlBodyGlyph && e.Effect ==
DragDropEffects
.None)
823
e.Effect =
DragDropEffects
.None;
834
e.Effect =
DragDropEffects
.None;
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (14)
34
private readonly
DragDropEffects
_allowedEffects; // initial allowed effects for the drag operation
35
private
DragDropEffects
_lastEffect; // the last effect we saw (used for determining a valid drop)
108
_allowedEffects =
DragDropEffects
.Copy |
DragDropEffects
.None |
DragDropEffects
.Move;
112
_lastEffect =
DragDropEffects
.None;
123
internal
DragDropEffects
AllowedEffects
232
if (_lastEffect ==
DragDropEffects
.Copy || (_srcHost != _destHost && _destHost is not null))
337
bool performCopy = (_lastEffect ==
DragDropEffects
.Copy);
601
if (_data.Target is null || e.Effect ==
DragDropEffects
.None)
627
if (_data.Target.Equals(_data.Source) && _lastEffect !=
DragDropEffects
.Copy)
724
if (ShowHideDragControls(_lastEffect ==
DragDropEffects
.Copy) && !createNewDragAssistance)
735
_dragAssistanceManager = new DragAssistanceManager(_serviceProviderTarget, _graphicsTarget, _dragObjects, null, _lastEffect ==
DragDropEffects
.Copy);
1089
if (e.Action == DragAction.Cancel || _lastEffect ==
DragDropEffects
.None)
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionBehavior.cs (5)
252
ReParentControls(components, e.Effect ==
DragDropEffects
.Copy);
309
private static
DragDropEffects
GetEffect(IDataObject data)
312
?
DragDropEffects
.Copy
313
:
DragDropEffects
.Move
314
:
DragDropEffects
.None;
System\Windows\Forms\Design\ComponentTray.cs (8)
1098
de.Effect =
DragDropEffects
.Copy;
1129
Debug.Assert((de.AllowedEffect & (
DragDropEffects
.Move |
DragDropEffects
.Copy)) != 0, "DragDropEffect.Move | .Copy isn't allowed?");
1130
if ((de.AllowedEffect &
DragDropEffects
.Move) != 0)
1132
de.Effect =
DragDropEffects
.Move;
1136
de.Effect =
DragDropEffects
.Copy;
1163
Debug.Assert((de.AllowedEffect &
DragDropEffects
.Copy) != 0, "DragDropEffect.Move isn't allowed?");
1164
de.Effect =
DragDropEffects
.Copy;
System\Windows\Forms\Design\ControlDesigner.TransparentBehavior.cs (1)
73
e.Effect =
DragDropEffects
.None;
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (1)
564
bool performCopy = de.Effect ==
DragDropEffects
.Copy;
System\Windows\Forms\Design\OleDragDropHandler.cs (56)
32
private
DragDropEffects
_localDragEffect;
321
DragDropEffects
oldEffect,
365
if ((oldEffect &
DragDropEffects
.Move) == 0 ||
387
if ((oldEffect &
DragDropEffects
.Move) == 0 ||
467
DragDropEffects
allowedEffects =
DragDropEffects
.Copy |
DragDropEffects
.None |
DragDropEffects
.Move;
480
allowedEffects &= ~
DragDropEffects
.Move;
481
allowedEffects |= (
DragDropEffects
)AllowLocalMoveOnly;
520
DragDropEffects
effect =
DragDropEffects
.None;
548
bool isMove = (effect &
DragDropEffects
.Move) != 0 || ((int)effect & AllowLocalMoveOnly) != 0;
568
if (!_localDragOffset.IsEmpty && effect !=
DragDropEffects
.None)
600
de.Effect =
DragDropEffects
.None;
606
de.AllowedEffect ==
DragDropEffects
.None ||
609
de.Effect =
DragDropEffects
.None;
618
bool moveAllowed = (de.AllowedEffect &
DragDropEffects
.Move) !=
DragDropEffects
.None || localMoveOnly;
619
bool copyAllowed = (de.AllowedEffect &
DragDropEffects
.Copy) !=
DragDropEffects
.None;
621
if ((de.Effect &
DragDropEffects
.Move) != 0 && !moveAllowed)
624
de.Effect =
DragDropEffects
.Copy;
628
if ((de.Effect &
DragDropEffects
.Copy) != 0 && !copyAllowed)
632
de.Effect =
DragDropEffects
.None;
636
if (localMoveOnly && (de.Effect &
DragDropEffects
.Move) != 0)
638
de.Effect |= (
DragDropEffects
)AllowLocalMoveOnly |
DragDropEffects
.Move;
640
else if ((de.Effect &
DragDropEffects
.Copy) != 0)
642
de.Effect =
DragDropEffects
.Copy;
664
if (_dragOk || (_localDragInside && de.Effect ==
DragDropEffects
.Copy))
684
if (de.Effect ==
DragDropEffects
.Copy || newContainer)
688
cdo.Deserialize(_serviceProvider, (de.Effect &
DragDropEffects
.Copy) == 0);
779
de.Effect =
DragDropEffects
.None;
870
if (!Dragging && CanDropDataObject(de.Data) && de.AllowedEffect !=
DragDropEffects
.None)
880
if ((de.KeyState & (int)MODIFIERKEYS_FLAGS.MK_CONTROL) != 0 && (de.AllowedEffect &
DragDropEffects
.Copy) != 0)
882
de.Effect =
DragDropEffects
.Copy;
884
else if ((de.AllowedEffect &
DragDropEffects
.Move) != 0)
886
de.Effect =
DragDropEffects
.Move;
890
de.Effect =
DragDropEffects
.None;
894
else if (Dragging && de.AllowedEffect !=
DragDropEffects
.None)
898
&& (de.AllowedEffect &
DragDropEffects
.Copy) != 0
901
de.Effect =
DragDropEffects
.Copy;
908
de.Effect |= (
DragDropEffects
)AllowLocalMoveOnly;
911
if ((de.AllowedEffect &
DragDropEffects
.Move) != 0)
913
de.Effect |=
DragDropEffects
.Move;
918
de.Effect =
DragDropEffects
.None;
950
de.Effect =
DragDropEffects
.None;
955
&& (de.AllowedEffect &
DragDropEffects
.Copy) != 0
961
bool move = (de.AllowedEffect &
DragDropEffects
.Move) != 0 || localMoveOnly;
988
de.Effect =
DragDropEffects
.Copy;
992
de.Effect =
DragDropEffects
.Move;
996
de.Effect =
DragDropEffects
.None;
1001
de.Effect |= (
DragDropEffects
)AllowLocalMoveOnly;
1012
e.UseDefaultCursors = ((!_localDragInside && !_forceDrawFrames) || ((e.Effect & (
DragDropEffects
.Copy)) != 0)) || e.Effect ==
DragDropEffects
.None;
System\Windows\Forms\Design\ParentControlDesigner.cs (19)
1459
de.Effect = (Control.ModifierKeys == Keys.Control) ?
DragDropEffects
.Copy :
DragDropEffects
.Move;
1471
de.Effect =
DragDropEffects
.None;
1498
de.Effect =
DragDropEffects
.None;
1527
de.Effect =
DragDropEffects
.None;
1556
de.Effect =
DragDropEffects
.None;
1564
de.Effect =
DragDropEffects
.None;
1614
Debug.Assert((de.AllowedEffect & (
DragDropEffects
.Move |
DragDropEffects
.Copy)) != 0, "DragDropEffect.Move | .Copy isn't allowed?");
1615
if ((de.AllowedEffect &
DragDropEffects
.Move) != 0)
1617
de.Effect =
DragDropEffects
.Move;
1621
de.Effect =
DragDropEffects
.Copy;
1627
de.Effect =
DragDropEffects
.None;
1659
de.Effect = (Control.ModifierKeys == Keys.Control) ?
DragDropEffects
.Copy :
DragDropEffects
.Move;
1670
de.Effect =
DragDropEffects
.None;
1680
de.Effect =
DragDropEffects
.None;
1687
Debug.Assert((de.AllowedEffect &
DragDropEffects
.Copy) != 0, "DragDropEffect.Move isn't allowed?");
1688
de.Effect =
DragDropEffects
.Copy;
System\Windows\Forms\Design\SplitContainerDesigner.cs (1)
155
protected override void OnDragEnter(DragEventArgs de) => de.Effect =
DragDropEffects
.None;
System\Windows\Forms\Design\SplitterPanelDesigner.cs (3)
54
de.Effect =
DragDropEffects
.None;
65
de.Effect =
DragDropEffects
.None;
86
de.Effect =
DragDropEffects
.None;
System\Windows\Forms\Design\TabControlDesigner.cs (1)
575
de.Effect =
DragDropEffects
.None;
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (2)
495
bool localCopy = ((de is not null) && (de.Effect ==
DragDropEffects
.Copy) && localReposition);
1384
de.Effect =
DragDropEffects
.None;
System\Windows\Forms\Design\ToolStripDesigner.cs (5)
1836
bool copy = (de.Effect ==
DragDropEffects
.Copy);
1894
if (de.Effect ==
DragDropEffects
.Move || copy)
2282
de.Effect =
DragDropEffects
.None;
2286
de.Effect = (Control.ModifierKeys == Keys.Control) ?
DragDropEffects
.Copy :
DragDropEffects
.Move;
System\Windows\Forms\Design\ToolStripItemBehavior.cs (9)
619
DropSource.DoDragDrop(data,
DragDropEffects
.All);
660
bool copy = (e.Effect ==
DragDropEffects
.Copy);
725
if (e.Effect ==
DragDropEffects
.Move || copy)
853
e.Effect =
DragDropEffects
.Move;
857
e.Effect =
DragDropEffects
.None;
862
e.Effect =
DragDropEffects
.None;
886
e.Effect = (Control.ModifierKeys == Keys.Control) ?
DragDropEffects
.Copy :
DragDropEffects
.Move;
890
e.Effect =
DragDropEffects
.None;
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (6)
2651
e.Effect = (Control.ModifierKeys == Keys.Control) ?
DragDropEffects
.Copy :
DragDropEffects
.Move;
2666
e.Effect = (Control.ModifierKeys == Keys.Control) ?
DragDropEffects
.Copy :
DragDropEffects
.Move;
2696
bool copy = (e.Effect ==
DragDropEffects
.Copy);
2753
if (e.Effect ==
DragDropEffects
.Move || copy)
System\Windows\Forms\Design\TreeNodeCollectionEditor.cs (3)
510
DoDragDrop(item,
DragDropEffects
.Move);
517
e.Effect =
DragDropEffects
.Move;
521
e.Effect =
DragDropEffects
.None;
System.Windows.Forms.Tests (104)
System\Windows\Forms\ControlTests.Handlers.cs (3)
1302
yield return new object[] { new DragEventArgs(null, 1, 2, 3,
DragDropEffects
.Copy,
DragDropEffects
.Move) };
2057
yield return new object[] { new GiveFeedbackEventArgs(
DragDropEffects
.None, true) };
System\Windows\Forms\ControlTests.Methods.cs (7)
1814
foreach (
DragDropEffects
allowedEffects in Enum.GetValues(typeof(
DragDropEffects
)))
1827
public void Control_DoDragDrop_Invoke_ReturnsNone(object data,
DragDropEffects
allowedEffects)
1830
Assert.Equal(
DragDropEffects
.None, control.DoDragDrop(data, allowedEffects));
1837
public void Control_DoDragDrop_InvokeWithHandle_ReturnsNone(object data,
DragDropEffects
allowedEffects)
1848
Assert.Equal(
DragDropEffects
.None, control.DoDragDrop(data, allowedEffects));
1859
Assert.Throws<ArgumentNullException>("data", () => control.DoDragDrop(null,
DragDropEffects
.All));
System\Windows\Forms\DragDropHelperTests.cs (19)
25
yield return new object[] { new DataObject(), new GiveFeedbackEventArgs(
DragDropEffects
.All, false, new Bitmap(1, 1), new Point(0, 0), false) };
26
yield return new object[] { new DataObject(), new GiveFeedbackEventArgs(
DragDropEffects
.All, false, null, new Point(0, 0), false) };
27
yield return new object[] { new DataObject(), new GiveFeedbackEventArgs(
DragDropEffects
.All, false, new Bitmap(1, 1), new Point(0, 0), true) };
32
yield return new object[] { new DragEventArgs(new DataObject(), 1, 2, 3,
DragDropEffects
.Copy,
DragDropEffects
.Copy, DropImageType.Invalid, string.Empty, string.Empty) };
33
yield return new object[] { new DragEventArgs(new DataObject(), 1, 2, 3,
DragDropEffects
.Copy,
DragDropEffects
.Copy, DropImageType.None, string.Empty, string.Empty) };
34
yield return new object[] { new DragEventArgs(new DataObject(), 1, 2, 3,
DragDropEffects
.Copy,
DragDropEffects
.Copy, DropImageType.Copy, "Copy to %1", "Documents") };
35
yield return new object[] { new DragEventArgs(new DataObject(), 1, 2, 3,
DragDropEffects
.Copy,
DragDropEffects
.Copy, DropImageType.Move, "Move to %1", "Documents") };
36
yield return new object[] { new DragEventArgs(new DataObject(), 1, 2, 3,
DragDropEffects
.Copy,
DragDropEffects
.Copy, DropImageType.Link, "Create link in %1", "Documents") };
37
yield return new object[] { new DragEventArgs(new DataObject(), 1, 2, 3,
DragDropEffects
.Copy,
DragDropEffects
.Copy, DropImageType.Label, "Update metadata in %1", "Document") };
38
yield return new object[] { new DragEventArgs(new DataObject(), 1, 2, 3,
DragDropEffects
.Copy,
DragDropEffects
.Copy, DropImageType.Warning, "A problem has been encountered", string.Empty) };
39
yield return new object[] { new DragEventArgs(new DataObject(), 1, 2, 3,
DragDropEffects
.Copy,
DragDropEffects
.Copy, DropImageType.NoImage, "Copy to %1", "Documents") };
System\Windows\Forms\DragEventArgsTests.cs (23)
11
yield return new object[] { null, -1, -2, -3,
DragDropEffects
.None - 1,
DragDropEffects
.None - 1 };
12
yield return new object[] { new CustomDataObject(), 1, 2, 3,
DragDropEffects
.Copy,
DragDropEffects
.Move };
17
yield return new object[] { null, -1, -2, -3,
DragDropEffects
.None - 1,
DragDropEffects
.None - 1, (DropImageType.Invalid - 1), null, null };
18
yield return new object[] { new CustomDataObject(), 1, 2, 3,
DragDropEffects
.Copy,
DragDropEffects
.Move, DropImageType.Copy, "Move to %1", "Documents" };
23
public void Ctor_IDataObject_Int_Int_Int_DragDropEffects_DragDropEffects(IDataObject data, int keyState, int x, int y,
DragDropEffects
allowedEffect,
DragDropEffects
effect)
37
int y,
DragDropEffects
allowedEffect,
DragDropEffects
effect, DropImageType dropImageType, string message, string messageReplacementToken)
52
[InlineData(
DragDropEffects
.Copy)]
53
[InlineData((
DragDropEffects
.None - 1))]
54
public void Effect_Set_GetReturnsExpected(
DragDropEffects
value)
56
DragEventArgs e = new(new CustomDataObject(), 1, 2, 3,
DragDropEffects
.Copy,
DragDropEffects
.Move)
68
DragEventArgs e = new(new CustomDataObject(), 1, 2, 3,
DragDropEffects
.Copy,
DragDropEffects
.Move, DropImageType.Copy, "Copy to %1", "Documents")
80
DragEventArgs e = new(new CustomDataObject(), 1, 2, 3,
DragDropEffects
.Copy,
DragDropEffects
.Move, DropImageType.Copy, "Move to %1", "Documents")
92
DragEventArgs e = new(new CustomDataObject(), 1, 2, 3,
DragDropEffects
.Copy,
DragDropEffects
.Move, DropImageType.Copy, "Move to %1", "Desktop")
System\Windows\Forms\GiveFeedbackEventArgsTests.cs (7)
12
[InlineData(
DragDropEffects
.None, true)]
13
[InlineData((
DragDropEffects
.None - 1), false)]
14
public void Ctor_DragDropEffects_Bool(
DragDropEffects
effect, bool useDefaultCursors)
25
GiveFeedbackEventArgs e = new(
DragDropEffects
.None, false, new Bitmap(1, 1), new Point(0, 0), false)
42
GiveFeedbackEventArgs e = new(
DragDropEffects
.None, false, new Bitmap(2, 2), new Point(0, 0), false)
60
GiveFeedbackEventArgs e = new(
DragDropEffects
.None, false)
72
GiveFeedbackEventArgs e = new(
DragDropEffects
.None, false, new Bitmap(1, 1), new Point(0, 0), false)
System\Windows\Forms\RichTextBoxTests.cs (7)
10739
allowedEffect:
DragDropEffects
.None,
10740
effect:
DragDropEffects
.None);
10767
allowedEffect:
DragDropEffects
.None,
10768
effect:
DragDropEffects
.None);
10816
allowedEffect:
DragDropEffects
.None,
10817
effect:
DragDropEffects
.None);
10839
GiveFeedbackEventArgs giveFeedbackEventArgs = new(
DragDropEffects
.None, useDefaultCursors: true);
System\Windows\Forms\ToolStripControlHostTests.cs (4)
3345
yield return new object[] { new DragEventArgs(null, 1, 2, 3,
DragDropEffects
.Copy,
DragDropEffects
.Move) };
3491
yield return new object[] { new GiveFeedbackEventArgs(
DragDropEffects
.None, true) };
4059
c.OnGiveFeedback(new GiveFeedbackEventArgs(
DragDropEffects
.All, false));
System\Windows\Forms\ToolStripDropDownTests.cs (1)
3860
yield return new object[] { new GiveFeedbackEventArgs(
DragDropEffects
.None, true) };
System\Windows\Forms\ToolStripItemTests.cs (16)
10148
foreach (
DragDropEffects
allowedEffects in Enum.GetValues(typeof(
DragDropEffects
)))
10162
public void ToolStripItem_DoDragDrop_Invoke_ReturnsNone(object data,
DragDropEffects
allowedEffects)
10165
Assert.Equal(
DragDropEffects
.None, item.DoDragDrop(data, allowedEffects));
10171
public void ToolStripItem_DoDragDrop_InvokeWithParent_ReturnsNone(object data,
DragDropEffects
allowedEffects)
10178
Assert.Equal(
DragDropEffects
.None, item.DoDragDrop(data, allowedEffects));
10185
public void ToolStripItem_DoDragDrop_InvokeWithParentAllowItemReorder_ReturnsNone(object data,
DragDropEffects
allowedEffects)
10195
Assert.Equal(
DragDropEffects
.None, item.DoDragDrop(data, allowedEffects));
10202
public void ToolStripItem_DoDragDrop_InvokeWithOwner_ReturnsNone(object data,
DragDropEffects
allowedEffects)
10209
Assert.Equal(
DragDropEffects
.None, item.DoDragDrop(data, allowedEffects));
10216
public void ToolStripItem_DoDragDrop_InvokeWithOwnerAllowItemReorder_ReturnsNone(object data,
DragDropEffects
allowedEffects)
10226
Assert.Equal(
DragDropEffects
.None, item.DoDragDrop(data, allowedEffects));
10235
Assert.Throws<ArgumentNullException>("data", () => item.DoDragDrop(null,
DragDropEffects
.All));
10991
yield return new object[] { new DragEventArgs(null, 0, 0, 0,
DragDropEffects
.None,
DragDropEffects
.None) };
11696
yield return new object[] { new GiveFeedbackEventArgs(
DragDropEffects
.None, true) };
System\Windows\Forms\ToolStripSplitStackDragDropHandlerTests.cs (17)
28
DragEventArgs dragEventArgs = new(dataObject, 0, 0, 0,
DragDropEffects
.None,
DragDropEffects
.None);
32
dragEventArgs.Effect.Should().Be(
DragDropEffects
.Move);
39
DragEventArgs dragEventArgs = new(dataObject, 0, 0, 0,
DragDropEffects
.None,
DragDropEffects
.None);
43
dragEventArgs.Effect.Should().Be(
DragDropEffects
.None);
52
DragEventArgs dragEventArgs = new(dataObject, 0, 0, 0,
DragDropEffects
.None,
DragDropEffects
.None);
63
DragEventArgs dragEventArgs = new(dataObject, 0, 0, 0,
DragDropEffects
.None,
DragDropEffects
.None);
76
DragEventArgs dragEventArgs = new(dataObject, 0, 0, 0,
DragDropEffects
.None,
DragDropEffects
.None);
80
dragEventArgs.Effect.Should().Be(
DragDropEffects
.Move);
87
DragEventArgs dragEventArgs = new(dataObject, 0, 0, 0,
DragDropEffects
.None,
DragDropEffects
.None);
91
dragEventArgs.Effect.Should().Be(
DragDropEffects
.None);
97
GiveFeedbackEventArgs giveFeedbackEventArgs = new(effect:
DragDropEffects
.None, useDefaultCursors: false);
System.Windows.Forms.UI.IntegrationTests (41)
DesignBehaviorsTests.cs (2)
118
var
effects = node.TreeView!.DoDragDrop(dataObject!,
DragDropEffects
.Copy);
DragDropTests.cs (39)
72
e.Effect =
DragDropEffects
.Copy;
81
e.Effect =
DragDropEffects
.Copy;
96
form.DoDragDrop(data,
DragDropEffects
.Copy);
286
e.Effect =
DragDropEffects
.Copy;
295
e.Effect =
DragDropEffects
.Copy;
309
form.DoDragDrop(data,
DragDropEffects
.Copy);
357
e.Effect =
DragDropEffects
.Copy;
709
DragDropEffects
dropEffect = ListDragSource.DoDragDrop(
711
DragDropEffects
.All |
DragDropEffects
.Link);
714
if (dropEffect ==
DragDropEffects
.Move)
745
if ((e.Effect &
DragDropEffects
.Move) ==
DragDropEffects
.Move)
760
e.Effect =
DragDropEffects
.None;
767
(e.AllowedEffect &
DragDropEffects
.Link) ==
DragDropEffects
.Link)
772
e.Effect =
DragDropEffects
.Link;
775
(e.AllowedEffect &
DragDropEffects
.Link) ==
DragDropEffects
.Link)
778
e.Effect =
DragDropEffects
.Link;
781
(e.AllowedEffect &
DragDropEffects
.Move) ==
DragDropEffects
.Move)
784
e.Effect =
DragDropEffects
.Move;
787
(e.AllowedEffect &
DragDropEffects
.Copy) ==
DragDropEffects
.Copy)
790
e.Effect =
DragDropEffects
.Copy;
792
else if ((e.AllowedEffect &
DragDropEffects
.Move) ==
DragDropEffects
.Move)
795
e.Effect =
DragDropEffects
.Move;
799
e.Effect =
DragDropEffects
.None;
831
if (item is not null && (e.Effect ==
DragDropEffects
.Copy || e.Effect ==
DragDropEffects
.Move))
1014
e.Effect =
DragDropEffects
.Link;
1031
dragAcceptItem.DoDragDrop(data,
DragDropEffects
.All, _dragAcceptBmp, new Point(0, 16), false);
1040
e.Effect =
DragDropEffects
.None;
1054
e.Effect =
DragDropEffects
.None;
1070
e.Effect =
DragDropEffects
.Link;
1079
e.Effect =
DragDropEffects
.None;
1091
PictureBoxDragSource.DoDragDrop(data,
DragDropEffects
.All, _dragImage, new Point(0, 16), false);
TrimTest (2)
Form1.cs (2)
21
e.Effect =
DragDropEffects
.Copy;
29
e.Effect =
DragDropEffects
.Copy;
WinFormsControlsTest (23)
DragDrop.cs (23)
102
e.Effect =
DragDropEffects
.None;
126
e.Effect =
DragDropEffects
.Copy;
138
e.Effect =
DragDropEffects
.None;
151
e.Effect =
DragDropEffects
.Copy;
183
pictureBox.DoDragDrop(data,
DragDropEffects
.All, _nyanCatBmp, new Point(0, 96), true);
189
if (e.Effect.Equals(
DragDropEffects
.Copy))
226
e.Effect =
DragDropEffects
.None;
243
e.Effect =
DragDropEffects
.Copy;
250
e.Effect =
DragDropEffects
.None;
264
e.Effect =
DragDropEffects
.None;
285
e.Effect =
DragDropEffects
.Copy;
292
e.Effect =
DragDropEffects
.None;
306
e.Effect =
DragDropEffects
.None;
325
e.Effect =
DragDropEffects
.Link;
332
e.Effect =
DragDropEffects
.None;
339
e.Effect =
DragDropEffects
.None;
353
e.Effect =
DragDropEffects
.None;
515
e.Effect =
DragDropEffects
.Link;
522
e.Effect =
DragDropEffects
.Link;
529
e.Effect =
DragDropEffects
.Link;
546
toolStripItem.DoDragDrop(data,
DragDropEffects
.All, _dragAcceptBmp, new Point(0, 96), true);
558
toolStripItem.DoDragDrop(data,
DragDropEffects
.All, _nyanCatBmp, new Point(0, 96), true);
570
toolStripItem.DoDragDrop(data,
DragDropEffects
.All, _nyanCatAscii301Bmp, new Point(0, 111), false);