2 instantiations of ToolboxSnapDragDropEventArgs
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\Behavior\ToolboxItemSnapLineBehavior.cs (1)
223
return new
ToolboxSnapDragDropEventArgs
(snapDirections, offset, e);
System.Windows.Forms.Design.Tests (1)
System\Windows\Forms\Design\DesignerUtilsTests.cs (1)
530
ToolboxSnapDragDropEventArgs args =
new
(
35 references to ToolboxSnapDragDropEventArgs
System.Windows.Forms.Design (27)
System\Windows\Forms\Design\Behavior\ToolboxItemSnapLineBehavior.cs (14)
105
private
ToolboxSnapDragDropEventArgs
CreateToolboxSnapArgs(DragEventArgs e, Point mouseLoc)
108
ToolboxSnapDragDropEventArgs
.SnapDirection snapDirections =
ToolboxSnapDragDropEventArgs
.SnapDirection.None;
129
snapDirections |=
ToolboxSnapDragDropEventArgs
.SnapDirection.Left;
135
snapDirections |=
ToolboxSnapDragDropEventArgs
.SnapDirection.Right;
147
snapDirections |=
ToolboxSnapDragDropEventArgs
.SnapDirection.Top;
153
snapDirections |=
ToolboxSnapDragDropEventArgs
.SnapDirection.Bottom;
169
snapDirections |=
ToolboxSnapDragDropEventArgs
.SnapDirection.Top;
175
snapDirections |=
ToolboxSnapDragDropEventArgs
.SnapDirection.Bottom;
187
snapDirections |=
ToolboxSnapDragDropEventArgs
.SnapDirection.Left;
193
snapDirections |=
ToolboxSnapDragDropEventArgs
.SnapDirection.Right;
212
snapDirections |=
ToolboxSnapDragDropEventArgs
.SnapDirection.Left;
218
snapDirections |=
ToolboxSnapDragDropEventArgs
.SnapDirection.Top;
259
ToolboxSnapDragDropEventArgs
se = CreateToolboxSnapArgs(e, new Point(e.X - screenOffset.X, e.Y - screenOffset.Y));
System\Windows\Forms\Design\DesignerUtils.cs (7)
563
public static Rectangle GetBoundsFromToolboxSnapDragDropInfo(
ToolboxSnapDragDropEventArgs
e, Rectangle originalBounds, bool isMirrored)
572
if ((e.SnapDirections &
ToolboxSnapDragDropEventArgs
.SnapDirection.Top) != 0)
576
else if ((e.SnapDirections &
ToolboxSnapDragDropEventArgs
.SnapDirection.Bottom) != 0)
584
if ((e.SnapDirections &
ToolboxSnapDragDropEventArgs
.SnapDirection.Left) != 0)
588
else if ((e.SnapDirections &
ToolboxSnapDragDropEventArgs
.SnapDirection.Right) != 0)
596
if ((e.SnapDirections &
ToolboxSnapDragDropEventArgs
.SnapDirection.Left) != 0)
601
else if ((e.SnapDirections &
ToolboxSnapDragDropEventArgs
.SnapDirection.Right) != 0)
System\Windows\Forms\Design\OleDragDropHandler.cs (1)
139
public IComponent[] CreateTool(ToolboxItem tool, Control? parent, int x, int y, int width, int height, bool hasLocation, bool hasSize,
ToolboxSnapDragDropEventArgs
? e)
System\Windows\Forms\Design\ParentControlDesigner.cs (5)
32
private
ToolboxSnapDragDropEventArgs
_toolboxSnapDragDropEventArgs; // used to store extra info about a beh. svc. dragdrop from the toolbox
540
ToolboxSnapDragDropEventArgs
e = defaultValues["ToolboxSnapDragDropEventArgs"] as
ToolboxSnapDragDropEventArgs
;
1383
if (de is
ToolboxSnapDragDropEventArgs
)
1385
_toolboxSnapDragDropEventArgs = de as
ToolboxSnapDragDropEventArgs
;
System.Windows.Forms.Design.Tests (8)
System\Windows\Forms\Design\DesignerUtilsTests.cs (8)
511
[InlineData(0, 0, 100, 100, 10, 10,
ToolboxSnapDragDropEventArgs
.SnapDirection.Top, false, 0, 10)]
512
[InlineData(0, 0, 100, 100, 10, 10,
ToolboxSnapDragDropEventArgs
.SnapDirection.Bottom, false, 0, -90)]
513
[InlineData(0, 0, 100, 100, 10, 10,
ToolboxSnapDragDropEventArgs
.SnapDirection.Left, false, 10, 0)]
514
[InlineData(0, 0, 100, 100, 10, 10,
ToolboxSnapDragDropEventArgs
.SnapDirection.Right, false, -90, 0)]
515
[InlineData(0, 0, 100, 100, 10, 10,
ToolboxSnapDragDropEventArgs
.SnapDirection.Top, true, 0, 10)]
516
[InlineData(0, 0, 100, 100, 10, 10,
ToolboxSnapDragDropEventArgs
.SnapDirection.Right, true, -10, 0)]
524
ToolboxSnapDragDropEventArgs
.SnapDirection snapDirection,
530
ToolboxSnapDragDropEventArgs
args = new(