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