2 writes to Y
System.Windows.Forms (2)
System\Windows\Forms\Input\MouseEventArgs.cs (2)
22
Y
= y;
34
Y
= location.Y;
146 references to Y
System.Windows.Forms (92)
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (1)
872
if (!r.Contains(mevent.X, mevent.
Y
))
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (34)
5742
int adjustedY = _editingPanel.Location.Y + e.
Y
;
5762
HitTestInfo hti = HitTest(me.X, me.
Y
);
5773
me.
Y
- hti.RowY,
5790
&& Math.Abs(dgvcme.
Y
- _lastMouseClickInfo.Y) <= hotDoubleClickZone.Height / 2)
5802
dgvcme.
Y
,
5862
me.
Y
- hti.RowY,
5932
dgvcme.
Y
,
6052
int y = Math.Min(e.
Y
+ _mouseBarOffset, _layout.Data.Bottom - 1);
6331
int y = Math.Min(e.
Y
+ _mouseBarOffset, _layout.Data.Bottom - 1);
10432
_currentRowSplitBar = e.
Y
;
11894
Point ptGridCoord = ConvertCellToGridCoord(e.ColumnIndex, e.RowIndex, e.X, e.
Y
);
12673
Point ptGridCoord = ConvertCellToGridCoord(e.ColumnIndex, e.RowIndex, e.X, e.
Y
);
14934
HitTestInfo hti = HitTest(me.X, me.
Y
);
15855
HitTestInfo hti = HitTest(e.X, e.
Y
);
15875
dgvcme = new DataGridViewCellMouseEventArgs(hti._col, hti._row, mouseX, e.
Y
- hti.RowY, e);
15944
HitTestInfo hti = HitTest(e.X, e.
Y
);
15959
dgvcme = new DataGridViewCellMouseEventArgs(hti._col, hti._row, mouseX, e.
Y
- hti.RowY, e);
15991
e.
Y
,
16011
e.
Y
,
16041
e.
Y
,
16061
e.
Y
,
16096
HitTestInfo hti = HitTest(e.X, e.
Y
);
16104
_ptMouseDownGridCoord = new Point(e.X, e.
Y
);
16111
DataGridViewCellMouseEventArgs dgvcme = new(hti._col, hti._row, mouseX, e.
Y
- hti.RowY, e);
16172
HitTestInfo hti = HitTest(e.X, e.
Y
);
16252
int mouseX = e.X, mouseY = e.
Y
;
16331
HitTestInfo hti = HitTest(e.X, e.
Y
);
16348
MouseEventArgs meTmp = new(e.Button, 2, e.X, e.
Y
, e.Delta);
16349
dgvcme = new DataGridViewCellMouseEventArgs(hti._col, hti._row, mouseX, e.
Y
- hti.RowY, meTmp);
16353
dgvcme = new DataGridViewCellMouseEventArgs(hti._col, hti._row, mouseX, e.
Y
- hti.RowY, e);
16412
hti = HitTest(e.X, e.
Y
);
16423
OnCellMouseUp(new DataGridViewCellMouseEventArgs(hti._col, hti._row, mouseX, e.
Y
- hti.RowY, e));
25392
_lastMouseClickInfo.Y = dgvcme.
Y
;
29177
DataGridViewCellMouseEventArgs dgvcme = new(htiToUse._col, htiToUse._row, mouseX, e.
Y
- htiToUse.RowY, e);
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (1)
558
s_mouseInContentBounds = GetContentBounds(e.RowIndex).Contains(e.X, e.
Y
);
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (3)
2927
DataGridView.CellMouseDownInContentBounds = GetContentBounds(e.RowIndex).Contains(e.X, e.
Y
);
3030
int y = e.
Y
;
3980
if (GetErrorIconBounds(e.RowIndex).Contains(e.X, e.
Y
))
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (1)
907
s_mouseInContentBounds = GetContentBounds(e.RowIndex).Contains(e.X, e.
Y
);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnDividerDoubleClickEventArgs.cs (1)
9
: base(e?.Button ?? MouseButtons.None, e?.Clicks ?? 0, e?.X ?? 0, e?.
Y
?? 0, e?.Delta ?? 0, e?.Handled ?? false)
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (1)
1686
CheckDropDownList(e.X, e.
Y
, e.RowIndex);
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (6)
696
LinkBoundsContainPoint(e.X, e.
Y
, e.RowIndex);
703
if (LinkBoundsContainPoint(e.X, e.
Y
, e.RowIndex))
722
TrackVisitedState && LinkBoundsContainPoint(e.X, e.
Y
, e.RowIndex);
756
if (LinkBoundsContainPoint(e.X, e.
Y
, e.RowIndex))
794
if (LinkBoundsContainPoint(e.X, e.
Y
, e.RowIndex))
829
if (LinkBoundsContainPoint(e.X, e.
Y
, e.RowIndex) && TrackVisitedState)
System\Windows\Forms\Controls\DataGridView\DataGridViewRowDividerDoubleClickEventArgs.cs (1)
9
: base((e.OrThrowIfNull()).Button, e.Clicks, e.X, e.
Y
, e.Delta, e.Handled)
System\Windows\Forms\Controls\Labels\LinkLabel.cs (2)
884
Link? clicked = PointInLink(e.X, e.
Y
);
913
Link? pointIn = PointInLink(e.X, e.
Y
);
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (10)
2769
SnappableControl? target = DividerInside(me.
Y
);
2775
_dividerMoveY = me.
Y
;
2786
if (DividerInside(me.
Y
) is not null)
2799
int yNew = DividerLimitMove(_targetMove!, me.
Y
);
2823
_dividerMoveY = DividerLimitMove(_targetMove!, me.
Y
);
2836
Invalidate(new Rectangle(0, me.
Y
- s_cyDivider, Size.Width, me.
Y
+ s_cyDivider));
4108
if (e.
Y
<= 1 || (size.Height - e.
Y
) <= 1)
4111
Point temp = new(e.X, e.
Y
);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (5)
2967
Point pos = FindPosition(e.X, e.
Y
);
2982
_lastMouseDown = new Point(e.X, e.
Y
);
2987
gridEntry.OnMouseClick(e.X - r.X, e.
Y
- r.Y, e.Clicks, e.Button);
3023
point = FindPosition(e.X, e.
Y
);
3055
if (onLabel && gridItem.GetLabelToolTipLocation(e.X - itemRect.X, e.
Y
- itemRect.Y) != InvalidPoint)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (4)
394
_currentMoveType = MoveTypeFromPoint(e.X, e.
Y
);
397
_dragStart = PointToScreen(new Point(e.X, e.
Y
));
418
int cursorMoveType = MoveTypeFromPoint(e.X, e.
Y
);
429
Point dragPoint = PointToScreen(new Point(e.X, e.
Y
));
System\Windows\Forms\Controls\Splitter\Splitter.cs (3)
815
SplitBegin(e.X, e.
Y
);
825
int y = e.
Y
+ Top;
826
Rectangle r = CalcSplitLine(_splitTarget, GetSplitSize(_splitTarget, e.X, e.
Y
), 0);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (6)
3316
ToolStripItem? item = GetItemAt(mea.X, mea.
Y
);
3332
Point itemRelativePoint = item.TranslatePoint(new Point(mea.X, mea.
Y
), ToolStripPointType.ToolStripCoords, ToolStripPointType.ToolStripItemCoords);
3350
ToolStripItem? item = GetItemAt(mea.X, mea.
Y
);
3388
Point itemRelativePoint = item!.TranslatePoint(new Point(mea.X, mea.
Y
), ToolStripPointType.ToolStripCoords, ToolStripPointType.ToolStripItemCoords);
3425
ToolStripItem? item = Grip.MovingToolStrip ? Grip : GetItemAt(mea.X, mea.
Y
);
3432
Point itemRelativePoint = item.TranslatePoint(new Point(mea.X, mea.
Y
), ToolStripPointType.ToolStripCoords, ToolStripPointType.ToolStripItemCoords);
System\Windows\Forms\Controls\ToolStrips\ToolStripGrip.cs (3)
120
_startLocation = TranslatePoint(new Point(mea.X, mea.
Y
), ToolStripPointType.ToolStripItemCoords, ToolStripPointType.ScreenCoords);
160
Point endLocation = TranslatePoint(new Point(mea.X, mea.
Y
), ToolStripPointType.ToolStripItemCoords, ToolStripPointType.ScreenCoords);
217
Point endLocation = TranslatePoint(new Point(mea.X, mea.
Y
), ToolStripPointType.ToolStripItemCoords, ToolStripPointType.ScreenCoords);
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.cs (1)
466
Point clickPoint = new(e.X, e.
Y
);
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.cs (4)
61
if (e.
Y
< half_height)
154
if (rect.Contains(e.X, e.
Y
))
189
if (rectUp.Contains(e.X, e.
Y
))
194
else if (rectDown.Contains(e.X, e.
Y
))
System\Windows\Forms\Input\MouseEventArgs.cs (1)
66
public Point Location => new(X,
Y
);
System\Windows\Forms\Layout\Containers\SplitContainer.cs (4)
1087
int y = e.
Y
;
1101
Rectangle r = CalcSplitLine(GetSplitterDistance(e.X, e.
Y
), 0);
1162
SplitBegin(e.X, e.
Y
);
1185
CalcSplitLine(GetSplitterDistance(e.X, e.
Y
), 0);
System.Windows.Forms.Design (21)
System\Drawing\Design\ColorEditor.ColorPalette.cs (5)
310
Point cell2D = GetCell2DFromLocationMouse(me.X, me.
Y
);
322
if (me.Button == MouseButtons.Left && Bounds.Contains(me.X, me.
Y
))
324
Point cell2D = GetCell2DFromLocationMouse(me.X, me.
Y
);
339
Point cell2D = GetCell2DFromLocationMouse(me.X, me.
Y
);
349
int cell = GetCellFromLocationMouse(me.X, me.
Y
);
System\Windows\Forms\Design\ComponentTray.cs (10)
1242
_mouseDropLocation = new Point(e.X, e.
Y
);
1265
_mouseDragStart = new Point(e.X, e.
Y
);
1312
_mouseDragEnd.Y = e.
Y
;
1341
Y = Math.Min(_mouseDragStart.Y, e.
Y
),
1343
Height = Math.Abs(e.
Y
- _mouseDragStart.Y)
2161
_mouseDragLast = PointToScreen(new Point(me.X, me.
Y
));
2194
Point newPt = PointToScreen(new Point(me.X, me.
Y
));
2691
return _hitTestedGlyph.Behavior.OnMouseDoubleClick(_hitTestedGlyph, e.Button, new Point(e.X, e.
Y
));
2705
return _hitTestedGlyph.Behavior.OnMouseDown(_hitTestedGlyph, e.Button, new Point(e.X, e.
Y
));
2719
return _hitTestedGlyph.Behavior.OnMouseMove(_hitTestedGlyph, e.Button, new Point(e.X, e.
Y
));
System\Windows\Forms\Design\DesignBindingPicker.cs (2)
1751
Point pt = new(e.X, e.
Y
);
2072
TreeViewHitTestInfo treeViewHitTestInfo = HitTest(new Point(e.X, e.
Y
));
System\Windows\Forms\Design\SelectionUIService.cs (3)
519
Point anchor = PointToScreen(new Point(me.X, me.
Y
));
606
Point screenCoord = PointToScreen(new Point(me.X, me.
Y
));
718
Point screenCoord = PointToScreen(new Point(me.X, me.
Y
));
System\Windows\Forms\Design\TabOrder.cs (1)
616
if (_tabGlyphs[i].Contains(e.X, e.
Y
))
System.Windows.Forms.Tests (25)
System\Windows\Forms\ButtonBaseTests.cs (4)
8884
Assert.Equal(expectedY, e.
Y
);
8920
Assert.Equal(expectedY, e.
Y
);
8990
Assert.Equal(expectedY, e.
Y
);
9034
Assert.Equal(expectedY, e.
Y
);
System\Windows\Forms\ControlTests.Methods.cs (8)
13479
Assert.Equal(expectedY, e.
Y
);
13515
Assert.Equal(expectedY, e.
Y
);
13589
Assert.Equal(expectedY, e.
Y
);
13633
Assert.Equal(expectedY, e.
Y
);
13814
Assert.Equal(expectedY, e.
Y
);
13850
Assert.Equal(expectedY, e.
Y
);
13920
Assert.Equal(expectedY, e.
Y
);
13964
Assert.Equal(expectedY, e.
Y
);
System\Windows\Forms\DataGridViewCellMouseEventArgsTests.cs (1)
26
Assert.Equal(localY, e.
Y
);
System\Windows\Forms\DataGridViewColumnDividerDoubleClickEventArgsTests.cs (2)
25
Assert.Equal(mouseE.
Y
, e.
Y
);
System\Windows\Forms\DataGridViewRowDividerDoubleClickEventArgsTests.cs (2)
25
Assert.Equal(mouseE.
Y
, e.
Y
);
System\Windows\Forms\HandledMouseEventArgsTests.cs (2)
21
Assert.Equal(y, e.
Y
);
37
Assert.Equal(y, e.
Y
);
System\Windows\Forms\MouseEventArgsTests.cs (1)
21
Assert.Equal(y, e.
Y
);
System\Windows\Forms\TreeNodeMouseClickEventArgsTests.cs (1)
27
Assert.Equal(y, e.
Y
);
TextBoxBaseTests.cs (4)
7267
Assert.Equal(expectedY, e.
Y
);
7303
Assert.Equal(expectedY, e.
Y
);
7377
Assert.Equal(expectedY, e.
Y
);
7421
Assert.Equal(expectedY, e.
Y
);
System.Windows.Forms.UI.IntegrationTests (8)
DragDropTests.cs (8)
650
_indexOfItemUnderMouseToDrag = ListDragSource.IndexFromPoint(e.X, e.
Y
);
651
_testOutputHelper.WriteLine($"Mouse down on drag source at position ({e.X},{e.
Y
}). Index of element under mouse: {_indexOfItemUnderMouseToDrag}");
663
e.
Y
- (dragSize.Height / 2)),
677
_testOutputHelper.WriteLine($"Mouse up on drag source at position ({e.X},{e.
Y
}).");
682
_testOutputHelper.WriteLine($"Mouse move on drag source to position ({e.X},{e.
Y
}) with buttons {e.Button}.");
687
!_dragBoxFromMouseDown.Contains(e.X, e.
Y
))
1019
_testOutputHelper.WriteLine($"Mouse down on drag source at position ({e.X},{e.
Y
}).");
1084
_testOutputHelper.WriteLine($"Mouse down on drag source at position ({e.X},{e.
Y
}).");