383 references to DragDropEffects
System.Windows.Forms (65)
System\Windows\Forms\Control.cs (16)
4783/// <inheritdoc cref="DoDragDropAsJson{T}(T, DragDropEffects, Bitmap?, Point, bool)"/> 4784public DragDropEffects DoDragDropAsJson<T>(T data, DragDropEffects allowedEffects) => 4795/// <returns>A value from the <see cref="DragDropEffects"/> enumeration that represents the final effect that was performed during the drag-and-drop operation.</returns> 4799/// then pass the <paramref name="data"/> to <see cref="DoDragDrop(object, DragDropEffects)"/>. 4804/// the same as <see cref="DoDragDrop(object, DragDropEffects)"/>. 4807public DragDropEffects DoDragDropAsJson<T>( 4809DragDropEffects allowedEffects, 4833public DragDropEffects DoDragDrop(object data, DragDropEffects allowedEffects) => 4850/// A value from the <see cref="DragDropEffects"/> enumeration that represents the final effect that was performed 4855/// Because <see cref="DoDragDrop(object, DragDropEffects, Bitmap, Point, bool)"/> always performs the 4862public DragDropEffects DoDragDrop( 4864DragDropEffects allowedEffects, 4880return DragDropEffects.None; 4891return (DragDropEffects)finalEffect;
System\Windows\Forms\Controls\RichTextBox\RichTextBox.OleCallback.cs (16)
20private DragDropEffects _lastEffect; 126_lastEffect = DragDropEffects.None; 134DragDropEffects.All, 140DragDropEffects.All, 160e.Effect = keyState.HasFlag(MODIFIERKEYS_FLAGS.MK_CONTROL) ? DragDropEffects.Copy : DragDropEffects.Move; 183return e.Effect == DragDropEffects.None ? HRESULT.E_FAIL : HRESULT.S_OK; 212? DragDropEffects.All | DragDropEffects.None 213: DragDropEffects.None; 235DragDropEffects.All, 241DragDropEffects.All, 248if (_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)
213Effect = DragDropEffects.None,
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (9)
2061DoDragDrop(item, DragDropEffects.Move); 2129public DragDropEffects DoDragDrop(object data, DragDropEffects allowedEffects) 2148/// A value from the <see cref="DragDropEffects"/> enumeration that represents the final effect that was performed 2153/// Because <see cref="DoDragDrop(object, DragDropEffects, Bitmap, Point, bool)"/> always performs the 2160public unsafe DragDropEffects DoDragDrop(object data, DragDropEffects allowedEffects, Bitmap? dragImage, Point cursorOffset, bool useDefaultDragImage) 2197return DragDropEffects.None; 2208return (DragDropEffects)finalEffect;
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackDragDropHandler.cs (3)
25e.Effect = DragDropEffects.Move; 50e.Effect = DragDropEffects.Move; 56e.Effect = DragDropEffects.None;
System\Windows\Forms\GiveFeedbackEventArgs.cs (3)
16public GiveFeedbackEventArgs(DragDropEffects effect, bool useDefaultCursors) 24public GiveFeedbackEventArgs(DragDropEffects effect, bool useDefaultCursors, Bitmap? dragImage, Point cursorOffset, bool useDefaultDragImage) 36public DragDropEffects Effect { get; }
System\Windows\Forms\OLE\DragEventArgs.cs (6)
20DragDropEffects allowedEffect, 21DragDropEffects effect) 34DragDropEffects allowedEffect, 35DragDropEffects effect, 76public DragDropEffects AllowedEffect { get; } 81public DragDropEffects Effect { get; set; }
System\Windows\Forms\OLE\DropImageType.cs (3)
24Copy = DragDropEffects.Copy, 29Move = DragDropEffects.Move, 34Link = 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)
15private 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)
328else if (e.Effect != DragDropEffects.None) 330e.Effect = (Control.ModifierKeys == Keys.Control) ? DragDropEffects.Copy : DragDropEffects.Move;
System\Windows\Forms\Design\Behavior\BehaviorService.cs (7)
185internal DragDropEffects DoDragDrop(DropSourceBehavior dropSourceBehavior) 191DragDropEffects res = DragDropEffects.None; 228res = DragDropEffects.None; 644if (g is ControlBodyGlyph && e.Effect == DragDropEffects.None) 823e.Effect = DragDropEffects.None; 834e.Effect = DragDropEffects.None;
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (14)
34private readonly DragDropEffects _allowedEffects; // initial allowed effects for the drag operation 35private 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; 123internal DragDropEffects AllowedEffects 232if (_lastEffect == DragDropEffects.Copy || (_srcHost != _destHost && _destHost is not null)) 337bool performCopy = (_lastEffect == DragDropEffects.Copy); 601if (_data.Target is null || e.Effect == DragDropEffects.None) 627if (_data.Target.Equals(_data.Source) && _lastEffect != DragDropEffects.Copy) 724if (ShowHideDragControls(_lastEffect == DragDropEffects.Copy) && !createNewDragAssistance) 735_dragAssistanceManager = new DragAssistanceManager(_serviceProviderTarget, _graphicsTarget, _dragObjects, null, _lastEffect == DragDropEffects.Copy); 1089if (e.Action == DragAction.Cancel || _lastEffect == DragDropEffects.None)
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionBehavior.cs (5)
252ReParentControls(components, e.Effect == DragDropEffects.Copy); 309private static DragDropEffects GetEffect(IDataObject data) 312? DragDropEffects.Copy 313: DragDropEffects.Move 314: DragDropEffects.None;
System\Windows\Forms\Design\ComponentTray.cs (8)
1098de.Effect = DragDropEffects.Copy; 1129Debug.Assert((de.AllowedEffect & (DragDropEffects.Move | DragDropEffects.Copy)) != 0, "DragDropEffect.Move | .Copy isn't allowed?"); 1130if ((de.AllowedEffect & DragDropEffects.Move) != 0) 1132de.Effect = DragDropEffects.Move; 1136de.Effect = DragDropEffects.Copy; 1163Debug.Assert((de.AllowedEffect & DragDropEffects.Copy) != 0, "DragDropEffect.Move isn't allowed?"); 1164de.Effect = DragDropEffects.Copy;
System\Windows\Forms\Design\ControlDesigner.TransparentBehavior.cs (1)
73e.Effect = DragDropEffects.None;
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (1)
564bool performCopy = de.Effect == DragDropEffects.Copy;
System\Windows\Forms\Design\OleDragDropHandler.cs (56)
32private DragDropEffects _localDragEffect; 321DragDropEffects oldEffect, 365if ((oldEffect & DragDropEffects.Move) == 0 || 387if ((oldEffect & DragDropEffects.Move) == 0 || 467DragDropEffects allowedEffects = DragDropEffects.Copy | DragDropEffects.None | DragDropEffects.Move; 480allowedEffects &= ~DragDropEffects.Move; 481allowedEffects |= (DragDropEffects)AllowLocalMoveOnly; 520DragDropEffects effect = DragDropEffects.None; 548bool isMove = (effect & DragDropEffects.Move) != 0 || ((int)effect & AllowLocalMoveOnly) != 0; 568if (!_localDragOffset.IsEmpty && effect != DragDropEffects.None) 600de.Effect = DragDropEffects.None; 606de.AllowedEffect == DragDropEffects.None || 609de.Effect = DragDropEffects.None; 618bool moveAllowed = (de.AllowedEffect & DragDropEffects.Move) != DragDropEffects.None || localMoveOnly; 619bool copyAllowed = (de.AllowedEffect & DragDropEffects.Copy) != DragDropEffects.None; 621if ((de.Effect & DragDropEffects.Move) != 0 && !moveAllowed) 624de.Effect = DragDropEffects.Copy; 628if ((de.Effect & DragDropEffects.Copy) != 0 && !copyAllowed) 632de.Effect = DragDropEffects.None; 636if (localMoveOnly && (de.Effect & DragDropEffects.Move) != 0) 638de.Effect |= (DragDropEffects)AllowLocalMoveOnly | DragDropEffects.Move; 640else if ((de.Effect & DragDropEffects.Copy) != 0) 642de.Effect = DragDropEffects.Copy; 664if (_dragOk || (_localDragInside && de.Effect == DragDropEffects.Copy)) 684if (de.Effect == DragDropEffects.Copy || newContainer) 688cdo.Deserialize(_serviceProvider, (de.Effect & DragDropEffects.Copy) == 0); 779de.Effect = DragDropEffects.None; 870if (!Dragging && CanDropDataObject(de.Data) && de.AllowedEffect != DragDropEffects.None) 880if ((de.KeyState & (int)MODIFIERKEYS_FLAGS.MK_CONTROL) != 0 && (de.AllowedEffect & DragDropEffects.Copy) != 0) 882de.Effect = DragDropEffects.Copy; 884else if ((de.AllowedEffect & DragDropEffects.Move) != 0) 886de.Effect = DragDropEffects.Move; 890de.Effect = DragDropEffects.None; 894else if (Dragging && de.AllowedEffect != DragDropEffects.None) 898&& (de.AllowedEffect & DragDropEffects.Copy) != 0 901de.Effect = DragDropEffects.Copy; 908de.Effect |= (DragDropEffects)AllowLocalMoveOnly; 911if ((de.AllowedEffect & DragDropEffects.Move) != 0) 913de.Effect |= DragDropEffects.Move; 918de.Effect = DragDropEffects.None; 950de.Effect = DragDropEffects.None; 955&& (de.AllowedEffect & DragDropEffects.Copy) != 0 961bool move = (de.AllowedEffect & DragDropEffects.Move) != 0 || localMoveOnly; 988de.Effect = DragDropEffects.Copy; 992de.Effect = DragDropEffects.Move; 996de.Effect = DragDropEffects.None; 1001de.Effect |= (DragDropEffects)AllowLocalMoveOnly; 1012e.UseDefaultCursors = ((!_localDragInside && !_forceDrawFrames) || ((e.Effect & (DragDropEffects.Copy)) != 0)) || e.Effect == DragDropEffects.None;
System\Windows\Forms\Design\ParentControlDesigner.cs (19)
1459de.Effect = (Control.ModifierKeys == Keys.Control) ? DragDropEffects.Copy : DragDropEffects.Move; 1471de.Effect = DragDropEffects.None; 1499de.Effect = DragDropEffects.None; 1528de.Effect = DragDropEffects.None; 1557de.Effect = DragDropEffects.None; 1565de.Effect = DragDropEffects.None; 1615Debug.Assert((de.AllowedEffect & (DragDropEffects.Move | DragDropEffects.Copy)) != 0, "DragDropEffect.Move | .Copy isn't allowed?"); 1616if ((de.AllowedEffect & DragDropEffects.Move) != 0) 1618de.Effect = DragDropEffects.Move; 1622de.Effect = DragDropEffects.Copy; 1628de.Effect = DragDropEffects.None; 1660de.Effect = (Control.ModifierKeys == Keys.Control) ? DragDropEffects.Copy : DragDropEffects.Move; 1671de.Effect = DragDropEffects.None; 1681de.Effect = DragDropEffects.None; 1688Debug.Assert((de.AllowedEffect & DragDropEffects.Copy) != 0, "DragDropEffect.Move isn't allowed?"); 1689de.Effect = DragDropEffects.Copy;
System\Windows\Forms\Design\SplitContainerDesigner.cs (1)
155protected override void OnDragEnter(DragEventArgs de) => de.Effect = DragDropEffects.None;
System\Windows\Forms\Design\SplitterPanelDesigner.cs (3)
54de.Effect = DragDropEffects.None; 65de.Effect = DragDropEffects.None; 86de.Effect = DragDropEffects.None;
System\Windows\Forms\Design\TabControlDesigner.cs (1)
576de.Effect = DragDropEffects.None;
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (2)
495bool localCopy = ((de is not null) && (de.Effect == DragDropEffects.Copy) && localReposition); 1384de.Effect = DragDropEffects.None;
System\Windows\Forms\Design\ToolStripDesigner.cs (5)
1835bool copy = (de.Effect == DragDropEffects.Copy); 1893if (de.Effect == DragDropEffects.Move || copy) 2281de.Effect = DragDropEffects.None; 2285de.Effect = (Control.ModifierKeys == Keys.Control) ? DragDropEffects.Copy : DragDropEffects.Move;
System\Windows\Forms\Design\ToolStripItemBehavior.cs (9)
619DropSource.DoDragDrop(data, DragDropEffects.All); 660bool copy = (e.Effect == DragDropEffects.Copy); 725if (e.Effect == DragDropEffects.Move || copy) 853e.Effect = DragDropEffects.Move; 857e.Effect = DragDropEffects.None; 862e.Effect = DragDropEffects.None; 886e.Effect = (Control.ModifierKeys == Keys.Control) ? DragDropEffects.Copy : DragDropEffects.Move; 890e.Effect = DragDropEffects.None;
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (6)
2651e.Effect = (Control.ModifierKeys == Keys.Control) ? DragDropEffects.Copy : DragDropEffects.Move; 2666e.Effect = (Control.ModifierKeys == Keys.Control) ? DragDropEffects.Copy : DragDropEffects.Move; 2696bool copy = (e.Effect == DragDropEffects.Copy); 2753if (e.Effect == DragDropEffects.Move || copy)
System\Windows\Forms\Design\TreeNodeCollectionEditor.cs (3)
510DoDragDrop(item, DragDropEffects.Move); 517e.Effect = DragDropEffects.Move; 521e.Effect = DragDropEffects.None;
System.Windows.Forms.Tests (105)
System\Windows\Forms\ControlTests.Handlers.cs (3)
1302yield return new object[] { new DragEventArgs(null, 1, 2, 3, DragDropEffects.Copy, DragDropEffects.Move) }; 2057yield return new object[] { new GiveFeedbackEventArgs(DragDropEffects.None, true) };
System\Windows\Forms\ControlTests.Methods.cs (8)
1814foreach (DragDropEffects allowedEffects in Enum.GetValues(typeof(DragDropEffects))) 1827public void Control_DoDragDrop_Invoke_ReturnsNone(object data, DragDropEffects allowedEffects) 1830Assert.Equal(DragDropEffects.None, control.DoDragDrop(data, allowedEffects)); 1837public void Control_DoDragDrop_InvokeWithHandle_ReturnsNone(object data, DragDropEffects allowedEffects) 1848Assert.Equal(DragDropEffects.None, control.DoDragDrop(data, allowedEffects)); 1859Action dragDrop = () => control.DoDragDrop(null, DragDropEffects.All); 1867Action dragDrop = () => control.DoDragDropAsJson<string>(null, DragDropEffects.Copy);
System\Windows\Forms\DragDropHelperTests.cs (19)
25yield return new object[] { new DataObject(), new GiveFeedbackEventArgs(DragDropEffects.All, false, new Bitmap(1, 1), new Point(0, 0), false) }; 26yield return new object[] { new DataObject(), new GiveFeedbackEventArgs(DragDropEffects.All, false, null, new Point(0, 0), false) }; 27yield return new object[] { new DataObject(), new GiveFeedbackEventArgs(DragDropEffects.All, false, new Bitmap(1, 1), new Point(0, 0), true) }; 32yield return new object[] { new DragEventArgs(new DataObject(), 1, 2, 3, DragDropEffects.Copy, DragDropEffects.Copy, DropImageType.Invalid, string.Empty, string.Empty) }; 33yield return new object[] { new DragEventArgs(new DataObject(), 1, 2, 3, DragDropEffects.Copy, DragDropEffects.Copy, DropImageType.None, string.Empty, string.Empty) }; 34yield return new object[] { new DragEventArgs(new DataObject(), 1, 2, 3, DragDropEffects.Copy, DragDropEffects.Copy, DropImageType.Copy, "Copy to %1", "Documents") }; 35yield return new object[] { new DragEventArgs(new DataObject(), 1, 2, 3, DragDropEffects.Copy, DragDropEffects.Copy, DropImageType.Move, "Move to %1", "Documents") }; 36yield return new object[] { new DragEventArgs(new DataObject(), 1, 2, 3, DragDropEffects.Copy, DragDropEffects.Copy, DropImageType.Link, "Create link in %1", "Documents") }; 37yield return new object[] { new DragEventArgs(new DataObject(), 1, 2, 3, DragDropEffects.Copy, DragDropEffects.Copy, DropImageType.Label, "Update metadata in %1", "Document") }; 38yield return new object[] { new DragEventArgs(new DataObject(), 1, 2, 3, DragDropEffects.Copy, DragDropEffects.Copy, DropImageType.Warning, "A problem has been encountered", string.Empty) }; 39yield 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)
11yield return new object[] { null, -1, -2, -3, DragDropEffects.None - 1, DragDropEffects.None - 1 }; 12yield return new object[] { new CustomDataObject(), 1, 2, 3, DragDropEffects.Copy, DragDropEffects.Move }; 17yield return new object[] { null, -1, -2, -3, DragDropEffects.None - 1, DragDropEffects.None - 1, (DropImageType.Invalid - 1), null, null }; 18yield return new object[] { new CustomDataObject(), 1, 2, 3, DragDropEffects.Copy, DragDropEffects.Move, DropImageType.Copy, "Move to %1", "Documents" }; 23public void Ctor_IDataObject_Int_Int_Int_DragDropEffects_DragDropEffects(IDataObject data, int keyState, int x, int y, DragDropEffects allowedEffect, DragDropEffects effect) 37int y, DragDropEffects allowedEffect, DragDropEffects effect, DropImageType dropImageType, string message, string messageReplacementToken) 52[InlineData(DragDropEffects.Copy)] 53[InlineData((DragDropEffects.None - 1))] 54public void Effect_Set_GetReturnsExpected(DragDropEffects value) 56DragEventArgs e = new(new CustomDataObject(), 1, 2, 3, DragDropEffects.Copy, DragDropEffects.Move) 68DragEventArgs e = new(new CustomDataObject(), 1, 2, 3, DragDropEffects.Copy, DragDropEffects.Move, DropImageType.Copy, "Copy to %1", "Documents") 80DragEventArgs e = new(new CustomDataObject(), 1, 2, 3, DragDropEffects.Copy, DragDropEffects.Move, DropImageType.Copy, "Move to %1", "Documents") 92DragEventArgs 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)] 14public void Ctor_DragDropEffects_Bool(DragDropEffects effect, bool useDefaultCursors) 25GiveFeedbackEventArgs e = new(DragDropEffects.None, false, new Bitmap(1, 1), new Point(0, 0), false) 42GiveFeedbackEventArgs e = new(DragDropEffects.None, false, new Bitmap(2, 2), new Point(0, 0), false) 60GiveFeedbackEventArgs e = new(DragDropEffects.None, false) 72GiveFeedbackEventArgs e = new(DragDropEffects.None, false, new Bitmap(1, 1), new Point(0, 0), false)
System\Windows\Forms\RichTextBoxTests.cs (7)
10739allowedEffect: DragDropEffects.None, 10740effect: DragDropEffects.None); 10767allowedEffect: DragDropEffects.None, 10768effect: DragDropEffects.None); 10816allowedEffect: DragDropEffects.None, 10817effect: DragDropEffects.None); 10839GiveFeedbackEventArgs giveFeedbackEventArgs = new(DragDropEffects.None, useDefaultCursors: true);
System\Windows\Forms\ToolStripControlHostTests.cs (4)
3345yield return new object[] { new DragEventArgs(null, 1, 2, 3, DragDropEffects.Copy, DragDropEffects.Move) }; 3491yield return new object[] { new GiveFeedbackEventArgs(DragDropEffects.None, true) }; 4059c.OnGiveFeedback(new GiveFeedbackEventArgs(DragDropEffects.All, false));
System\Windows\Forms\ToolStripDropDownTests.cs (1)
3860yield return new object[] { new GiveFeedbackEventArgs(DragDropEffects.None, true) };
System\Windows\Forms\ToolStripItemTests.cs (16)
10148foreach (DragDropEffects allowedEffects in Enum.GetValues(typeof(DragDropEffects))) 10162public void ToolStripItem_DoDragDrop_Invoke_ReturnsNone(object data, DragDropEffects allowedEffects) 10165Assert.Equal(DragDropEffects.None, item.DoDragDrop(data, allowedEffects)); 10171public void ToolStripItem_DoDragDrop_InvokeWithParent_ReturnsNone(object data, DragDropEffects allowedEffects) 10178Assert.Equal(DragDropEffects.None, item.DoDragDrop(data, allowedEffects)); 10185public void ToolStripItem_DoDragDrop_InvokeWithParentAllowItemReorder_ReturnsNone(object data, DragDropEffects allowedEffects) 10195Assert.Equal(DragDropEffects.None, item.DoDragDrop(data, allowedEffects)); 10202public void ToolStripItem_DoDragDrop_InvokeWithOwner_ReturnsNone(object data, DragDropEffects allowedEffects) 10209Assert.Equal(DragDropEffects.None, item.DoDragDrop(data, allowedEffects)); 10216public void ToolStripItem_DoDragDrop_InvokeWithOwnerAllowItemReorder_ReturnsNone(object data, DragDropEffects allowedEffects) 10226Assert.Equal(DragDropEffects.None, item.DoDragDrop(data, allowedEffects)); 10235Assert.Throws<ArgumentNullException>("data", () => item.DoDragDrop(null, DragDropEffects.All)); 10991yield return new object[] { new DragEventArgs(null, 0, 0, 0, DragDropEffects.None, DragDropEffects.None) }; 11696yield return new object[] { new GiveFeedbackEventArgs(DragDropEffects.None, true) };
System\Windows\Forms\ToolStripSplitStackDragDropHandlerTests.cs (17)
28DragEventArgs dragEventArgs = new(dataObject, 0, 0, 0, DragDropEffects.None, DragDropEffects.None); 32dragEventArgs.Effect.Should().Be(DragDropEffects.Move); 39DragEventArgs dragEventArgs = new(dataObject, 0, 0, 0, DragDropEffects.None, DragDropEffects.None); 43dragEventArgs.Effect.Should().Be(DragDropEffects.None); 52DragEventArgs dragEventArgs = new(dataObject, 0, 0, 0, DragDropEffects.None, DragDropEffects.None); 63DragEventArgs dragEventArgs = new(dataObject, 0, 0, 0, DragDropEffects.None, DragDropEffects.None); 76DragEventArgs dragEventArgs = new(dataObject, 0, 0, 0, DragDropEffects.None, DragDropEffects.None); 80dragEventArgs.Effect.Should().Be(DragDropEffects.Move); 87DragEventArgs dragEventArgs = new(dataObject, 0, 0, 0, DragDropEffects.None, DragDropEffects.None); 91dragEventArgs.Effect.Should().Be(DragDropEffects.None); 97GiveFeedbackEventArgs giveFeedbackEventArgs = new(effect: DragDropEffects.None, useDefaultCursors: false);
System.Windows.Forms.UI.IntegrationTests (44)
DesignBehaviorsTests.cs (2)
118var effects = node.TreeView!.DoDragDrop(dataObject!, DragDropEffects.Copy);
DragDropTests.cs (42)
74e.Effect = DragDropEffects.Copy; 83e.Effect = DragDropEffects.Copy; 98form.DoDragDrop(data, DragDropEffects.Copy); 290e.Effect = DragDropEffects.Copy; 299e.Effect = DragDropEffects.Copy; 313form.DoDragDrop(data, DragDropEffects.Copy); 361e.Effect = DragDropEffects.Copy; 509e.Effect = DragDropEffects.Copy; 518e.Effect = DragDropEffects.Copy; 523form.DoDragDropAsJson(testData, DragDropEffects.Copy); 768DragDropEffects dropEffect = ListDragSource.DoDragDrop( 770DragDropEffects.All | DragDropEffects.Link); 773if (dropEffect == DragDropEffects.Move) 804if ((e.Effect & DragDropEffects.Move) == DragDropEffects.Move) 819e.Effect = DragDropEffects.None; 826(e.AllowedEffect & DragDropEffects.Link) == DragDropEffects.Link) 831e.Effect = DragDropEffects.Link; 834(e.AllowedEffect & DragDropEffects.Link) == DragDropEffects.Link) 837e.Effect = DragDropEffects.Link; 840(e.AllowedEffect & DragDropEffects.Move) == DragDropEffects.Move) 843e.Effect = DragDropEffects.Move; 846(e.AllowedEffect & DragDropEffects.Copy) == DragDropEffects.Copy) 849e.Effect = DragDropEffects.Copy; 851else if ((e.AllowedEffect & DragDropEffects.Move) == DragDropEffects.Move) 854e.Effect = DragDropEffects.Move; 858e.Effect = DragDropEffects.None; 890if (item is not null && (e.Effect == DragDropEffects.Copy || e.Effect == DragDropEffects.Move)) 1073e.Effect = DragDropEffects.Link; 1090dragAcceptItem.DoDragDrop(data, DragDropEffects.All, _dragAcceptBmp, new Point(0, 16), false); 1099e.Effect = DragDropEffects.None; 1113e.Effect = DragDropEffects.None; 1129e.Effect = DragDropEffects.Link; 1138e.Effect = DragDropEffects.None; 1150PictureBoxDragSource.DoDragDrop(data, DragDropEffects.All, _dragImage, new Point(0, 16), false);
TrimTest (2)
Form1.cs (2)
21e.Effect = DragDropEffects.Copy; 29e.Effect = DragDropEffects.Copy;
WinFormsControlsTest (23)
DragDrop.cs (23)
102e.Effect = DragDropEffects.None; 126e.Effect = DragDropEffects.Copy; 138e.Effect = DragDropEffects.None; 151e.Effect = DragDropEffects.Copy; 183pictureBox.DoDragDrop(data, DragDropEffects.All, _nyanCatBmp, new Point(0, 96), true); 189if (e.Effect.Equals(DragDropEffects.Copy)) 226e.Effect = DragDropEffects.None; 243e.Effect = DragDropEffects.Copy; 250e.Effect = DragDropEffects.None; 264e.Effect = DragDropEffects.None; 285e.Effect = DragDropEffects.Copy; 292e.Effect = DragDropEffects.None; 306e.Effect = DragDropEffects.None; 325e.Effect = DragDropEffects.Link; 332e.Effect = DragDropEffects.None; 339e.Effect = DragDropEffects.None; 353e.Effect = DragDropEffects.None; 515e.Effect = DragDropEffects.Link; 522e.Effect = DragDropEffects.Link; 529e.Effect = DragDropEffects.Link; 546toolStripItem.DoDragDrop(data, DragDropEffects.All, _dragAcceptBmp, new Point(0, 96), true); 558toolStripItem.DoDragDrop(data, DragDropEffects.All, _nyanCatBmp, new Point(0, 96), true); 570toolStripItem.DoDragDrop(data, DragDropEffects.All, _nyanCatAscii301Bmp, new Point(0, 111), false);