154 writes to Y
System.Drawing.Common.Tests (2)
System\Drawing\Drawing2D\GraphicsPathTests.cs (2)
2262point.Y = 1; 2290point.Y = 15;
System.Drawing.Primitives (1)
System\Drawing\Point.cs (1)
156Y += dy;
System.Windows.Forms (86)
System\Resources\ResXResourceReader.cs (1)
332pt.Y = lineInfo.LineNumber;
System\Windows\Forms\Accessibility\LabelEditUiaTextProvider.cs (2)
290clientLocation.Y = Math.Max(clientLocation.Y, clientRectangle.top); 291clientLocation.Y = Math.Min(clientLocation.Y, clientRectangle.bottom);
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (3)
284s_logPixels.Y = PInvokeCore.GetDeviceCaps(dc, GET_DEVICE_CAPS_INDEX.LOGPIXELSY); 772Y = (LogPixels.Y * y + HiMetricPerInch / 2) / HiMetricPerInch 1351Y = (HiMetricPerInch * y + (LogPixels.Y >> 1)) / LogPixels.Y
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxUiaTextProvider.cs (2)
363clientLocation.Y = Math.Max(clientLocation.Y, clientRectangle.top); 364clientLocation.Y = Math.Min(clientLocation.Y, clientRectangle.bottom);
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (2)
2333Y = Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen) 2340ptFirstDisplayedCellAddress.Y = DisplayedBandsInfo.FirstDisplayedScrollingRow;
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (22)
12616_ptMouseEnteredCell.Y = e.RowIndex; 12639_ptMouseEnteredCell.Y = -2; 15564newCurrentCell.Y += insertionCount; 16122_ptMouseDownCell.Y = hti._row; 16172_ptMouseEnteredCell.X = _ptMouseEnteredCell.Y = -2; 17405_ptCurrentCellCache.Y = -1; 17416_ptCurrentCellCache.Y = _ptCurrentCell.Y; 17424_ptCurrentCellCache.Y = -1; 18825pt.Y += Height; 25856_ptMouseDownCell.Y = -2; 26635_ptAnchorCell.Y = firstVisibleRowIndex; 26640_ptAnchorCell.Y = -1; 26801_ptCurrentCell.Y = rowIndex; 26935_ptCurrentCell.Y = rowIndex; 26945_ptAnchorCell.Y = rowIndex; 27007_ptAnchorCell.Y = rowIndex; 27094_ptCurrentCell.Y = -1; 27101_ptAnchorCell.Y = -1; 28232_ptCurrentCellCache.Y = _ptCurrentCell.Y; 28363_ptCurrentCellCache.Y = rowIndex2; 28367_ptCurrentCellCache.Y = rowIndex1; 29212_ptMouseEnteredCell.X = _ptMouseEnteredCell.Y = -2;
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (2)
2159middle.Y += (dropRect.Height % 2); 2183middle.Y += (dropRect.Height % 2);
System\Windows\Forms\Controls\DataGridView\DataGridViewUtilities.cs (9)
393ptTextLocation.Y = cellBounds.Y; 398ptTextLocation.Y = cellBounds.Y; 403ptTextLocation.Y = cellBounds.Y; 408ptTextLocation.Y = cellBounds.Y + (cellBounds.Height - sizeText.Height) / 2; 413ptTextLocation.Y = cellBounds.Y + (cellBounds.Height - sizeText.Height) / 2; 418ptTextLocation.Y = cellBounds.Y + (cellBounds.Height - sizeText.Height) / 2; 423ptTextLocation.Y = cellBounds.Bottom - sizeText.Height; 428ptTextLocation.Y = cellBounds.Bottom - sizeText.Height; 433ptTextLocation.Y = cellBounds.Bottom - sizeText.Height;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (4)
1427location.Y += rect.Y; 1430location.Y -= size.Height; 1435location.Y += rect.Height + 1; 1664pt.Y = (y - _location.Y) / (1 + RowHeight);
System\Windows\Forms\Controls\TextBox\TextBoxBase.TextBoxBaseUiaTextProvider.cs (2)
128clientLocation.Y = Math.Max(clientLocation.Y, clientRectangle.top); 129clientLocation.Y = Math.Min(clientLocation.Y, clientRectangle.bottom);
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (1)
376noMansLand.Y += ClientSize.Height + 1;
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (2)
4051newLocation.Y -= delta; 4508cursorLocation.Y += Cursor.Size.Height - currentCursor.HotSpot.Y;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (2)
1029offset.Y = -dropDownBounds.Height; 1032offset.Y = -dropDownBounds.Height;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownItem.cs (4)
308offset.Y = -dropDownBounds.Height + 1; 311offset.Y = -dropDownBounds.Height + 1; 314offset.Y = Height - 1; 318offset.Y = Height - 1;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (3)
368nextPoint.Y = _imagePadding.Top; 420nextPoint.Y = _textPadding.Top; 425nextPoint.Y = _arrowPadding.Top;
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (3)
3453toPoint.Y += currentToolStripItemLocation.Y; 3465fromPoint.Y += currentToolStripItemLocation.Y; 3480fromPoint.Y -= currentToolStripItemLocation.Y;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.cs (3)
922clientLocation.Y = row.Bounds.Y; 959cursorLoc.Y = Cursor.Position.Y; 963cursorLoc.Y += toolStripToDrag.GripRectangle.Height / 2;
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackLayout.cs (2)
194_noMansLand.Y += ToolStrip.ClientSize.Height + 1; 340itemLocation.Y = bounds.Y;
System\Windows\Forms\Controls\WebBrowser\WebBrowser.WebBrowserSite.cs (1)
49pt->Y = -1;
System\Windows\Forms\Form.cs (5)
925loc.Y -= screen.Y; 3870p.Y = (ownerRect.top + ownerRect.bottom - s.Height) / 2; 3873p.Y = screenRect.Y; 3877p.Y = screenRect.Y + screenRect.Height - s.Height; 3915p.Y = Math.Max(screenRect.Y, screenRect.Y + (screenRect.Height - Height) / 2);
System\Windows\Forms\Layout\DefaultLayout.cs (1)
96location.Y -= newSize.Height - oldBounds.Height;
System\Windows\Forms\Layout\LayoutUtils.cs (1)
436(point.Y, point.X) = (point.X, point.Y);
System\Windows\Forms\Printing\PrintPreviewControl.cs (7)
620_position.Y = _vScrollBar.Value; 629offset.Y -= Position.Y; 644lastImageSize.Y = maxImageHeight * row; 931locPos.Y = pos; 965locPos.Y = pos; 1009locPos.Y = pos; 1029locPos.Y = pos;
System\Windows\Forms\ToolTip\ToolTip.cs (2)
1334p.Y = visibleRect.top + visibleRect.Height / 2; 1946moveToLocation.Y = screen.WorkingArea.Bottom - tipSize.Height;
System.Windows.Forms.Design (56)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (6)
352editorLocation.Y += editorBounds.Y; 355editorLocation.Y -= dropDownSize.Height + 1; 359editorLocation.Y += editorBounds.Height; 376editorLocation.Y += editorBounds.Y; 379editorLocation.Y -= dropDownSize.Height + 1; 383editorLocation.Y += editorBounds.Height;
System\Drawing\Design\ColorEditor.ColorPalette.cs (4)
291SetFocus(_focus with { Y = _focus.Y - 1 }); 294SetFocus(_focus with { Y = _focus.Y + 1 }); 446newFocus.Y = 0; 456newFocus.Y = CellsDown - 1;
System\Windows\Forms\Design\Behavior\DesignerActionGlyph.cs (2)
156topRight.Y = newRect.Top; 160topRight.Y -= (GlyphImageOpened.Height - CONTROLOVERLAP_Y);
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (2)
716offset.Y = FindSmallestValidDistance(_horizontalSnapLines, _horizontalDistances, minRange, maxRange, directionOffset.Y); 723offset.Y *= -1;
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (4)
160offset.Y = _parentGridSize.Height - yDelta; 164offset.Y = -yDelta; 777newPosition.Y += _lastSnapOffset.Y; 791newPosition.Y += _lastSnapOffset.Y;
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (2)
276_parentLocation.Y -= control.Location.Y; 611mouseLoc.Y += _lastSnapOffset.Y;
System\Windows\Forms\Design\Behavior\ToolboxItemSnapLineBehavior.cs (5)
150offset.Y = _lastRectangle.Top - mouseLoc.Y; 156offset.Y = _lastRectangle.Bottom - mouseLoc.Y; 172offset.Y = _lastRectangle.Top - mouseLoc.Y; 178offset.Y = _lastRectangle.Bottom - mouseLoc.Y; 221offset.Y = _lastRectangle.Top - mouseLoc.Y;
System\Windows\Forms\Design\CommandSet.cs (20)
1043loc.Y = primaryLocation.Y + primarySize.Height - size.Height; 1051loc.Y = primarySize.Height / 2 + primaryLocation.Y - size.Height / 2; 1084loc.Y = primaryLocation.Y; 1202loc.Y -= delta; 1206loc.Y += (gridSize.Height - delta); 1357loc.Y += deltaY; 1359loc.Y -= deltaY; 2433loc.Y = (loc.Y / grid.Height) * grid.Height; 2833curLoc.Y = lastLoc.Y + lastSize.Height; 2839curLoc.Y -= grid.Height * (n - primaryIndex); 2841curLoc.Y = primaryLoc.Y; 2845curLoc.Y += grid.Height * (primaryIndex - n); 2847curLoc.Y = primaryLoc.Y; 2854curLoc.Y += grid.Height * (n - primaryIndex); 2858curLoc.Y -= grid.Height * (primaryIndex - n); 2863curLoc.Y = lastLoc.Y + lastSize.Height + nEqualDelta; 3258min.Y = loc.Y; 3268max.Y = loc.Y + size.Height; 3293parentOffset.Y -= (max.Y - min.Y) / 2; 3386parentOffset.Y = 0;
System\Windows\Forms\Design\ComponentTray.cs (3)
1312_mouseDragEnd.Y = e.Y; 1826_whiteSpace.Y = _whiteSpace.Y * 2 + 3; 1866newLoc.Y += bounds.Height + _whiteSpace.Y;
System\Windows\Forms\Design\SelectionUIHandler.cs (2)
284adjustedLoc.Y = ctlBounds.lastRequestedY; 422adjustedLoc.Y = newBounds.Y;
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (4)
472newControlPosition.Y = Table.RowCount - 1; 480newControlPosition.Y = 0; 1028position.Y = rows.Length; 1037position.Y = i;
System\Windows\Forms\Design\TreeNodeCollectionEditor.cs (2)
531Y = e.Y 574Y = e.Y
System.Windows.Forms.Tests (4)
System\Windows\Forms\DataObjectTests.cs (1)
2736Point point = new() { X = 1, Y = 1 };
System\Windows\Forms\ListViewItem.IKeyboardToolTipTests.cs (1)
714position.Y--;
System\Windows\Forms\ToolStripDropDownTests.cs (1)
1932expected.Y = Math.Max(expected.Y, SystemInformation.WorkingArea.Y);
System\Windows\Forms\TreeNode.IKeyboardToolTipTests.cs (1)
385position.Y--;
System.Windows.Forms.UI.IntegrationTests (5)
DragDropTests.cs (2)
200Y = (startCoordinates.Y - vscreen.Top) * DesktopNormalizedMax / vscreen.Height + DesktopNormalizedMax / (vscreen.Height * 2) 205Y = (endCoordinates.Y - vscreen.Top) * DesktopNormalizedMax / vscreen.Height + DesktopNormalizedMax / (vscreen.Height * 2)
RichTextBoxTests.cs (3)
42pt.Y += 2; 102pt.Y += 2; 163pt.Y += 2;
1552 references to Y
System.ComponentModel.TypeConverter (2)
System\Drawing\PointConverter.cs (2)
78intConverter.ConvertToString(context, culture, pt.Y) 87return new InstanceDescriptor(ctor, new object[] { pt.X, pt.Y });
System.Drawing.Common.Tests (11)
mono\System.Drawing\GraphicsTests.cs (1)
2954Assert.Equal(i, pts[i].Y);
System\Drawing\RegionTests.cs (10)
1396Assert.Equal(expected, region.IsVisible(point.X, point.Y)); 1397Assert.Equal(expected, region.IsVisible(point.X, point.Y, s_graphic)); 1398Assert.Equal(expected, region.IsVisible(point.X, point.Y, disposedGraphics)); 1399Assert.Equal(expected, region.IsVisible(point.X, point.Y, null)); 1401Assert.Equal(expected, region.IsVisible(point.X, point.Y, s_graphic)); 1402Assert.Equal(expected, region.IsVisible(point.X, point.Y, disposedGraphics)); 1403Assert.Equal(expected, region.IsVisible(point.X, point.Y, null)); 1404Assert.Equal(expected, region.IsVisible((float)point.X, point.Y, s_graphic)); 1405Assert.Equal(expected, region.IsVisible((float)point.X, point.Y, disposedGraphics)); 1406Assert.Equal(expected, region.IsVisible((float)point.X, point.Y, null));
System.Drawing.Primitives (16)
System\Drawing\Point.cs (11)
79public static implicit operator PointF(Point p) => new PointF(p.X, p.Y); 84public static explicit operator Size(Point p) => new Size(p.X, p.Y); 98/// <see cref='System.Drawing.Point.X'/> and <see cref='System.Drawing.Point.Y'/> properties of the two 101public static bool operator ==(Point left, Point right) => left.X == right.X && left.Y == right.Y; 105/// <see cref='System.Drawing.Point.X'/> or <see cref='System.Drawing.Point.Y'/> properties of the two 113public static Point Add(Point pt, Size sz) => new Point(unchecked(pt.X + sz.Width), unchecked(pt.Y + sz.Height)); 118public static Point Subtract(Point pt, Size sz) => new Point(unchecked(pt.X - sz.Width), unchecked(pt.Y - sz.Height)); 146public override readonly int GetHashCode() => HashCode.Combine(X, Y); 163public void Offset(Point p) => Offset(p.X, p.Y); 168public override readonly string ToString() => $"{{X={X},Y={Y}}}";
System\Drawing\Rectangle.cs (4)
42y = location.Y; 64Y = value.Y; 229public readonly bool Contains(Point pt) => Contains(pt.X, pt.Y); 326public void Offset(Point pos) => Offset(pos.X, pos.Y);
System\Drawing\Size.cs (1)
32height = pt.Y;
System.Private.Windows.Core (2)
System\Private\Windows\Core\BinaryFormat\BinaryFormatWriter.cs (1)
147value.Y).Write(writer);
Windows\Win32\Foundation\LPARAM.cs (1)
28public static explicit operator LPARAM(Point value) => MAKELPARAM(value.X, value.Y);
System.Windows.Forms (934)
System\Resources\ResXDataNode.cs (4)
375string newMessage = string.Format(SR.NotSupported, typeName, dataNodeInfo.ReaderPosition.Y, dataNodeInfo.ReaderPosition.X, nse.Message); 376XmlException xml = new(newMessage, nse, dataNodeInfo.ReaderPosition.Y, dataNodeInfo.ReaderPosition.X); 387dataNodeInfo.ReaderPosition.Y, 392new XmlException(newMessage, null, dataNodeInfo.ReaderPosition.Y, dataNodeInfo.ReaderPosition.X));
System\Resources\ResXResourceReader.cs (5)
379string newMessage = string.Format(SR.SerializationException, reader[ResXResourceWriter.TypeStr], pt.Y, pt.X, se.Message); 380XmlException xml = new(newMessage, se, pt.Y, pt.X); 386string newMessage = string.Format(SR.InvocationException, reader[ResXResourceWriter.TypeStr], pt.Y, pt.X, tie.InnerException?.Message); 387XmlException xml = new(newMessage, tie.InnerException, pt.Y, pt.X); 403XmlException xmlEx = new(e.Message, e, pt.Y, pt.X);
System\Windows\Forms\Accessibility\LabelEditUiaTextProvider.cs (2)
290clientLocation.Y = Math.Max(clientLocation.Y, clientRectangle.top); 291clientLocation.Y = Math.Min(clientLocation.Y, clientRectangle.bottom);
System\Windows\Forms\ActiveX\AxHost.cs (3)
1097sz.Height = phm.Y; 3259Bounds = new Rectangle(location.X, location.Y, ocxExtent.Width, ocxExtent.Height); 3266Bounds = new Rectangle(location.X, location.Y, newSize.Width, newSize.Height);
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (8)
466PInvoke.SetViewportOrgEx(hdcDraw, p1.X, p1.Y, &pVp); 467PInvoke.SetViewportExtEx(hdcDraw, p2.X, p2.Y, (SIZE*)&sViewportExt); 488PInvoke.SetWindowOrgEx(hdcDraw, pW.X, pW.Y, lppt: null); 490PInvoke.SetViewportOrgEx(hdcDraw, pVp.X, pVp.Y, lppt: null); 702pSizel->Height = pt.Y; 772Y = (LogPixels.Y * y + HiMetricPerInch / 2) / HiMetricPerInch 1351Y = (HiMetricPerInch * y + (LogPixels.Y >> 1)) / LogPixels.Y
System\Windows\Forms\Control.cs (7)
1496if ((r.left <= p.X && p.X < r.right && r.top <= p.Y && p.Y < r.bottom) || PInvoke.GetCapture() == HWND) 2422set => SetBounds(value.X, value.Y, _width, _height, BoundsSpecified.Location); 7920cliprect.Offset(-offs.X, -offs.Y); 8728viewportOrg.Y, 8730viewportOrg.Y + Height); 8756clientOffset = new(clientOffset.X - windowRect.left, clientOffset.Y - windowRect.top);
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (1)
399imageBounds.Y = imageStart.Y + 1;
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxUiaTextProvider.cs (2)
363clientLocation.Y = Math.Max(clientLocation.Y, clientRectangle.top); 364clientLocation.Y = Math.Min(clientLocation.Y, clientRectangle.bottom);
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (8)
1594OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, Ptlc.X, Ptlc.Y, 0)); 1611OnMouseDown(new MouseEventArgs(MouseButtons.Middle, 1, Ptmc.X, Ptmc.Y, 0)); 1628OnMouseDown(new MouseEventArgs(MouseButtons.Right, 1, Ptrc.X, Ptrc.Y, 0)); 1642OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, Ptl.X, Ptl.Y, 0)); 1687OnMouseDown(new MouseEventArgs(MouseButtons.Middle, 1, P.X, P.Y, 0)); 1704OnMouseDown(new MouseEventArgs(MouseButtons.Right, 1, Pt.X, Pt.Y, 0)); 1724OnMouseUp(new MouseEventArgs(MouseButtons.Right, 1, ptRBtnUp.X, ptRBtnUp.Y, 0)); 1746OnMouseMove(new MouseEventArgs(MouseButtons, 0, point.X, point.Y, 0));
System\Windows\Forms\Controls\ComboBox\ComboBox.FlatComboAdapter.cs (3)
183new(middle.X - s_offsetPixels, middle.Y - 1), 184new(middle.X + s_offsetPixels + 1, middle.Y - 1), 185new(middle.X, middle.Y + s_offsetPixels)
System\Windows\Forms\Controls\DataGridView\DataGridView.AccessibleObject.cs (1)
161HitTestInfo hti = owner.HitTest(pt.X, pt.Y);
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (28)
1140if (!IsSharedCellReadOnly(dataGridViewCell, _ptCurrentCell.Y)) 1701if (_ptCurrentCell.X == -1 && _ptCurrentCell.Y == -1) 1706Debug.Assert(_ptCurrentCell.X >= 0 && _ptCurrentCell.Y >= 0); 1708Debug.Assert(_ptCurrentCell.Y < Rows.Count); 1709DataGridViewRow dataGridViewRow = Rows[_ptCurrentCell.Y]; // un-sharing row 1714if ((value is not null && (value.RowIndex != _ptCurrentCell.Y || value.ColumnIndex != _ptCurrentCell.X)) 1776Debug.Assert(_ptCurrentCell.Y >= 0 && _ptCurrentCell.Y < Rows.Count); 1777DataGridViewRow dataGridViewRow = Rows.SharedRow(_ptCurrentCell.Y); 1780Debug.Assert(IsSharedCellVisible(dataGridViewCell, _ptCurrentCell.Y)); 1794Debug.Assert(_ptCurrentCell.Y != -1); 1797bool previousVisibleRowExists = (Rows.GetPreviousRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible) != -1); 1812Debug.Assert(_ptCurrentCell.Y != -1); 1815bool nextVisibleRowExists = (Rows.GetNextRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible) != -1); 1830Debug.Assert(_ptCurrentCell.Y != -1); 1848Debug.Assert(_ptCurrentCell.Y >= 0); 1849Debug.Assert(_ptCurrentCell.Y < Rows.Count); 1851return Rows[_ptCurrentCell.Y]; 2281return Rows[firstDisplayedCellAddress.Y].Cells[firstDisplayedCellAddress.X]; // un-shares the row of first displayed cell 2335if (ptFirstDisplayedCellAddress.Y == -1) 2352if (ptFirstDisplayedCellAddress.Y >= 0) 2842=> _ptCurrentCell.X == -1 ? null : CurrentCellInternal.GetInheritedStyleInternal(_ptCurrentCell.Y); 2893if (RowHeadersVisible && ShowEditingIcon && _ptCurrentCell.Y >= 0) 2896InvalidateCellPrivate(-1, _ptCurrentCell.Y); 3887Debug.Assert(_ptCurrentCell.Y >= 0); 3888InvalidateCellPrivate(-1, _ptCurrentCell.Y); 3895Debug.Assert(_ptCurrentCell.Y >= 0); 3896InvalidateCellPrivate(-1, _ptCurrentCell.Y);
System\Windows\Forms\Controls\DataGridView\DataGridView.DataConnection.cs (4)
652if (_owner.CurrentCellAddress.Y == e.NewIndex && _owner.IsCurrentCellInEditMode) 720_owner.CurrentCellAddress.Y != _owner.NewRowIndex && // condition 5. 770if (_owner.CurrentCellAddress.Y != _owner.NewRowIndex || _owner.IsCurrentRowDirty) 1261if (rowIndex == _owner.CurrentCellAddress.Y && columnIndex == _owner.CurrentCellAddress.X)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (541)
28if (cellAddress.Y < 0 || cellAddress.Y >= Rows.Count) 33int visibleRowIndex = Rows.GetRowCount(DataGridViewElementStates.Visible, 0, cellAddress.Y); 2580Debug.Assert(_ptCurrentCell.Y >= 0 && _ptCurrentCell.Y < Rows.Count); 2586if (IsSharedCellReadOnly(dataGridViewCell, _ptCurrentCell.Y) || !ColumnEditable(_ptCurrentCell.X)) 2602DataGridViewCellCancelEventArgs dgvcce = new(_ptCurrentCell.X, _ptCurrentCell.Y); 2619if (IsSharedCellReadOnly(dataGridViewCell, _ptCurrentCell.Y) || !ColumnEditable(_ptCurrentCell.X)) 2641DataGridViewCellStyle dataGridViewCellStyle = dataGridViewCell.GetInheritedStyle(inheritedCellStyle: null, _ptCurrentCell.Y, includeColors: true); 2686((IDataGridViewEditingControl)EditingControl).EditingControlRowIndex = _ptCurrentCell.Y; 2723InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 3044Debug.Assert(_ptCurrentCell.Y != -1); 3105_ptCurrentCell.Y, 3130InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 3209if (currentCellDirty || _ptCurrentCell.Y == -1 || _ptCurrentCell.X == -1) 3237if (_ptCurrentCell.Y > -1) 3239InvalidateRowPrivate(_ptCurrentCell.Y); 3243DataGridViewCellStyle dataGridViewCellStyle = dataGridViewCell.GetInheritedStyle(inheritedCellStyle: null, _ptCurrentCell.Y, includeColors: true); 3260if (discardNewRow && _ptCurrentCell.Y == NewRowIndex - 1) 3268if (!IsCurrentRowDirty && _ptCurrentCell.Y == NewRowIndex - 1 && _dataGridViewState1[State1_NewRowCreatedByEditing]) 3356if ((DataConnection.CurrencyManager?.Count ?? 0) <= _ptCurrentCell.Y) 3771OnCellLeave(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y); 3781OnRowLeave(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y); 3792if (_ptCurrentCell.X > -1 && _ptCurrentCell.Y > -1) 3794InvalidateCellPrivate(columnIndex: _ptCurrentCell.X, rowIndex: _ptCurrentCell.Y); 3807if (OnCellValidating(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y, context)) 3819_ptCurrentCell.Y, 3831OnCellEnter(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y); 3842_ptCurrentCell.Y, 3857OnCellValidated(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y); 3884if (OnCellValidating(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y, context)) 3894_ptCurrentCell.Y, 3926_ptCurrentCell.Y, 3965OnCellValidated(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y); 4032int rowIndex = _ptCurrentCell.Y; 4076fireRowLeave: _ptCurrentCell.Y != rowIndex, 4077fireRowEnter: _ptCurrentCell.Y != rowIndex, 4086if (_ptCurrentCell.Y != rowIndex && _ptCurrentCell.Y != -1) 4090int rowIndexTmp = _ptCurrentCell.Y; 4141forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 5480Debug.Assert(_ptCurrentCell.Y == NewRowIndex); 5742int adjustedY = _editingPanel.Location.Y + e.Y; 5746adjustedY += EditingControl.Location.Y; 6173int curRowIndex = _ptCurrentCell.Y; 6218if (curRowIndex != _ptCurrentCell.Y || curColIndex != _ptCurrentCell.X) 6242InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 6269InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 8600if (_ptAnchorCell.Y != -1 8601&& (Rows.GetRowState(_ptAnchorCell.Y) & DataGridViewElementStates.Frozen) != 0 8638if (_ptAnchorCell.Y != -1 8639&& ((Rows.GetRowState(_ptAnchorCell.Y) & DataGridViewElementStates.Frozen) == 0 8820if (((_ptAnchorCell.Y != -1 && (Rows.GetRowState(_ptAnchorCell.Y) & DataGridViewElementStates.Frozen) == 0) 8821|| (_ptCurrentCell.Y != -1 && (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Frozen) == 0)) 9636HitTestInfo hti = HitTest(ptMouse.X, ptMouse.Y); 9637int mouseX = ptMouse.X, mouseY = ptMouse.Y; 9659ptMouse.Y - yOffset - (yOffset / Math.Abs(yOffset))) 9689_uneditedFormattedValue = dataGridViewCell.GetFormattedValue(_ptCurrentCell.Y, ref dataGridViewCellStyle, DataGridViewDataErrorContexts.Formatting); 9700dataGridViewCell = Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X]; // un-share the edited cell 9711_ptCurrentCell.Y, 9730object? initialFormattedValue = dataGridViewCell.GetFormattedValue(_ptCurrentCell.Y, ref dataGridViewCellStyle, DataGridViewDataErrorContexts.Formatting); 9735dataGridViewCell.InitializeEditingControl(_ptCurrentCell.Y, initialFormattedValue, dataGridViewCellStyle); 9743_ptCurrentCell.Y, 10394&& (includeNewRow || !AllowUserToAddRowsInternal || firstDisplayedCellAddress.Y != Rows.Count - 1)) 10398firstDisplayedCellAddress.Y, 11905HitTestInfo hti = HitTest(ptGridCoord.X, ptGridCoord.Y); 11913Debug.Assert(_ptMouseDownCell.Y == hti._row); 11977BeginRowResize(ptGridCoord.Y, hti._mouseBarOffset, rowIndex); 12046BeginColumnHeadersResize(ptGridCoord.Y, hti._mouseBarOffset); 12071if (_ptCurrentCell.X >= 0 && (_ptCurrentCell.X != hti._col || _ptCurrentCell.Y != hti._row)) 12076forCurrentCellChange: _ptCurrentCell.X != hti._col || _ptCurrentCell.Y != hti._row, 12077forCurrentRowChange: _ptCurrentCell.Y != hti._row)) 12159int oldEdgeRowIndex = _ptCurrentCell.Y; 12169_ptAnchorCell.Y, 12349int oldEdgeRowIndex = _ptCurrentCell.Y; 12359_ptAnchorCell.Y, 12413&& _ptAnchorCell.Y > -1 && (Rows.GetRowState(_ptAnchorCell.Y) & DataGridViewElementStates.Selected) != 0) 12460if (hti._row >= _ptAnchorCell.Y) 12462SelectRowRange(_ptAnchorCell.Y, hti._row, true); 12466SelectRowRange(hti._row, _ptAnchorCell.Y, true); 12555int oldEdgeRowIndex = _ptCurrentCell.Y; 12565_ptAnchorCell.Y, 12682&& _ptMouseDownCell.Y == -1 12688HitTestInfo hti = HitTest(ptGridCoord.X, ptGridCoord.Y); 12704|| Math.Abs(_ptMouseDownGridCoord.Y - ptGridCoord.Y) >= s_dragSize.Height) 12769int oldEdgeRowIndex = _ptCurrentCell.Y; 12770if ((hti._col != _ptCurrentCell.X || hti._row != _ptCurrentCell.Y) 12789_ptAnchorCell.Y, 12793if (hti._col != _ptCurrentCell.X || hti._row != _ptCurrentCell.Y) 12828&& _ptCurrentCell.Y == dataGridViewCell.RowIndex 13707int oldCurrentCellY = _ptCurrentCell.Y; 13713fireRowLeave: rowIndex != _ptCurrentCell.Y, 13714fireRowEnter: rowIndex != _ptCurrentCell.Y, 13872_ptCurrentCell.Y, 14132if (_ptCurrentCell.X != -1 && hti._col != _ptCurrentCell.X && !CommitEditForOperation(hti._col, _ptCurrentCell.Y, true)) 14216if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(hti._col)) 14223_ptCurrentCell.Y, 14449&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.ReadOnly) == 0 14550&& _ptMouseDownCell.Y == rowIndex 14552|| _ptMouseDownCell.Y == -1 14553|| (columnIndex == _ptCurrentCell.X && rowIndex == _ptCurrentCell.Y)))) 14584InvalidateCellPrivate(-1, _ptCurrentCell.Y); 14587if (IsCurrentCellDirty && NewRowIndex == _ptCurrentCell.Y) 14789if (elementState == DataGridViewElementStates.Visible && _ptCurrentCell.Y == rowIndex) 14797Debug.Assert(DataConnection.CurrencyManager.Position == _ptCurrentCell.Y); 14811if (_ptCurrentCell.Y == rowIndex 14850&& _ptCurrentCell.Y == dataGridViewCell.RowIndex 15028_ptCurrentCell.Y, 15036OnCellEnter(ref dataGridViewCell, _ptCurrentCell.X, _ptCurrentCell.Y); 15061InvalidateCellPrivate(columnIndex: _ptCurrentCell.X, rowIndex: _ptCurrentCell.Y); 15070InvalidateCellPrivate(columnIndex: _ptCurrentCell.X, rowIndex: _ptCurrentCell.Y); 15195InvalidateCell(_ptCurrentCell.X, _ptCurrentCell.Y); 15241ScrollIntoView(_ptCurrentCell.X, _ptCurrentCell.Y, forCurrentCellChange: false); 15280newCurrentCell.Y, 15313if (lastInsertion && newCurrentCell.Y != -1) 15318newCurrentCell.Y, 15353if (newCurrentCell.Y != -1) 15358newCurrentCell.Y, 15417_ptCurrentCell.Y); 15534if (_ptCurrentCell.Y != -1 && rowIndexInserted <= _ptCurrentCell.Y) 15536newCurrentCell = new Point(_ptCurrentCell.X, _ptCurrentCell.Y + insertionCount); 15562if (newCurrentCell.Y != -1) 15617if (_ptCurrentCell.Y != -1 && rowIndexInserted <= _ptCurrentCell.Y) 15619newCurrentCell = new Point(_ptCurrentCell.X, _ptCurrentCell.Y + dataGridViewRows.Length); 15686if (dataGridViewCell.KeyDownUnsharesRowInternal(e, _ptCurrentCell.Y)) 15689_ = Rows[_ptCurrentCell.Y]; 15690CurrentCellInternal.OnKeyDownInternal(e, _ptCurrentCell.Y); 15694dataGridViewCell.OnKeyDownInternal(e, _ptCurrentCell.Y); 15745if (dataGridViewCell.KeyPressUnsharesRowInternal(e, _ptCurrentCell.Y)) 15748_ = Rows[_ptCurrentCell.Y]; 15749CurrentCellInternal.OnKeyPressInternal(e, _ptCurrentCell.Y); 15753dataGridViewCell.OnKeyPressInternal(e, _ptCurrentCell.Y); 15779if (dataGridViewCell.KeyUpUnsharesRowInternal(e, _ptCurrentCell.Y)) 15782_ = Rows[_ptCurrentCell.Y]; 15783CurrentCellInternal.OnKeyUpInternal(e, _ptCurrentCell.Y); 15787dataGridViewCell.OnKeyUpInternal(e, _ptCurrentCell.Y); 15821OnCellLeave(ref dataGridViewCell, _ptCurrentCell.X, _ptCurrentCell.Y); 15827OnRowLeave(ref dataGridViewCell, _ptCurrentCell.X, _ptCurrentCell.Y); 15835if (_ptCurrentCell.X > -1 && _ptCurrentCell.Y > -1) 15837InvalidateCellPrivate(columnIndex: _ptCurrentCell.X, rowIndex: _ptCurrentCell.Y); 15853InvalidateCell(_ptCurrentCell.X, _ptCurrentCell.Y); 15877&& _ptMouseDownCell.Y == hti._row 15880|| _ptMouseDownCell.Y == -1 15881|| (_ptMouseDownCell.X == _ptCurrentCell.X && _ptMouseDownCell.Y == _ptCurrentCell.Y))) 15965if (_ptMouseDownCell.X == hti._col && _ptMouseDownCell.Y == hti._row) 16111Debug.Assert(_ptMouseDownCell.Y != -2); 16166&& _ptMouseEnteredCell.Y >= -1 && _ptMouseEnteredCell.Y < Rows.Count) 16168OnCellMouseLeave(new(_ptMouseEnteredCell.X, _ptMouseEnteredCell.Y)); 16378&& _ptMouseDownCell.Y == hti._row 16870&& !Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X].ReadOnly) // Un-shares the row 16908newCurrentCell.Y, 16954if (newCurrentCell.Y != -1) 16959newCurrentCell.Y, 17073newCurrentCell = new Point(newX, (newX == -1) ? -1 : _ptCurrentCell.Y); 17260if (_ptCurrentCell.Y != -1 && rowIndexDeleted <= _ptCurrentCell.Y) 17263if (rowIndexDeleted == _ptCurrentCell.Y) 17284Debug.Assert(rowIndexDeleted < _ptCurrentCell.Y); 17285newY = _ptCurrentCell.Y - 1; 17289if (rowIndexDeleted == _ptCurrentCell.Y) 17399if (!IsInnerCellOutOfBounds(_ptCurrentCellCache.X, _ptCurrentCellCache.Y)) 17401SetCurrentCellAddressCore(_ptCurrentCellCache.X, _ptCurrentCellCache.Y, false, false, false); 17411if (_ptCurrentCell.X == dataGridViewRow.Index && _ptCurrentCell.Y == columnIndex) 17416_ptCurrentCellCache.Y = _ptCurrentCell.Y; 17957if (dataGridViewColumn is not null && hti._row != _ptCurrentCell.Y) 17960int oldCurrentCellY = _ptCurrentCell.Y; 17967fireRowLeave: hti._row != _ptCurrentCell.Y, 17968fireRowEnter: hti._row != _ptCurrentCell.Y, 18056&& _ptAnchorCell.Y > -1 18057&& (Rows.GetRowState(_ptAnchorCell.Y) & DataGridViewElementStates.Selected) != 0) 18113if (hti._row >= _ptAnchorCell.Y) 18115SelectRowRange(_ptAnchorCell.Y, hti._row, true); 18119SelectRowRange(hti._row, _ptAnchorCell.Y, true); 18131if (hti._row != _ptCurrentCell.Y) 18149else if (_ptCurrentCell.Y != -1) 18154_ptCurrentCell.Y, 18411if (_ptCurrentCell.Y != -1 18412&& hti._row != _ptCurrentCell.Y 18490if (_ptCurrentCell.Y != -1 && hti._row != _ptCurrentCell.Y) 18687if (e.StateChanged == DataGridViewElementStates.ReadOnly && rowIndex == _ptCurrentCell.Y && !_dataGridViewOper[OperationInReadOnlyChange]) 18707if (_ptCurrentCell.X != -1 && dataGridViewRow.Index == _ptCurrentCell.Y && EditingControl is not null) 18836if (pt.Y < 0 && step < 0) 18838Invalidate(new Rectangle(new Point(0, -pt.Y), 18843if (pt.Y > rect.Bottom && step > 0) 18846new Size(ClientSize.Width, ClientSize.Height - (pt.Y - rect.Bottom) - step))); 18993_ptCurrentCell.Y, 19074if (OnRowValidating(ref dataGridViewCellTmp, _ptCurrentCell.X, _ptCurrentCell.Y)) 19086OnRowValidated(ref dataGridViewCellTmp, _ptCurrentCell.X, _ptCurrentCell.Y); 19089if (DataSource is not null && _ptCurrentCell.X >= 0 && AllowUserToAddRowsInternal && NewRowIndex == _ptCurrentCell.Y) 19092int rowIndex = Rows.GetPreviousRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 19813Debug.Assert(dataGridViewCell.RowIndex == _ptCurrentCell.Y || dataGridViewCell.RowIndex == -1); 19832Rectangle cellBounds = new(leftEdge, GetRowYFromIndex(_ptCurrentCell.Y), 19833Columns[_ptCurrentCell.X].Width, Rows.SharedRow(_ptCurrentCell.Y).GetHeight(_ptCurrentCell.Y)); 19847if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Frozen) == 0) 19873bool isFirstDisplayedRow = FirstDisplayedRowIndex == _ptCurrentCell.Y; 20169if (_ptCurrentCell.Y != -1) 20171nextVisibleRowIndex = Rows.GetNextRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 20218Debug.Assert(_ptAnchorCell.Y >= 0); 20220int oldEdgeRowIndex = _ptCurrentCell.Y; 20231_ptAnchorCell.Y, 20350int oldEdgeRowIndex = _ptCurrentCell.Y; 20361_ptAnchorCell.Y, 20467if (_ptAnchorCell.Y == -1 || _ptCurrentCell.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20474Debug.Assert(_ptAnchorCell.Y >= 0); 20475SelectRowRange(_ptAnchorCell.Y, lastVisibleRowIndex, true); 20495SetSelectedRowCore(_ptCurrentCell.Y, false); 20598if (nextVisibleRowIndex >= _ptAnchorCell.Y) 20600SelectRowRange(_ptAnchorCell.Y, nextVisibleRowIndex, true); 20604SelectRowRange(nextVisibleRowIndex, _ptAnchorCell.Y, true); 20703Debug.Assert(_ptAnchorCell.Y >= 0); 20704if (_ptAnchorCell.Y == -1 || _ptCurrentCell.Y == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20710if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 20713SelectRowRange(_ptAnchorCell.Y, lastVisibleRowIndex, true); 20718int oldEdgeRowIndex = _ptCurrentCell.Y; 20723_ptAnchorCell.Y, 20741if (_ptCurrentCell.Y == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20747if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 20749SetSelectedRowCore(_ptCurrentCell.Y, false); 20754SetSelectedCellCore(_ptCurrentCell.X, _ptCurrentCell.Y, false); 20793if (_ptCurrentCell.Y == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20799if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 20853if (_ptCurrentCell.Y == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 20859if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 20864if (_ptAnchorCell.Y == -1) 20870if (nextVisibleRowIndex >= _ptAnchorCell.Y) 20872SelectRowRange(_ptAnchorCell.Y, nextVisibleRowIndex, true); 20876SelectRowRange(nextVisibleRowIndex, _ptAnchorCell.Y, true); 20889int oldEdgeRowIndex = _ptCurrentCell.Y; 20900_ptAnchorCell.Y, 20951if (_ptCurrentCell.Y == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 20957if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21118int oldEdgeRowIndex = _ptCurrentCell.Y; 21123_ptAnchorCell.Y, 21166if (_ptCurrentCell.Y > -1 21167&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21170SelectRowRange(_ptCurrentCell.Y, lastVisibleRowIndex, select: true); 21175int oldEdgeRowIndex = _ptCurrentCell.Y; 21180_ptAnchorCell.Y, 21187if (_ptCurrentCell.Y > -1 21188&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21204if (_ptCurrentCell.Y > -1 21205&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21301int oldEdgeRowIndex = _ptCurrentCell.Y; 21311_ptAnchorCell.Y, 21373if (MultiSelect && _ptCurrentCell.Y >= 0) 21375if (_ptAnchorCell.Y == -1) 21380SelectRowRange(_ptAnchorCell.Y, lastVisibleRowIndex, true); 21468int rowIndex = _ptCurrentCell.Y; 21512Debug.Assert(_ptCurrentCell.Y != -1); 21515|| IsSharedCellReadOnly(CurrentCellInternal, _ptCurrentCell.Y) 21519&& !IsSharedCellReadOnly(CurrentCellInternal, _ptCurrentCell.Y) 21522bool success = ScrollIntoView(_ptCurrentCell.X, _ptCurrentCell.Y, forCurrentCellChange: false); 21592int oldEdgeRowIndex = _ptCurrentCell.Y; 21597_ptAnchorCell.Y, 21640if (_ptCurrentCell.Y > -1 21641&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21644SelectRowRange(firstVisibleRowIndex, _ptAnchorCell.Y, select: true); 21649int oldEdgeRowIndex = _ptCurrentCell.Y; 21654_ptAnchorCell.Y, 21661if (_ptCurrentCell.Y > -1 21662&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21678if (_ptCurrentCell.Y > -1 21679&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21780int oldEdgeRowIndex = _ptCurrentCell.Y; 21790_ptAnchorCell.Y, 21894&& !IsSharedCellReadOnly(dataGridViewCell, _ptCurrentCell.Y) 21911bool success = ScrollIntoView(_ptCurrentCell.X, _ptCurrentCell.Y, false); 22050if (CurrentCell is null || _ptCurrentCell.X == -1 || _ptCurrentCell.Y == -1) 22139if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22144if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22153int oldEdgeRowIndex = _ptCurrentCell.Y; 22163_ptAnchorCell.Y, 22170SetSelectedCellCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true); 22173success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 22200if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22205if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22211SetSelectedCellCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true); 22212success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22250if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22255if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22282success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 22309if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22314if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22321success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22359if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22396int oldEdgeRowIndex = _ptCurrentCell.Y; 22406_ptAnchorCell.Y, 22413SetSelectedCellCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true); 22417success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 22444if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22462SetSelectedCellCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true); 22465success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22501if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22506if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22511success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22560if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22567int oldEdgeRowIndex = _ptCurrentCell.Y; 22577_ptAnchorCell.Y, 22582_ptCurrentCell.Y, 22590if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22595if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22601SetSelectedCellCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true); 22604_ptCurrentCell.Y, 22635if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, forCurrentCellChange: true)) 22640if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22646SetSelectedCellCore(firstVisibleColumnIndex, _ptCurrentCell.Y, selected: true); 22649_ptCurrentCell.Y, 22685if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22690if (_ptAnchorCell.X == -1 || _ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22698success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, false, false, false); 22703if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22715success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22738if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22743if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22750success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22778if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22797int oldEdgeRowIndex = _ptCurrentCell.Y; 22802_ptAnchorCell.Y, 22807success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, false, false, false); 22812if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22829SetSelectedCellCore(_ptCurrentCell.X, _ptCurrentCell.Y, false); 22830SetSelectedCellCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true); 22833success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22856if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22874SetSelectedCellCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true); 22877success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22901if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22906if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22911success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22940if (_ptCurrentCell.Y == -1) 22950nextScreenVisibleRowIndex = _ptCurrentCell.Y; 22966_ptCurrentCell.Y, 23042Debug.Assert(_ptAnchorCell.Y >= 0); 23044int oldEdgeRowIndex = _ptCurrentCell.Y; 23045if (_ptAnchorCell.Y == -1) 23054_ptAnchorCell.Y, 23082Debug.Assert(_ptAnchorCell.Y >= 0); 23083if (_ptAnchorCell.Y == -1) 23088if (_ptAnchorCell.Y < nextScreenVisibleRowIndex) 23090SelectRowRange(_ptAnchorCell.Y, nextScreenVisibleRowIndex, true); 23094SelectRowRange(nextScreenVisibleRowIndex, _ptAnchorCell.Y, true); 23118Debug.Assert(_ptAnchorCell.Y >= 0); 23119if (_ptAnchorCell.Y == -1) 23124if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23127if (_ptAnchorCell.Y < nextScreenVisibleRowIndex) 23129SelectRowRange(_ptAnchorCell.Y, nextScreenVisibleRowIndex, true); 23133SelectRowRange(nextScreenVisibleRowIndex, _ptAnchorCell.Y, true); 23139int oldEdgeRowIndex = _ptCurrentCell.Y; 23144_ptAnchorCell.Y, 23151if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23201if (_ptCurrentCell.Y == -1) 23211previousScreenVisibleRowIndex = _ptCurrentCell.Y; 23301Debug.Assert(_ptAnchorCell.Y >= 0); 23303int oldEdgeRowIndex = _ptCurrentCell.Y; 23313_ptAnchorCell.Y, 23340Debug.Assert(_ptAnchorCell.Y >= 0); 23341if (_ptAnchorCell.Y == -1) 23346if (_ptAnchorCell.Y < previousScreenVisibleRowIndex) 23348SelectRowRange(_ptAnchorCell.Y, previousScreenVisibleRowIndex, true); 23352SelectRowRange(previousScreenVisibleRowIndex, _ptAnchorCell.Y, true); 23376Debug.Assert(_ptAnchorCell.Y >= 0); 23377if (_ptAnchorCell.Y == -1) 23382if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23385if (_ptAnchorCell.Y < previousScreenVisibleRowIndex) 23387SelectRowRange(_ptAnchorCell.Y, previousScreenVisibleRowIndex, true); 23391SelectRowRange(previousScreenVisibleRowIndex, _ptAnchorCell.Y, true); 23397int oldEdgeRowIndex = _ptCurrentCell.Y; 23402_ptAnchorCell.Y, 23409if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23518if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23523if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23531int oldEdgeRowIndex = _ptCurrentCell.Y; 23541_ptAnchorCell.Y, 23548SetSelectedCellCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true); 23551success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 23578if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23583if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23589SetSelectedCellCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true); 23590success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 23628if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23633if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23660success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 23687if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23692if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23699success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 23737if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23742if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23781int oldEdgeRowIndex = _ptCurrentCell.Y; 23786_ptAnchorCell.Y, 23793SetSelectedCellCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true); 23797success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 23824if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23842SetSelectedCellCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true); 23845success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 23881if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23886if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23891success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 23938if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 23943if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 23957int oldEdgeRowIndex = _ptCurrentCell.Y; 23962_ptAnchorCell.Y, 23965success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, false, false, false); 23971SetSelectedCellCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true); 23972success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 23995if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24000if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24006SetSelectedCellCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true); 24007success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24033if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24038if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24053success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, false, false, false); 24060success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24083if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24088if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24095success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24121if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24126if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24147int oldEdgeRowIndex = _ptCurrentCell.Y; 24152_ptAnchorCell.Y, 24157success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, false, false, false); 24169SetSelectedCellCore(_ptCurrentCell.X, _ptCurrentCell.Y, false); 24170SetSelectedCellCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true); 24173success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24196if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24201if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24214SetSelectedCellCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true); 24217success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24241if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24246if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24251success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24314if (_selectedBandIndexes[bandIndex] != _ptCurrentCell.Y) 24326if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) == 0) 24328Debug.Assert(!_selectedBandIndexes.Contains(_ptCurrentCell.Y)); 24329SetSelectedRowCore(_ptCurrentCell.Y, true); 24551if (_ptCurrentCell.Y != -1) 24553previousVisibleRowIndex = Rows.GetPreviousRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 24593Debug.Assert(_ptAnchorCell.Y >= 0); 24595int oldEdgeRowIndex = _ptCurrentCell.Y; 24600_ptAnchorCell.Y, 24690Debug.Assert(_ptAnchorCell.Y >= 0); 24691if (_ptAnchorCell.Y == -1) 24697int oldEdgeRowIndex = _ptCurrentCell.Y; 24702_ptAnchorCell.Y, 24792Debug.Assert(_ptAnchorCell.Y >= 0); 24793SelectRowRange(firstVisibleRowIndex, _ptAnchorCell.Y, true); 24808SetSelectedRowCore(_ptCurrentCell.Y, false); 24882if (_ptAnchorCell.Y == -1) 24887if (_ptAnchorCell.Y >= previousVisibleRowIndex) 24889SelectRowRange(previousVisibleRowIndex, _ptAnchorCell.Y, true); 24893SelectRowRange(_ptAnchorCell.Y, previousVisibleRowIndex, true); 24975Debug.Assert(_ptAnchorCell.Y >= 0); 24976if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 24979SelectRowRange(firstVisibleRowIndex, _ptAnchorCell.Y, true); 24984int oldEdgeRowIndex = _ptCurrentCell.Y; 24989_ptAnchorCell.Y, 25008if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25010SetSelectedRowCore(_ptCurrentCell.Y, false); 25015SetSelectedCellCore(_ptCurrentCell.X, _ptCurrentCell.Y, false); 25049if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25097if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25102if (_ptAnchorCell.Y == -1) 25107if (_ptAnchorCell.Y >= previousVisibleRowIndex) 25109SelectRowRange(previousVisibleRowIndex, _ptAnchorCell.Y, true); 25113SelectRowRange(_ptAnchorCell.Y, previousVisibleRowIndex, true); 25124int oldEdgeRowIndex = _ptCurrentCell.Y; 25125if (_ptAnchorCell.Y == -1) 25134_ptAnchorCell.Y, 25179if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25285if (!IsSharedCellReadOnly(dataGridViewCell, _ptCurrentCell.Y) 25289bool success = ScrollIntoView(_ptCurrentCell.X, _ptCurrentCell.Y, false); 25302object? nullValue = dataGridViewCurrentCell.GetInheritedStyle(inheritedCellStyle: null, _ptCurrentCell.Y, includeColors: false).NullValue; 25320InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 25361_ptCurrentCell.Y, 25375dataGridViewCurrentCell = Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X]; 25378return dataGridViewCurrentCell.SetValueInternal(_ptCurrentCell.Y, dgvcpe.Value); 25400dataGridViewCurrentCell = Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X]; 25403return dataGridViewCurrentCell.SetValueInternal(_ptCurrentCell.Y, val); 25484Debug.Assert(_ptCurrentCell.Y != -1); 25486DataGridViewCellStyle dataGridViewCellStyle = dataGridViewCurrentCell.GetInheritedStyle(inheritedCellStyle: null, _ptCurrentCell.Y, includeColors: true); 26023forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26024forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 26041forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26042forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 26055forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26056forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 26220if (_ptCurrentCell.X >= 0 && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex)) 26283forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26284forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 26312forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26313forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 26362if (EditingControl is not null && (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Frozen) == 0) 26795if (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex) 26816int oldCurrentCellY = _ptCurrentCell.Y; 26862Debug.Assert(oldCurrentCellY == _ptCurrentCell.Y); 26956OnCellEnter(ref dataGridViewCellTmp, _ptCurrentCell.X, _ptCurrentCell.Y); 26965if (oldCurrentCellY != _ptCurrentCell.Y && RowHeadersVisible && oldCurrentCellY < Rows.Count) 26971InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 26972if (RowHeadersVisible && oldCurrentCellY != _ptCurrentCell.Y) 26974InvalidateCellPrivate(-1, _ptCurrentCell.Y); 26998AccessibilityNotifyCurrentCellChanged(new Point(_ptCurrentCell.X, _ptCurrentCell.Y)); 27026int oldCurrentCellY = _ptCurrentCell.Y; 27067Debug.Assert(oldCurrentCellY == _ptCurrentCell.Y); 28232_ptCurrentCellCache.Y = _ptCurrentCell.Y; 28301if (!IsInnerCellOutOfBounds(_ptCurrentCellCache.X, _ptCurrentCellCache.Y)) 28305_ptCurrentCellCache.Y, 28361if (rowIndex1 == _ptCurrentCellCache.Y) 28365else if (rowIndex2 == _ptCurrentCellCache.Y) 28519if (_ptCurrentCell.Y != -1) 28521nextVisibleRowIndex = Rows.GetNextRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 28542targetRowIndex = _ptCurrentCell.Y; 28614if (targetRowIndex != _ptCurrentCell.Y || MultiSelect) 28680if (_ptCurrentCell.Y != -1) 28682previousVisibleRowIndex = Rows.GetPreviousRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 28711targetRowIndex = _ptCurrentCell.Y; 28783if (targetRowIndex != _ptCurrentCell.Y || MultiSelect) 29109PositionEditingControl(rowIndex == -1 || _ptCurrentCell.Y != rowIndex, true, false); 29166HitTestInfo htiToUse = hti ?? HitTest(ptMouse.X, ptMouse.Y); 29172if (_ptMouseEnteredCell.X != htiToUse._col || _ptMouseEnteredCell.Y != htiToUse._row) 29177&& _ptMouseEnteredCell.Y >= -1 29178&& _ptMouseEnteredCell.Y < Rows.Count) 29180dgvce = new DataGridViewCellEventArgs(_ptMouseEnteredCell.X, _ptMouseEnteredCell.Y); 29204&& _ptMouseEnteredCell.Y >= -1 29205&& _ptMouseEnteredCell.Y < Rows.Count) 29207DataGridViewCellEventArgs dgvce = new(_ptMouseEnteredCell.X, _ptMouseEnteredCell.Y); 29876HitTestInfo hti = HitTest(ptMouse.X, ptMouse.Y); 29877int mouseX = ptMouse.X, mouseY = ptMouse.Y; 29893hti = HitTest(mouseX, ptMouse.Y - yOffset - normOffset); 29902? HitTest(ptMouse.X - xOffset - (xOffset / Math.Abs(xOffset)), ptMouse.Y - yOffset - normOffset) 29903: HitTest(mouseX, ptMouse.Y - yOffset - normOffset); 29986HitTestInfo hti = HitTest(client.X, client.Y);
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (9)
449ColumnIndex == DataGridView!.MouseDownCellAddress.X && rowIndex == DataGridView.MouseDownCellAddress.Y; 544rowIndex == DataGridView.MouseDownCellAddress.Y) 567e.RowIndex == DataGridView.MouseDownCellAddress.Y && 663bool cellCurrent = (ptCurrentCell.X == ColumnIndex && ptCurrentCell.Y == rowIndex); 728else if (DataGridView.MouseEnteredCellAddress.Y == rowIndex && 784else if (DataGridView.MouseEnteredCellAddress.Y == rowIndex && 821else if (DataGridView.MouseEnteredCellAddress.Y == rowIndex && 895(DataGridView.CurrentCellAddress.Y == rowIndex && DataGridView.CurrentCellAddress.X == ColumnIndex)) 930(DataGridView.CurrentCellAddress.Y == rowIndex && DataGridView.CurrentCellAddress.X == ColumnIndex))
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (5)
408ptCurrentCell.Y == RowIndex && 1488if (ColumnIndex == ptCurrentCell.X && rowIndex == ptCurrentCell.Y) 2427|| (dataGridView.AllowUserToAddRowsInternal && rowIndex > -1 && rowIndex == dataGridView.NewRowIndex && rowIndex != dataGridView.CurrentCellAddress.Y) 2711ptCurrentCell.Y == rowIndex && 3909if (OwningRow.Index == DataGridView.CurrentCellAddress.Y)
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (11)
434ptCurrentCell.Y == e.RowIndex && 521ptCurrentCell.Y == rowIndex && DataGridView.IsCurrentCellInEditMode) 767return ColumnIndex == DataGridView.MouseDownCellAddress.X && rowIndex == DataGridView.MouseDownCellAddress.Y; 790ptCurrentCell.Y == e.RowIndex && 894rowIndex == DataGridView.MouseDownCellAddress.Y) 917e.RowIndex == DataGridView.MouseDownCellAddress.Y && 1074ptCurrentCell.Y == rowIndex && DataGridView.IsCurrentCellInEditMode) 1140ptCurrentCell.Y == rowIndex) 1159isHot: DataGridView.MouseEnteredCellAddress.Y == rowIndex 1293if (DataGridView.MouseEnteredCellAddress.Y == rowIndex && 1435else if (DataGridView.MouseEnteredCellAddress.Y == rowIndex
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (49)
808else if (DataGridView.MouseEnteredCellAddress.Y == rowIndex && 1018sortGlyphLocation.Y + s_sortGlyphHeight - 2, 1020sortGlyphLocation.Y); 1023sortGlyphLocation.Y + s_sortGlyphHeight - 2, 1025sortGlyphLocation.Y); 1028sortGlyphLocation.Y, 1030sortGlyphLocation.Y + s_sortGlyphHeight - 2); 1033sortGlyphLocation.Y, 1035sortGlyphLocation.Y + s_sortGlyphHeight - 2); 1038sortGlyphLocation.Y + s_sortGlyphHeight - 1, 1040sortGlyphLocation.Y + s_sortGlyphHeight - 1); 1047sortGlyphLocation.Y + s_sortGlyphHeight - 2, 1049sortGlyphLocation.Y); 1052sortGlyphLocation.Y + s_sortGlyphHeight - 2, 1054sortGlyphLocation.Y); 1057sortGlyphLocation.Y, 1059sortGlyphLocation.Y + s_sortGlyphHeight - 2); 1062sortGlyphLocation.Y, 1064sortGlyphLocation.Y + s_sortGlyphHeight - 2); 1067sortGlyphLocation.Y + s_sortGlyphHeight - 1, 1069sortGlyphLocation.Y + s_sortGlyphHeight - 1); 1078sortGlyphLocation.Y + s_sortGlyphHeight - line - 1, 1080sortGlyphLocation.Y + s_sortGlyphHeight - line - 1); 1085sortGlyphLocation.Y + s_sortGlyphHeight - s_sortGlyphWidth / 2 - 1, 1087sortGlyphLocation.Y + s_sortGlyphHeight - s_sortGlyphWidth / 2); 1102sortGlyphLocation.Y + 1, 1104sortGlyphLocation.Y + s_sortGlyphHeight - 1); 1107sortGlyphLocation.Y + 1, 1109sortGlyphLocation.Y + s_sortGlyphHeight - 1); 1112sortGlyphLocation.Y + s_sortGlyphHeight - 1, 1114sortGlyphLocation.Y + 1); 1117sortGlyphLocation.Y + s_sortGlyphHeight - 1, 1119sortGlyphLocation.Y + 1); 1122sortGlyphLocation.Y, 1124sortGlyphLocation.Y); 1131sortGlyphLocation.Y + 1, 1133sortGlyphLocation.Y + s_sortGlyphHeight - 1); 1136sortGlyphLocation.Y + 1, 1138sortGlyphLocation.Y + s_sortGlyphHeight - 1); 1141sortGlyphLocation.Y + s_sortGlyphHeight - 1, 1143sortGlyphLocation.Y + 1); 1146sortGlyphLocation.Y + s_sortGlyphHeight - 1, 1148sortGlyphLocation.Y + 1); 1151sortGlyphLocation.Y, 1153sortGlyphLocation.Y); 1162sortGlyphLocation.Y + line + 2, 1164sortGlyphLocation.Y + line + 2); 1169sortGlyphLocation.Y + s_sortGlyphWidth / 2 + 1, 1171sortGlyphLocation.Y + s_sortGlyphWidth / 2 + 2);
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (11)
1670if (ptCurrentCell.X == e.ColumnIndex && ptCurrentCell.Y == e.RowIndex) 1893DataGridView.MouseEnteredCellAddress.Y == rowIndex && 1900if (DataGridView.MouseEnteredCellAddress.Y == rowIndex && 1919bool cellCurrent = ptCurrentCell.X == ColumnIndex && ptCurrentCell.Y == rowIndex; 2165new(middle.X - s_offset2X, middle.Y - 1), 2166new(middle.X + s_offset2X + 1, middle.Y - 1), 2167new(middle.X, middle.Y + s_offset2Y) 2184Point pt1 = new(middle.X - (s_nonXPTriangleWidth - 1) / 2, middle.Y - s_nonXPTriangleHeight); 2185Point pt2 = new(middle.X + (s_nonXPTriangleWidth - 1) / 2, middle.Y - s_nonXPTriangleHeight); 2189g.DrawLine(SystemPens.ControlText, pt1.X, pt1.Y, pt2.X, pt2.Y);
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (3)
434&& rowIndex == DataGridView.MouseDownCellAddress.Y 468rowIndex == DataGridView.MouseDownCellAddress.Y && 493Debug.Assert(rowIndex == DataGridView.MouseDownCellAddress.Y);
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (1)
892&& ptCurrentCell.Y == rowIndex
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (1)
911bool cellCurrent = ptCurrentCell.X == ColumnIndex && ptCurrentCell.Y == rowIndex;
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (3)
686else if (DataGridView.MouseEnteredCellAddress.Y == rowIndex && 773if (DataGridView.CurrentCellAddress.Y == rowIndex) 929if (DataGridView.CurrentCellAddress.Y == rowIndex)
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (2)
579if (ptCurrentCell.X == e.ColumnIndex && ptCurrentCell.Y == e.RowIndex && e.Button == MouseButtons.Left) 676bool cellCurrent = ptCurrentCell.X == ColumnIndex && ptCurrentCell.Y == rowIndex;
System\Windows\Forms\Controls\DataGridView\DataGridViewTopLeftHeaderCell.cs (1)
253else if (DataGridView.MouseEnteredCellAddress.Y == rowIndex && DataGridView.MouseEnteredCellAddress.X == ColumnIndex)
System\Windows\Forms\Controls\ImageList\ImageList.cs (1)
510public void Draw(Graphics g, Point pt, int index) => Draw(g, pt.X, pt.Y, index);
System\Windows\Forms\Controls\Labels\LinkLabel.cs (2)
302if ((r.left <= p.X && p.X < r.right && r.top <= p.Y && p.Y < r.bottom) || PInvoke.GetCapture() == HWND)
System\Windows\Forms\Controls\Labels\LinkLabel.LinkLabelAccessibleObject.cs (1)
65Link? hit = owner.PointInLink(p.X, p.Y);
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (1)
1504return IndexFromPoint(p.X, p.Y);
System\Windows\Forms\Controls\ListView\ListView.cs (8)
3210return FindNearestItem(dir, point.X, point.Y); 3701public ListViewHitTestInfo HitTest(Point point) => HitTest(point.X, point.Y); 4376item = GetItemAt(pos.X, pos.Y); 5106int scrollY = GetItemPosition(toLVItem).Y - GetItemPosition(fromLVItem).Y; 5931AccessibleObject? accessibilityObject = AccessibilityObject.HitTest(screenPoint.X, screenPoint.Y); 6656OnMouseClick(new MouseEventArgs(button, 1, pos.X, pos.Y, 0)); 6661OnMouseUp(new MouseEventArgs(button, 1, pos.X, pos.Y, 0));
System\Windows\Forms\Controls\ListView\ListView.ListViewAccessibleObject.cs (1)
293ListViewHitTestInfo hitTestInfo = owningListView.HitTest(point.X, point.Y);
System\Windows\Forms\Controls\ListView\ListViewItem.cs (1)
646_listView.SetItemPosition(Index, _position.X, _position.Y);
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.CalendarButtonAccessibleObject.cs (1)
83SendMouseInput(previousPosition.X, previousPosition.Y, MOUSE_EVENT_FLAGS.MOUSEEVENTF_MOVE | MOUSE_EVENT_FLAGS.MOUSEEVENTF_ABSOLUTE);
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (1)
1331public HitTestInfo HitTest(Point point) => HitTest(point.X, point.Y);
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (8)
1899if (y >= (location.Y - s_cyDivider) && 1900y <= (location.Y + 1)) 1911if (y >= (location.Y - s_cyDivider) && 1912y <= (location.Y + 1)) 2402OnMouseMove(new MouseEventArgs(e.Button, e.Clicks, newPoint.X, newPoint.Y, e.Delta)); 2418OnMouseDown(new MouseEventArgs(e.Button, e.Clicks, newPoint.X, newPoint.Y, e.Delta)); 2898pevent.Graphics.FillRectangle(backgroundBrush, new Rectangle(0, 0, width, psheetLoc.Y)); 2900int yLast = psheetLoc.Y + _gridView.Size.Height;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CommandsPane.cs (1)
237LinkLabel.Link link = Label.Links.Add(links[i].X, links[i].Y, _verbs[i]);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridErrorDialog.cs (2)
310int y = _detailsButton.Location.Y + _detailsButton.Height + _detailsButton.Margin.Bottom; 316y += parent.Location.Y;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (29)
457return new Point(point.X + (rect.Width / 2), point.Y + (rect.Height / 2)); 609if (pt.Y > propertyGridViewBottom) 614if (pt.Y + rect.Height > propertyGridViewBottom) 616rect.Height = propertyGridViewBottom - pt.Y; 619return new Rectangle(pt.X, pt.Y, rect.Width, rect.Height); 678g.TranslateTransform(newOrigin.X, newOrigin.Y); 679r.Offset(-newOrigin.X, -newOrigin.Y); 1111clipRect.Offset(-newOrigin.X, -newOrigin.Y); 1166clipRect.Offset(-newOrigin.X, -newOrigin.Y); 1428if (rectScreen.Y + rectScreen.Height < (size.Height + location.Y + EditTextBox.Height)) 1454_dropDownHolder.SetBounds(location.X, location.Y, size.Width, size.Height); 1664pt.Y = (y - _location.Y) / (1 + RowHeight); 1905rect.Y = row * (RowHeight + 1) + 1 + _location.Y; 2597Math.Abs(screenPoint.Y - _rowSelectPos.Y) < SystemInformation.DoubleClickSize.Height) 2976GridEntry? gridEntry = GetGridEntryFromRow(pos.Y); 2981Rectangle r = GetRectangle(pos.Y, RowLabel); 3032rowMoveCurrent = point.Y; 3055Rectangle itemRect = GetRectangle(point.Y, point.X); 3275startRow = Math.Max(0, startPosition.Y); 3280endRow = endPosition.Y; 3302g.DrawLine(splitterPen, _labelWidth, location.Y, _labelWidth, visibleCount * (RowHeight + 1) + location.Y); 3320currentRowHeight = i * (RowHeight + 1) + location.Y; 3342currentRowHeight = visibleCount * (RowHeight + 1) + location.Y; 5251mouseLoc = FindPosition(mouseLoc.X, mouseLoc.Y); 5258GridEntry? curEntry = GetGridEntryFromRow(mouseLoc.Y); 5266Rectangle itemRect = GetRectangle(mouseLoc.Y, mouseLoc.X); 5272tipPt = curEntry.GetLabelToolTipLocation(mouseLoc.X - itemRect.X, mouseLoc.Y - itemRect.Y);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (4)
435newBounds.Height = Math.Max(s_minDropDownSize.Height, _dragBaseRect.Height + (dragPoint.Y - _dragStart.Y)); 443int delta = dragPoint.Y - _dragStart.Y;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.PropertyGridViewAccessibleObject.cs (2)
435Point position = owner.FindPosition(point.X, point.Y); 438GridEntry? gridEntry = owner.GetGridEntryFromRow(position.Y);
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (1)
2218Point wpt = new(pt.X, pt.Y);
System\Windows\Forms\Controls\RichTextBox\RichTextBox.OleCallback.cs (4)
133MousePosition.Y, 139MousePosition.Y, 234MousePosition.Y, 240MousePosition.Y,
System\Windows\Forms\Controls\Splitter\Splitter.cs (2)
778delta = y - _anchor.Y; 958int size = GetSplitSize(splitTarget, x - Left + _anchor.X, y - Top + _anchor.Y);
System\Windows\Forms\Controls\TabControl\TabControl.cs (2)
389r.Y -= p.Y; 589if (value.X < 0 || value.Y < 0)
System\Windows\Forms\Controls\TextBox\TextBoxBase.TextBoxBaseUiaTextProvider.cs (2)
128clientLocation.Y = Math.Max(clientLocation.Y, clientRectangle.top); 129clientLocation.Y = Math.Min(clientLocation.Y, clientRectangle.bottom);
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (1)
591int deltaBottomEdge = Math.Abs(rootHwndClientArea.bottom - gripLocation.Y);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (8)
2166int adjacentSide = otherItemMidLocation.Y - midPointOfCurrent.Y; 2607if (location.X != x || location.Y != y) 2627if (location.X != x || location.Y != y) 3331mea = new MouseEventArgs(mea.Button, mea.Clicks, itemRelativePoint.X, itemRelativePoint.Y, mea.Delta); 3387mea = new MouseEventArgs(mea.Button, mea.Clicks, itemRelativePoint.X, itemRelativePoint.Y, mea.Delta); 3431mea = new MouseEventArgs(mea.Button, mea.Clicks, itemRelativePoint.X, itemRelativePoint.Y, mea.Delta); 4508cursorLocation.Y += Cursor.Size.Height - currentCursor.HotSpot.Y;
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.ToolStripComboBoxControl.ToolStripComboBoxFlatComboAdapter.cs (3)
150new(middle.X - s_offsetPixels, middle.Y - 1), 151new(middle.X + s_offsetPixels + 1, middle.Y - 1), 152new(middle.X, middle.Y + s_offsetPixels)
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (2)
1043dropDownBounds.Location = new Point(start.X + offset.X, start.Y + offset.Y);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownItem.cs (2)
336dropDownBounds.Location = new Point(itemScreenLocation.X + offset.X, itemScreenLocation.Y + offset.Y);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (4)
364_checkRectangle = LayoutUtils.Align(maxCheckSize, new Rectangle(nextPoint.X, nextPoint.Y, maxCheckSize.Width, _maxItemSize.Height), ContentAlignment.MiddleCenter); 369_imageRectangle = LayoutUtils.Align(maxImageSize, new Rectangle(nextPoint.X, nextPoint.Y, maxImageSize.Width, _maxItemSize.Height), ContentAlignment.MiddleCenter); 380_checkRectangle = LayoutUtils.Align(maxCheckSize, new Rectangle(nextPoint.X, nextPoint.Y, checkAndImageMarginWidth, _maxItemSize.Height), ContentAlignment.MiddleCenter); 399_checkRectangle = LayoutUtils.Align(LayoutUtils.UnionSizes(maxCheckSize, maxImageSize), new Rectangle(nextPoint.X, nextPoint.Y, checkAndImageMarginWidth - 1, _maxItemSize.Height), ContentAlignment.MiddleCenter);
System\Windows\Forms\Controls\ToolStrips\ToolStripGrip.cs (2)
146int deltaY = currentLocation.Y - _startLocation.Y;
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (3)
3453toPoint.Y += currentToolStripItemLocation.Y; 3465fromPoint.Y += currentToolStripItemLocation.Y; 3480fromPoint.Y -= currentToolStripItemLocation.Y;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.cs (4)
809if (clientLocation.X < 0 || clientLocation.Y < 0) 861index = (clientLocation.Y <= Padding.Left) ? 0 : index; 894Point endLocation = (Orientation == Orientation.Horizontal) ? new Point(clientLocation.X, row.Bounds.Y) : new Point(row.Bounds.X, clientLocation.Y); 959cursorLoc.Y = Cursor.Position.Y;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.VerticalRowManager.cs (6)
151int deltaY = clientEndLocation.Y - clientStartLocation.Y; 427if (cell.Bounds.Y >= locationToDrag.Y) 456requiredSpace += locationToDrag.Y; 506lastCellMargin.Top = Math.Max(0, locationToDrag.Y - nextCell.Bounds.Bottom); 547cellMargin.Top = Math.Max(0, locationToDrag.Y - Row.Margin.Top);
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (27)
209middle.Y - Offset2Y, 211middle.Y + Offset2Y); 214middle.Y - Offset2Y + 1, 216middle.Y + Offset2Y + 1); 862Rectangle bottomLeftParentVerticalPixels = new(bottomLeft.X, bottomLeft.Y - 1, 1, 2); 865Rectangle bottomRightHorizontalPixels = new(bottomRight.X - 1, bottomRight.Y, 2, 1); 866Rectangle bottomRightVerticalPixels = new(bottomRight.X, bottomRight.Y - 1, 1, 2); 873topRightHorizontalPixels = new Rectangle(topRight.X - 1, topRight.Y, 1, 1); 874topRightVerticalPixels = new Rectangle(topRight.X, topRight.Y, 1, 2); 878topRightHorizontalPixels = new Rectangle(topRight.X - 2, topRight.Y, 2, 1); 879topRightVerticalPixels = new Rectangle(topRight.X, topRight.Y, 1, 3); 1149b.TranslateTransform(parent.Width - control.Location.X, parent.Height - control.Location.Y); 1307g.FillRectangle(brush, top1.X, top1.Y, 1, 1); 1308g.FillRectangle(brush, top2.X, top2.Y, 1, 1); 1396Rectangle otherBottom = new(bottomLeft.X, bottomLeft.Y - 2, 1, 1); 1657new(middle.X - Offset2X, middle.Y + 1), 1658new(middle.X + Offset2X + 1, middle.Y + 1), 1659new(middle.X, middle.Y - Offset2Y) 1663new(middle.X + Offset2X, middle.Y - Offset2Y - 1), 1664new(middle.X + Offset2X, middle.Y + Offset2Y + 1), 1665new(middle.X - 1, middle.Y) 1669new(middle.X - Offset2X, middle.Y - Offset2Y - 1), 1670new(middle.X - Offset2X, middle.Y + Offset2Y + 1), 1671new(middle.X + 1, middle.Y) 1675new(middle.X - Offset2X, middle.Y - 1), 1676new(middle.X + Offset2X + 1, middle.Y - 1), 1677new(middle.X, middle.Y + Offset2Y)
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (12)
642new(middle.X - Offset2X, middle.Y + 1), 643new(middle.X + Offset2X + 1, middle.Y + 1), 644new(middle.X, middle.Y - Offset2Y) 648new(middle.X + Offset2X, middle.Y - s_offset4Y), 649new(middle.X + Offset2X, middle.Y + s_offset4Y), 650new(middle.X - horizontalOffset, middle.Y) 654new(middle.X - Offset2X, middle.Y - s_offset4Y), 655new(middle.X - Offset2X, middle.Y + s_offset4Y), 656new(middle.X + horizontalOffset, middle.Y) 660new(middle.X - Offset2X, middle.Y - 1), 661new(middle.X + Offset2X + 1, middle.Y - 1), 662new(middle.X, middle.Y + Offset2Y)
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackDragDropHandler.cs (1)
226return (check.Y <= (orig.Top + heightUnit)) ? RelativeLocation.Above : RelativeLocation.Below;
System\Windows\Forms\Controls\TreeView\TreeView.cs (8)
1632public TreeViewHitTestInfo HitTest(Point pt) => HitTest(pt.X, pt.Y); 1673public TreeNode? GetNodeAt(Point pt) => GetNodeAt(pt.X, pt.Y); 3048OnNodeMouseClick(new TreeNodeMouseClickEventArgs(NodeFromHandle(hnode), button, 1, pos.X, pos.Y)); 3049OnClick(new MouseEventArgs(button, 1, pos.X, pos.Y, 0)); 3050OnMouseClick(new MouseEventArgs(button, 1, pos.X, pos.Y, 0)); 3078OnMouseUp(new MouseEventArgs(button, 1, pos.X, pos.Y, 0)); 3323OnNodeMouseClick(new TreeNodeMouseClickEventArgs(NodeFromHandle(hnode), _downButton, 1, point.X, point.Y)); 3335OnNodeMouseDoubleClick(new TreeNodeMouseClickEventArgs(NodeFromHandle(hnode), _downButton, 2, point.X, point.Y));
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (1)
911return new MouseEventArgs(e.Button, e.Clicks, point.X, point.Y, e.Delta);
System\Windows\Forms\Controls\WebBrowser\HtmlDocument.cs (1)
461htmlDoc2.Value->elementFromPoint(point.X, point.Y, &iHTMLElement).ThrowOnFailure();
System\Windows\Forms\Controls\WebBrowser\HtmlWindow.cs (2)
304htmlWindow.Value->moveTo(point.X, point.Y).ThrowOnFailure(); 410htmlWindow.Value->scrollTo(point.X, point.Y).ThrowOnFailure();
System\Windows\Forms\Controls\WebBrowser\WebBrowser.WebBrowserSite.cs (1)
44if (pt->X == 0 && pt->Y == 0)
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (2)
791Bounds = new Rectangle(location.X, location.Y, extent.Width, extent.Height); 1131sz.Height = phm.Y;
System\Windows\Forms\ErrorProvider\ErrorProvider.ErrorWindow.cs (1)
178PInvoke.SetViewportOrgEx(hdc, originalOrigin.X + _windowBounds.Width - 1, originalOrigin.Y, lppt: null);
System\Windows\Forms\Form.cs (5)
930SetDesktopLocation(value.X, value.Y); 1371Location.Y, 3871if (p.Y < screenRect.Y) 3875else if (p.Y + s.Height > screenRect.Y + screenRect.Height) 6911point.Y >= (clientSize.Height - SizeGripSize) &&
System\Windows\Forms\Input\Cursor.cs (1)
187set => PInvoke.SetCursorPos(value.X, value.Y);
System\Windows\Forms\Input\HandledMouseEventArgs.cs (1)
14: this(button, clicks, location.X, location.Y, delta, false)
System\Windows\Forms\Input\MouseEventArgs.cs (1)
32Y = location.Y;
System\Windows\Forms\Layout\Containers\ContainerControl.cs (1)
698return new Rectangle(topLeftPoint.X, topLeftPoint.Y, clientRectangle.right, clientRectangle.bottom);
System\Windows\Forms\Layout\Containers\SplitContainer.cs (7)
453if ((r.left <= p.X && p.X < r.right && r.top <= p.Y && p.Y < r.bottom) || PInvoke.GetCapture() == HWND) 1365_splitterRect.Y = Location.Y + SplitterDistanceInternal; 1405r.Y = Panel1.Location.Y + splitSize; 1495delta = y - _anchor.Y; 1572_splitterRect.Y = Location.Y; 1579_splitterRect.Y = Location.Y + SplitterDistanceInternal;
System\Windows\Forms\Layout\FlowLayout.ContainerProxy.cs (1)
157pt.Offset(ptScroll.Y, 0);
System\Windows\Forms\Layout\LayoutUtils.cs (1)
436(point.Y, point.X) = (point.X, point.Y);
System\Windows\Forms\NotifyIcon.cs (1)
617_contextMenuStrip.ShowInTaskbar(pt.X, pt.Y);
System\Windows\Forms\Printing\PrintPreviewControl.cs (11)
629offset.Y -= Position.Y; 632int borderPixelsY = PhysicalToPixels(Border, _screenDPI.Y); 665int y = offset.Y + borderPixelsY * (row + 1) + lastImageSize.Y; 752new(PixelsToPhysical(pixels.Width, dpi.X), PixelsToPhysical(pixels.Height, dpi.Y)); 758new(PhysicalToPixels(physical.Width, dpi.X), PhysicalToPixels(physical.Height, dpi.Y)); 765_vScrollBar.Value = Math.Clamp(value.Y, _vScrollBar.Minimum, _vScrollBar.Maximum); 919pos = vertical ? locPos.Y : locPos.X; 952pos = vertical ? locPos.Y : locPos.X; 999pos = locPos.Y; 1017pos = locPos.Y;
System\Windows\Forms\Rendering\ControlPaint.cs (3)
435transform.Translate(scrollOffset.X, scrollOffset.Y); 1838PInvoke.MoveToEx(desktopDC, start.X, start.Y, lppt: null); 1839PInvoke.LineTo(desktopDC, end.X, end.Y);
System\Windows\Forms\Rendering\DCMapping.cs (3)
48viewportOrg.Y + bounds.Top, 50viewportOrg.Y + bounds.Bottom); 61viewportOrg.Y + bounds.Top,
System\Windows\Forms\Scrolling\ScrollableControl.cs (4)
130SetDisplayRectLocation(-value.X, -value.Y); 839SetDisplayRectLocation(scrollLocation.X, scrollLocation.Y); 899yCalc += activeControl.AutoScrollOffset.Y; 1119if (pt.X != 0 || pt.Y != 0)
System\Windows\Forms\ToolTip\ToolTip.cs (16)
1321cursorLocation.Y < rect.top || cursorLocation.Y > rect.bottom) 1336SetTrackPosition(p.X, p.Y); 1411int pointY = r.top + point.Y; 1431int pointY = r.top + point.Y; 1499pointY = optimalPoint.Y; 1944if (moveToLocation.Y + tipSize.Height > screen.WorkingArea.Bottom) 1953moveToLocation.Y, 2013cursorLocation.Y >= r.top && cursorLocation.Y <= r.bottom) 2186wp->y = cursorPos.Y; 2187if (wp->y + wp->cy + currentCursor.Size.Height - currentCursor.HotSpot.Y > screen.WorkingArea.Bottom) 2189wp->y = cursorPos.Y - wp->cy; 2193wp->y = cursorPos.Y + currentCursor.Size.Height - currentCursor.HotSpot.Y; 2211wp->y = tipInfo.Position.Y;
System.Windows.Forms.Design (334)
System\ComponentModel\Design\CollectionEditor.SplitButton.cs (3)
252new(middle.X - s_offset2X, middle.Y - 1), 253new(middle.X + s_offset2X + 1, middle.Y - 1), 254new(middle.X, middle.Y + s_offset2Y)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (3)
177_button.Location = new Point(EditRegionLocation.X + EditRegionSize.Width - buttonHeight - EditorLineButtonPadding, EditRegionLocation.Y + EditorLineButtonPadding + 1); 353if (rectScreen.Bottom < (dropDownSize.Height + editorLocation.Y + editorBounds.Height)) 377if (rectScreen.Bottom < (dropDownSize.Height + editorLocation.Y + editorBounds.Height))
System\ComponentModel\Design\DesignerActionPanel.TextBoxPropertyLine.cs (1)
114EditControl!.Location = new Point(_editRegionLocation.X + GetTextBoxLeftPadding(textBoxPreferredHeight) + 1 + specialPadding, _editRegionLocation.Y + TextBoxLineInnerPadding + 1);
System\Drawing\Design\ColorEditor.ColorPalette.ColorPaletteAccessibleObject.ColorCellAccessibleObject.cs (2)
33FillRectWithCellBounds(cellPt.X, cellPt.Y, ref rect); 43return new Rectangle(pt.X, pt.Y, rect.Width, rect.Height);
System\Drawing\Design\ColorEditor.ColorPalette.ColorPaletteAccessibleObject.cs (1)
45int cell = GetCellFromLocationMouse(point.X, point.Y);
System\Drawing\Design\ColorEditor.ColorPalette.cs (15)
180private static int Get1DFrom2D(Point pt) => Get1DFrom2D(pt.X, pt.Y); 219FillRectWithCellBounds(_focus.X, _focus.Y, ref r); 2251 + Get1DFrom2D(_focus.X, _focus.Y)); 276SelectedColor = GetColorFromCell(_focus.X, _focus.Y); 281SelectedColor = GetColorFromCell(_focus.X, _focus.Y); 291SetFocus(_focus with { Y = _focus.Y - 1 }); 294SetFocus(_focus with { Y = _focus.Y + 1 }); 312if (cell2D.X != -1 && cell2D.Y != -1 && cell2D != _focus) 326if (cell2D.X != -1 && cell2D.Y != -1 && cell2D != _focus) 340if (cell2D.X != -1 && cell2D.Y != -1) 343SelectedColor = GetColorFromCell(_focus.X, _focus.Y); 392if (_focus.X == x && _focus.Y == y && Focused) 425int cell = Get1DFrom2D(_focus.X, _focus.Y); 444if (newFocus.Y < 0) 454if (newFocus.Y >= CellsDown)
System\Windows\Forms\Design\Behavior\BehaviorService.AdornerWindow.cs (3)
133region.Translate(scrollPosition.X, scrollPosition.Y); 150rectangle.Offset(scrollPosition.X, scrollPosition.Y); 320pt.Offset(pt1.X, pt1.Y);
System\Windows\Forms\Design\Behavior\BehaviorService.AdornerWindow.MouseHook.cs (2)
180Message m = Message.Create(hwnd, msg, 0u, PARAM.FromLowHigh(pt.Y, pt.X)); 196if (!adornerWindow.WndProcProxy(ref m, pt.X, pt.Y))
System\Windows\Forms\Design\Behavior\ContainerSelectorBehavior.cs (3)
177Size delta = new(Math.Abs(mouseLoc.X - InitialDragPoint.X), Math.Abs(mouseLoc.Y - InitialDragPoint.Y)); 182screenLoc.Offset(mouseLoc.X, mouseLoc.Y);
System\Windows\Forms\Design\Behavior\DesignerActionGlyph.cs (1)
161_bounds = (new Rectangle(topRight.X, topRight.Y, GlyphImageOpened.Width, GlyphImageOpened.Height));
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (13)
216controlRect.Y += offset.Y; // offset for non-client area 709if (directionOffset.Y != 0) 714int minRange = directionOffset.Y < 0 ? 0 : currentBounds.Y; 715int maxRange = directionOffset.Y < 0 ? currentBounds.Bottom : int.MaxValue; 716offset.Y = FindSmallestValidDistance(_horizontalSnapLines, _horizontalDistances, minRange, maxRange, directionOffset.Y); 717if (offset.Y != 0) 720IdentifyAndStoreValidLines(_horizontalSnapLines, _horizontalDistances, currentBounds, offset.Y); 721if (directionOffset.Y < 0) 732_cachedDragRect.Offset(offset.X, offset.Y); 739if (offset.Y != 0) 1100_dragOffset = new Point(dragBounds.X - _dragOffset.X, dragBounds.Y - _dragOffset.Y); 1106_targetHorizontalSnapLines[i].AdjustOffset(_dragOffset.Y); 1144Rectangle tempDragRect = new(dragBounds.Left + snapPoint.X, dragBounds.Top + snapPoint.Y, dragBounds.Width, dragBounds.Height);
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (22)
143Point controlLocation = new(dragLoc.X - _parentLocation.X, dragLoc.Y - _parentLocation.Y); 147int yDelta = controlLocation.Y % _parentGridSize.Height; 271Point pt = new(dropPoint.X, dropPoint.Y); 276pt.Offset(-ptScroll.X, -ptScroll.Y); 494initialDropPoint.Y + _dragComponents[i].positionOffset.Y); 740mouseLoc.Y - _initialMouseLoc.Y + _dragComponents[_primaryComponentIndex].originalControlLocation.Y); 744Rectangle newRect = new(newPosition.X, newPosition.Y, 777newPosition.Y += _lastSnapOffset.Y; 789mouseLoc.Y - _initialMouseLoc.Y + _originalDragImageLocation.Y); 791newPosition.Y += _lastSnapOffset.Y; 806invalidDragRegion.Translate(mouseLoc.X - _initialMouseLoc.X + _lastSnapOffset.X, mouseLoc.Y - _initialMouseLoc.Y + _lastSnapOffset.Y); 949dragControl.Location.Y - primaryControl.Location.Y); 1034_dragComponents[i].draggedLocation.Y - _dragImageRect.Y,
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (18)
164lines.Add(new SnapLine(SnapLineType.Bottom, loc.Y - 1)); 167lines.Add(new SnapLine(SnapLineType.Horizontal, loc.Y + _primaryControl.Margin.Bottom, SnapLine.MarginBottom, SnapLinePriority.Always)); 172lines.Add(new SnapLine(SnapLineType.Top, loc.Y)); 175lines.Add(new SnapLine(SnapLineType.Horizontal, loc.Y - _primaryControl.Margin.Top, SnapLine.MarginTop, SnapLinePriority.Always)); 276_parentLocation.Y -= control.Location.Y; 482Point mouseLocAbs = new(mouseLoc.X, mouseLoc.Y); 484if (mouseLocAbs.X == _lastMouseAbs.X && mouseLocAbs.Y == _lastMouseAbs.Y) 492if (Math.Abs(_initialPoint.X - mouseLoc.X) > DesignerUtils.MinDragSize.Width / 2 || Math.Abs(_initialPoint.Y - mouseLoc.Y) > DesignerUtils.MinDragSize.Height / 2) 547_lastMouseAbs = new Point(mouseLoc.X, mouseLoc.Y); 611mouseLoc.Y += _lastSnapOffset.Y; 672pixelHeight = mouseLoc.Y - controlBounds.Bottom; 676pixelHeight = AdjustPixelsForIntegralHeight(control, mouseLoc.Y - _initialPoint.Y); 689yOffset = controlBounds.Y - mouseLoc.Y; 693yOffset = AdjustPixelsForIntegralHeight(control, _initialPoint.Y - mouseLoc.Y);
System\Windows\Forms\Design\Behavior\TableLayoutPanelBehavior.cs (2)
250int delta = isColumn ? mouseLoc.X - _lastMouseLoc.X : mouseLoc.Y - _lastMouseLoc.Y;
System\Windows\Forms\Design\Behavior\ToolboxItemSnapLineBehavior.cs (9)
150offset.Y = _lastRectangle.Top - mouseLoc.Y; 156offset.Y = _lastRectangle.Bottom - mouseLoc.Y; 172offset.Y = _lastRectangle.Top - mouseLoc.Y; 178offset.Y = _lastRectangle.Bottom - mouseLoc.Y; 221offset.Y = _lastRectangle.Top - mouseLoc.Y; 261ToolboxSnapDragDropEventArgs se = CreateToolboxSnapArgs(e, new Point(e.X - screenOffset.X, e.Y - screenOffset.Y)); 316Rectangle newRectangle = new(mouseLoc.X - DesignerUtils.s_boxImageSize / 2, mouseLoc.Y - DesignerUtils.s_boxImageSize / 2, 325newRectangle.Offset(_lastOffset.X, _lastOffset.Y); 351Rectangle statusRect = new(newRectangle.X - adornerServiceOrigin.X, newRectangle.Y - adornerServiceOrigin.Y, 0, 0);
System\Windows\Forms\Design\CommandSet.cs (43)
819moveOffsetY = snappedOffset.Y; 892moveOffsetY = loc.Y - primaryControl.Location.Y; 1043loc.Y = primaryLocation.Y + primarySize.Height - size.Height; 1051loc.Y = primarySize.Height / 2 + primaryLocation.Y - size.Height / 2; 1084loc.Y = primaryLocation.Y; 1199delta = loc.Y % gridSize.Height; 1304if (loc.Y < top) 1305top = loc.Y; 1308if (loc.Y + size.Height > bottom) 1309bottom = loc.Y + size.Height; 2433loc.Y = (loc.Y / grid.Height) * grid.Height; 2703: (lastSize.Height + lastLoc.Y - curLoc.Y - total) / (selectedObjects.Length - 1); 2833curLoc.Y = lastLoc.Y + lastSize.Height; 2840if (curLoc.Y < primaryLoc.Y) 2841curLoc.Y = primaryLoc.Y; 2846if (curLoc.Y > primaryLoc.Y) 2847curLoc.Y = primaryLoc.Y; 2863curLoc.Y = lastLoc.Y + lastSize.Height + nEqualDelta; 3256if (min.Y > loc.Y) 3258min.Y = loc.Y; 3266if (max.Y < loc.Y + size.Height) 3268max.Y = loc.Y + size.Height; 3278Point offset = new(-min.X, -min.Y); 3293parentOffset.Y -= (max.Y - min.Y) / 2; 3375groupEndY = parentOffset.Y + max.Y - min.Y; 3380groupEndY = parentOffset.Y + gridSize.Height; 3404offset.Offset(parentOffset.X, parentOffset.Y); 3417newLoc.Offset(offset.X, offset.Y); 3474return pLoc.X == qLoc.X ? pLoc.Y - qLoc.Y : pLoc.X - qLoc.X; 3492return pLoc.Y == qLoc.Y ? pLoc.X - qLoc.X : pLoc.Y - qLoc.Y;
System\Windows\Forms\Design\ComponentTray.cs (36)
604SetTrayLocation(comp, new Point(tc.Location.X - _autoScrollPosBeforeDragging.X, tc.Location.Y - _autoScrollPosBeforeDragging.Y)); 608AutoScrollPosition = new Point(-_autoScrollPosBeforeDragging.X, -_autoScrollPosBeforeDragging.Y); 660mcs.ShowContextMenu(MenuCommands.TraySelectionMenu, location.X, location.Y); 664mcs.ShowContextMenu(MenuCommands.ComponentTrayMenu, location.X, location.Y); 994return new Point(loc.X - autoScrollLoc.X, loc.Y - autoScrollLoc.Y); 1206_mouseDragWorkspace.Y = Math.Min(start.Y, end.Y); 1208_mouseDragWorkspace.Height = Math.Abs(end.Y - start.Y); 1341Y = Math.Min(_mouseDragStart.Y, e.Y), 1343Height = Math.Abs(e.Y - _mouseDragStart.Y) 1575location = new Point(location.X + autoScrollLoc.X, location.Y + autoScrollLoc.Y); 1619if (location.X == -1 && location.Y == -1) 1826_whiteSpace.Y = _whiteSpace.Y * 2 + 3; 1832Point newLoc = new(display.X + _whiteSpace.X, display.Y + _whiteSpace.Y); 1844newLoc = new Point(newLoc.X - autoScrollLoc.X, newLoc.Y - autoScrollLoc.Y); 1866newLoc.Y += bounds.Height + _whiteSpace.Y; 1879newLoc = new Point(newLoc.X - autoScrollLoc.X, newLoc.Y - autoScrollLoc.Y); 2197Math.Abs(_mouseDragLast.Y - newPt.Y) < minDrag.Height)) 2216if (_tray._selectionUISvc is not null && _tray._selectionUISvc.BeginDrag(SelectionRules.Visible | SelectionRules.Moveable, _mouseDragLast.X, _mouseDragLast.Y)) 2257mcs.ShowContextMenu(MenuCommands.TraySelectionMenu, location.X, location.Y); 2539if (location.X == -1 && location.Y == -1) 2553pt.Offset(pt1.X, pt1.Y); 2556pt.Offset(Location.X, Location.Y); 2778if (tcLoc1.X == tcLoc2.X && tcLoc1.Y == tcLoc2.Y) 2784if (tcLoc1.Y + height <= tcLoc2.Y) 2790if (tcLoc2.Y + height <= tcLoc1.Y)
System\Windows\Forms\Design\ControlCommandSet.cs (5)
501lines.Add(new SnapLine(SnapLineType.Bottom, pt.Y + primaryControl.Height - 1)); 502lines.Add(new SnapLine(SnapLineType.Horizontal, pt.Y + primaryControl.Height + primaryControl.Margin.Bottom, SnapLine.MarginBottom, SnapLinePriority.Always)); 644primaryControlsize += new Size(snappedOffset.X, snappedOffset.Y); 656moveOffsetY = snappedOffset.Y; 717Rectangle dragRect = new(primaryControl.Location.X, primaryControl.Location.Y,
System\Windows\Forms\Design\ControlDesigner.cs (18)
89loc.Offset(-pt.X, -pt.Y); 99value.Offset(pt.X, pt.Y); 301return new Point(Math.Abs(nativeOffset.X - offset.X), nativeOffset.Y - offset.Y); 1386Math.Abs(_mouseDragLast.Y - y) < minDrag.Height)) 1878if (button == MouseButtons.Left && IsDoubleClick(location.X, location.Y)) 1919mouseHandler.OnMouseDown(Component, button, location.X, location.Y); 1923OnMouseDragBegin(location.X, location.Y); 1933_lastMoveScreenY = location.Y; 1954if (_lastMoveScreenX != location.X || _lastMoveScreenY != location.Y) 1968mouseHandler.OnMouseMove(Component, location.X, location.Y); 1972OnMouseDragMove(location.X, location.Y); 1977_lastMoveScreenY = location.Y; 2070graphics.TranslateTransform(-point.X, -point.Y); 2196bool handled = GetService<ToolStripKeyboardHandlingService>()?.OnContextMenu(location.X, location.Y) ?? false; 2200if (location.X == -1 && location.Y == -1) 2206OnContextMenu(location.X, location.Y); 2385return PARAM.ToInt(pt.X, pt.Y);
System\Windows\Forms\Design\DesignerUtils.cs (2)
574newBounds.Y += e.Offset.Y; // snap to top - so move up our bounds 578newBounds.Y = originalBounds.Y - originalBounds.Height + e.Offset.Y;
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (40)
230marginBounds.Offset(offset.X, offset.Y); 231bounds.Offset(offset.X, offset.Y); 450point1.Offset(-offset.X, -offset.Y); 451point2.Offset(-offset.X, -offset.Y); 460_oldPoint1.Y, 462_oldPoint2.Y - _oldPoint1.Y + 1); 484if (Math.Abs(point1.Y - point2.Y) <= MinIBar) 488graphics.DrawLine(pen, point1.X - IBarHalfSize, point1.Y, point1.X + IBarHalfSize, point1.Y); // top hat 489graphics.DrawLine(pen, point2.X - IBarHalfSize, point2.Y, point2.X + IBarHalfSize, point2.Y); // bottom hat 501point1.Y + i, 503point1.Y + i); // top hat 508point2.Y - i, 510point2.Y - i); // bottom hat 514graphics.DrawLine(pen, point1.X, point1.Y, point1.X, point1.Y + IBarHatHeight - 1); // top hat 515graphics.DrawLine(pen, point2.X, point2.Y, point2.X, point2.Y - IBarHatHeight + 1); // bottom hat 518graphics.DrawLine(pen, point1.X, point1.Y + IBarLineOffset, point2.X, point2.Y - IBarLineOffset); 527graphics.DrawLine(pen, point1.X, point1.Y - IBarHalfSize, point1.X, point1.Y + IBarHalfSize); // top hat 528graphics.DrawLine(pen, point2.X, point2.Y - IBarHalfSize, point2.X, point2.Y + IBarHalfSize); // bottom hat 540point1.Y - (IBarHatWidth - 1 - i * 2) / 2, 542point1.Y + (IBarHatWidth - 1 - i * 2) / 2); // left hat 547point2.Y - (IBarHatWidth - 1 - i * 2) / 2, 549point2.Y + (IBarHatWidth - 1 - i * 2) / 2); // right hat 553graphics.DrawLine(pen, point1.X, point1.Y, point1.X + IBarHatHeight - 1, point1.Y); // left hat 554graphics.DrawLine(pen, point2.X, point2.Y, point2.X - IBarHatHeight + 1, point2.Y); // right hat 557graphics.DrawLine(pen, point1.X + IBarLineOffset, point1.Y, point2.X - IBarLineOffset, point2.Y); 848int offset = HorizontalFlow ? controlOffset.Y : controlOffset.X; 856match = (HorizontalFlow && mouseLocation.Y <= offset) || (!HorizontalFlow && mouseLocation.X >= offset); 861match = (HorizontalFlow ? mouseLocation.Y : mouseLocation.X) <= offset;
System\Windows\Forms\Design\OleDragDropHandler.cs (9)
373newRect.Y = oldOffset.Y; 377newRect.Offset(oldOffset.X, oldOffset.Y); 394newRect.Y = newOffset.Y; 398newRect.Offset(newOffset.X, newOffset.Y); 605if ((Dragging && de.X == _dragBase.X && de.Y == _dragBase.Y) || 770bounds.Y = dropPt.Y + pt.Y; 845Rectangle offset = new(de.X - _dragBase.X, de.Y - _dragBase.Y, 0, 0); 968Point newOffset = _forceDrawFrames ? convertedPoint : new Point(de.X - _dragBase.X, de.Y - _dragBase.Y);
System\Windows\Forms\Design\ParentControlDesigner.cs (27)
313displayRectangle.Y += offset.Y; // offset for non-client area 466bounds.Y = location.Y; 491bounds.Y = DefaultControlLocation.Y; 497bounds.Y = selectedControl.Location.Y + GridSize.Height; 581pt.Offset(-ptScroll.X, -ptScroll.Y); // always want to add the control below/right of the AutoScrollPosition 802CreateToolCore(tool, location.X, location.Y, 0, 0, true, false); 926centeredLocation.Y = DefaultControlLocation.Y; 1109if (adjustedRect.Y < minimumLocation.Y) 1111adjustedRect.Y = minimumLocation.Y; 1120Rectangle r = GetUpdatedRect(Rectangle.Empty, new Rectangle(pt.X, pt.Y, 0, 0), false); 1162if (dragRect.Y - updatedRect.Y > halfGrid.Y) 1784offset.Y - _adornerWindowToScreenOffset.Y, 1823Point location = new(baseVar.X, baseVar.Y); 1825_statusCommandUI?.SetStatusInformation(new Rectangle(location.X, location.Y, offset.Width, offset.Height)); 1921_mouseDragOffset.Y = _mouseDragBase.Y; 1923_mouseDragOffset.Height = y - _mouseDragBase.Y; 1939_mouseDragBase.Y - _adornerWindowToScreenOffset.Y, 1940x - _mouseDragBase.X, y - _mouseDragBase.Y); 1943_mouseDragOffset.Height += offset.Y; 1976_mouseDragOffset.Y - _adornerWindowToScreenOffset.Y, 1990oldFrameRect.Y -= _adornerWindowToScreenOffset.Y; 2016_statusCommandUI?.SetStatusInformation(new Rectangle(offset.X, offset.Y, _mouseDragOffset.Width, _mouseDragOffset.Height)); 2191newLoc = new Point(controlLoc.X - parentLoc.X, controlLoc.Y - parentLoc.Y); 2196newLoc = new Point(controlLoc.X + oldParentLoc.X, controlLoc.Y + oldParentLoc.Y);
System\Windows\Forms\Design\ScrollableControlDesigner.cs (1)
33int hitTest = (int)PInvokeCore.SendMessage(f, PInvokeCore.WM_NCHITTEST, 0, PARAM.FromLowHigh(pt.X, pt.Y));
System\Windows\Forms\Design\SelectionUIHandler.cs (3)
443topProp.SetValue(component, adjustedLoc.Y); 447controls[i].Top = adjustedLoc.Y; 648Y = loc.Y;
System\Windows\Forms\Design\SelectionUIService.cs (13)
527if (((ISelectionUIService)this).BeginDrag(rules, anchor.X, anchor.Y)) 571if (((ISelectionUIService)this).BeginDrag(rules, anchor.X, anchor.Y)) 632Math.Abs(screenCoord.Y - _mouseDragAnchor.Y) < minDragSize.Height) 639if (((ISelectionUIService)this).BeginDrag(_dragRules, _mouseDragAnchor.X, _mouseDragAnchor.Y)) 660_mouseDragOffset.Y = screenCoord.Y - _mouseDragAnchor.Y; 680_mouseDragOffset.Y = screenCoord.Y - _mouseDragAnchor.Y; 681_mouseDragOffset.Height = _mouseDragAnchor.Y - screenCoord.Y; 685_mouseDragOffset.Height = screenCoord.Y - _mouseDragAnchor.Y;
System\Windows\Forms\Design\SelectionUIService.SelectionUIItem.cs (20)
250if (pt.Y >= _outerRect.Y && pt.Y <= _innerRect.Y) 255if (pt.Y >= _innerRect.Y + _innerRect.Height && pt.Y <= _outerRect.Y + _outerRect.Height) 260if (pt.Y >= _outerRect.Y + (_outerRect.Height - GRABHANDLE_HEIGHT) / 2 261&& pt.Y <= _outerRect.Y + (_outerRect.Height + GRABHANDLE_HEIGHT) / 2) 269if (pt.Y >= _outerRect.Y && pt.Y <= _innerRect.Y) 290Debug.Assert(!(pt.Y >= _outerRect.Y && pt.Y <= _innerRect.Y), "Should be handled by top right check"); 291if (pt.Y >= _innerRect.Y + _innerRect.Height && pt.Y <= _outerRect.Y + _outerRect.Height) 296if (pt.Y >= _outerRect.Y + (_outerRect.Height - GRABHANDLE_HEIGHT) / 2 297&& pt.Y <= _outerRect.Y + (_outerRect.Height + GRABHANDLE_HEIGHT) / 2) 305if (pt.Y >= _innerRect.Y + _innerRect.Height && pt.Y <= _outerRect.Y + _outerRect.Height) 395if (pt.Y < _outerRect.Y || pt.Y > _outerRect.Y + _outerRect.Height) 402&& pt.Y > _innerRect.Y 403&& pt.Y < _innerRect.Y + _innerRect.Height)
System\Windows\Forms\Design\StatusCommandUI.cs (1)
58bounds.Y = location.Y;
System\Windows\Forms\Design\TabControlDesigner.cs (1)
628y = p.Y;
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (11)
497Control existingControl = ((TableLayoutPanel)Control).GetControlFromPosition(newControlPosition.X, newControlPosition.Y); 583AddControlInternal(existingControl, oldPosition.X, oldPosition.Y); 593AddControlInternal(control, newControlPosition.X, newControlPosition.Y); 598Table.SetCellPosition(control, new TableLayoutPanelCellPosition(newControlPosition.X, newControlPosition.Y)); 1026if (pos.Y >= bounds.Bottom) 1030else if (pos.Y > bounds.Y) 1035if (pos.Y <= offset + rows[i]) 1270if (dropPoint.Y < 0 || dropPoint.Y >= rows.Length || dropPoint.X < 0 || dropPoint.X >= columns.Length) 1277Control existingControl = ((TableLayoutPanel)Control).GetControlFromPosition(dropPoint.X, dropPoint.Y); 1297_curRow = cell.Y;
System\Windows\Forms\Design\ToolStripDesigner.cs (1)
1820if (offset.Y <= parentToolStrip.Items[0].Bounds.Y)
System\Windows\Forms\Design\ToolStripItemBehavior.cs (3)
572if (dragBox != Rectangle.Empty && !dragBox.Contains(mouseLoc.X, mouseLoc.Y)) 991parentDesigner.DragBoxFromMouseDown = _dragBoxFromMouseDown = new Rectangle(new Point(mouseLoc.X - (dragSize.Width / 2), mouseLoc.Y - (dragSize.Height / 2)), dragSize); 1014ownerItemDesigner._dragBoxFromMouseDown = _dragBoxFromMouseDown = new Rectangle(new Point(mouseLoc.X - (dragSize.Width / 2), mouseLoc.Y - (dragSize.Height / 2)), dragSize);
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (1)
493y = p.Y;
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (1)
1376dropDownItem.DropDown.Location = new Point(dropDownItem.DropDown.Location.X + _commitedEditorNode.Bounds.Width - dropDownItem.Bounds.Width, dropDownItem.DropDown.Location.Y);
System.Windows.Forms.Primitives (11)
System\Windows\Forms\Automation\UiaTextRange.cs (4)
362Rectangle endlineRectangle = new(endlinePoint.X, endlinePoint.Y + 2, UiaTextProvider.EndOfLineWidth, Math.Abs(_provider.Logfont.lfHeight) + 1); 398Rectangle rectangle = new(startPoint.X, startPoint.Y + 2, endPoint.X - startPoint.X, clippingRectangle.Height); 403rectangle.Offset(mapClientToScreen.X, mapClientToScreen.Y); 864Rectangle rect = new(startPoint.X, startPoint.Y + 2, endPoint.X - startPoint.X, lineHeight);
System\Windows\Forms\DeviceContextExtensions.cs (5)
54DrawLine(hdc.HDC, hpen, p1.X, p1.Y, p2.X, p2.Y); 57DrawLine(hdc, hpen, p1.X, p1.Y, p2.X, p2.Y); 94PInvoke.MoveToEx(hdc, oldPoint.X, oldPoint.Y, lppt: null);
Windows\Win32\Foundation\Interop.PARAM.cs (1)
66=> FromLowHigh(point.X, point.Y);
Windows\Win32\UI\Accessibility\UiaPoint.cs (1)
12public static implicit operator UiaPoint(Point value) => new() { x = value.X, y = value.Y };
System.Windows.Forms.Primitives.TestUtilities (1)
Extensions\GdiExtensions.cs (1)
21float y = point.Y;
System.Windows.Forms.Tests (155)
System\Windows\Forms\AccessibleObjects\ComboBox.ComboBoxItemAccessibleObjectTests.cs (1)
413Assert.Equal(expectedPosition.Y, actual.Y);
System\Windows\Forms\AccessibleObjects\ListBoxAccessibleObjectTests.cs (1)
350var result = listBox.AccessibilityObject.HitTest(testPoint.X, testPoint.Y);
System\Windows\Forms\AccessibleObjects\ListVIew.ListViewAccessibleObjectTests.cs (2)
1179Assert.Null(listView.AccessibilityObject.HitTest(point.X, point.Y)); 1379listView.AccessibilityObject.HitTest(point.X, point.Y);
System\Windows\Forms\AccessibleObjects\TabControl.TabControlAccessibleObjectTests.cs (3)
296Assert.Equal(expectedAccessibleObject, accessibleObject.HitTest(point.X, point.Y)); 314Assert.Equal(expectedAccessibleObject, accessibleObject.HitTest(point.X, point.Y)); 332Assert.Equal(expectedAccessibleObject, accessibleObject.HitTest(point.X, point.Y));
System\Windows\Forms\AccessibleObjects\TrackBar.TrackBarAccessibleObjectTests.cs (3)
525accessibleObject.HitTest(pointInThumb.X, pointInThumb.Y).Should().Be(accessibleObject.ThumbAccessibleObject); 530accessibleObject.HitTest(pointInFirstButton.X, pointInFirstButton.Y).Should().Be(accessibleObject.FirstButtonAccessibleObject); 536accessibleObject.HitTest(pointInLastButton.X, pointInLastButton.Y).Should().Be(accessibleObject.LastButtonAccessibleObject);
System\Windows\Forms\AccessibleObjects\TreeView.TreeViewAccessibleObjectTests.cs (3)
236Assert.Null(accessibleObject.HitTest(point.X, point.Y)); 251Assert.Equal(accessibleObject, accessibleObject.HitTest(point.X, point.Y)); 265Assert.Equal(node.AccessibilityObject, control.AccessibilityObject.HitTest(point.X, point.Y));
System\Windows\Forms\CheckBoxRendererTests.cs (4)
28Point point = new(control.Location.X, control.Location.Y); 64Point point = new(control.Location.X, control.Location.Y); 101Point point = new(control.Location.X, control.Location.Y); 135Point point = new(control.Location.X, control.Location.Y);
System\Windows\Forms\ComboBox.ComboBoxUiaTextProviderTests.cs (8)
443Assert.True(actualPoint.Y >= expectedPoint.Y - 1 || actualPoint.Y <= expectedPoint.Y + 1); 509Assert.True(actualPoint.Y >= expectedPoint.Y - 1 || actualPoint.Y <= expectedPoint.Y + 1);
System\Windows\Forms\ComboBoxTests.cs (1)
2776public void OnMouseDown(Point p) => base.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, p.X, p.Y, 0));
System\Windows\Forms\ControlTests.Methods.cs (4)
12518yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(p.X, p.Y), (IntPtr)250, true }; 12524yield return new object[] { Size.Empty, PARAM.FromLowHigh(p.X, p.Y), IntPtr.Zero, true }; 12592yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(p.X, p.Y), (IntPtr)250 }; 12598yield return new object[] { Size.Empty, PARAM.FromLowHigh(p.X, p.Y), IntPtr.Zero };
System\Windows\Forms\ControlTests.Properties.cs (24)
7179Assert.Equal(value.Y, control.Top); 7180Assert.Equal(value.Y, control.Bottom); 7183Assert.Equal(new Rectangle(value.X, value.Y, 0, 0), control.Bounds); 7201Assert.Equal(value.Y, control.Top); 7202Assert.Equal(value.Y, control.Bottom); 7205Assert.Equal(new Rectangle(value.X, value.Y, 0, 0), control.Bounds); 7269Assert.Equal(value.Y, control.Top); 7270Assert.Equal(value.Y, control.Bottom); 7273Assert.Equal(new Rectangle(value.X, value.Y, 0, 0), control.Bounds); 7292Assert.Equal(value.Y, control.Top); 7293Assert.Equal(value.Y, control.Bottom); 7296Assert.Equal(new Rectangle(value.X, value.Y, 0, 0), control.Bounds); 7371Assert.Equal(value.Y, control.Top); 7372Assert.Equal(value.Y, control.Bottom); 7375Assert.Equal(new Rectangle(value.X, value.Y, 0, 0), control.Bounds); 7396Assert.Equal(value.Y, control.Top); 7397Assert.Equal(value.Y, control.Bottom); 7400Assert.Equal(new Rectangle(value.X, value.Y, 0, 0), control.Bounds); 7482Assert.Equal(value.Y, control.Top); 7483Assert.Equal(value.Y, control.Bottom); 7486Assert.Equal(new Rectangle(value.X, value.Y, 0, 0), control.Bounds); 7512Assert.Equal(value.Y, control.Top); 7513Assert.Equal(value.Y, control.Bottom); 7516Assert.Equal(new Rectangle(value.X, value.Y, 0, 0), control.Bounds);
System\Windows\Forms\CursorsTests.cs (2)
55Assert.True(hotSpot.Y >= 0 && hotSpot.Y <= cursor.Size.Height);
System\Windows\Forms\CursorTests.cs (6)
233Assert.True(hotSpot.Y >= 0 && hotSpot.Y <= cursor.Size.Height); 267Assert.True(position.Y >= virtualScreen.Y); 269Assert.True(position.Y <= virtualScreen.Bottom); 281Assert.True(position.Y >= 0); 287Assert.True(position.Y >= virtualScreen.Y);
System\Windows\Forms\ImageListTests.cs (1)
976list.Draw(graphics, pt.X, pt.Y, 0);
System\Windows\Forms\ListViewInsertionMarkTests.cs (1)
615Assert.Equal(2, pPt->Y);
System\Windows\Forms\MonthCalendarTests.cs (1)
4493hitTestInfo.Point.Y.Should().Be(y);
System\Windows\Forms\PropertyGridInternal\PropertyGridViewTests.Rendering.cs (2)
57Validate.TextOut(pt.Y.ToString(), new(145, 41, 5, 14), stateValidators: State.FontFace(Control.DefaultFont.Name))), 60Validate.TextOut(nameof(Point.Y), new(25, 42, 6, 14), stateValidators: State.FontFace(Control.DefaultFont.Name))),
System\Windows\Forms\RadioButtonRendererTests.cs (4)
27Point point = new(control.Location.X, control.Location.Y); 58Point point = new(control.Location.X, control.Location.Y); 95Point point = new(control.Location.X, control.Location.Y); 114Point point = new(control.Location.X, control.Location.Y);
System\Windows\Forms\SplitterPanelTests.cs (6)
547Assert.Equal(value.Y, control.Top); 548Assert.Equal(value.Y + 100, control.Bottom); 551Assert.Equal(new Rectangle(value.X, value.Y, 200, 100), control.Bounds); 569Assert.Equal(value.Y, control.Top); 570Assert.Equal(value.Y + 100, control.Bottom); 573Assert.Equal(new Rectangle(value.X, value.Y, 200, 100), control.Bounds);
System\Windows\Forms\TabPageTests.cs (18)
1905Assert.Equal(value.Y, control.Top); 1906Assert.Equal(value.Y + 100, control.Bottom); 1909Assert.Equal(new Rectangle(value.X, value.Y, 200, 100), control.Bounds); 1927Assert.Equal(value.Y, control.Top); 1928Assert.Equal(value.Y + 100, control.Bottom); 1931Assert.Equal(new Rectangle(value.X, value.Y, 200, 100), control.Bounds); 1995Assert.Equal(value.Y, control.Top); 1996Assert.Equal(value.Y + 100, control.Bottom); 1999Assert.Equal(new Rectangle(value.X, value.Y, 200, 100), control.Bounds); 2018Assert.Equal(value.Y, control.Top); 2019Assert.Equal(value.Y + 100, control.Bottom); 2022Assert.Equal(new Rectangle(value.X, value.Y, 200, 100), control.Bounds); 2096Assert.Equal(value.Y, control.Top); 2097Assert.Equal(value.Y + 100, control.Bottom); 2100Assert.Equal(new Rectangle(value.X, value.Y, 200, 100), control.Bounds); 2121Assert.Equal(value.Y, control.Top); 2122Assert.Equal(value.Y + 100, control.Bottom); 2125Assert.Equal(new Rectangle(value.X, value.Y, 200, 100), control.Bounds);
System\Windows\Forms\TextBoxBase.TextBoxBaseUiaTextProviderTests.cs (8)
407Assert.True(actualPoint.Y >= expectedPoint.Y - 1 || actualPoint.Y <= expectedPoint.Y + 1); 451Assert.True(actualPoint.Y >= expectedPoint.Y - 1 || actualPoint.Y <= expectedPoint.Y + 1);
System\Windows\Forms\ToolStripContentPanelTests.cs (6)
946Assert.Equal(value.Y, control.Top); 947Assert.Equal(value.Y + 100, control.Bottom); 950Assert.Equal(new Rectangle(value.X, value.Y, 200, 100), control.Bounds); 968Assert.Equal(value.Y, control.Top); 969Assert.Equal(value.Y + 100, control.Bottom); 972Assert.Equal(new Rectangle(value.X, value.Y, 200, 100), control.Bounds);
System\Windows\Forms\ToolStripDropDownTests.cs (7)
1932expected.Y = Math.Max(expected.Y, SystemInformation.WorkingArea.Y); 1972Assert.Equal(expected.Y, control.Top); 1973Assert.Equal(expected.Y + 25, control.Bottom); 1976Assert.Equal(new Rectangle(expected.X, expected.Y, 100, 25), control.Bounds); 1994Assert.Equal(expected.Y, control.Top); 1995Assert.Equal(expected.Y + 25, control.Bottom); 1998Assert.Equal(new Rectangle(expected.X, expected.Y, 100, 25), control.Bounds);
System\Windows\Forms\ToolStripTextBoxTests.cs (1)
790position.Y.Should().BeLessOrEqualTo(_toolStripTextBox.Height);
System\Windows\Forms\TreeViewTests.cs (24)
4920Assert.Null(control.GetNodeAt(pt.X, pt.Y)); 4924Assert.Null(control.GetNodeAt(pt.X, pt.Y)); 4935Assert.Same(node1, control.GetNodeAt(pt.X, pt.Y)); 4939Assert.Same(node1, control.GetNodeAt(pt.X, pt.Y)); 4950Assert.Null(control.GetNodeAt(pt.X, pt.Y)); 4954Assert.Null(control.GetNodeAt(pt.X, pt.Y)); 4971Assert.Null(control.GetNodeAt(pt.X, pt.Y)); 4978Assert.Null(control.GetNodeAt(pt.X, pt.Y)); 5000Assert.Same(node1, control.GetNodeAt(pt.X, pt.Y)); 5007Assert.Same(node1, control.GetNodeAt(pt.X, pt.Y)); 5029Assert.Null(control.GetNodeAt(pt.X, pt.Y)); 5036Assert.Null(control.GetNodeAt(pt.X, pt.Y)); 5268TreeViewHitTestInfo result = control.HitTest(pt.X, pt.Y); 5274result = control.HitTest(pt.X, pt.Y); 5287TreeViewHitTestInfo result = control.HitTest(pt.X, pt.Y); 5293result = control.HitTest(pt.X, pt.Y); 5306TreeViewHitTestInfo result = control.HitTest(pt.X, pt.Y); 5312result = control.HitTest(pt.X, pt.Y); 5331TreeViewHitTestInfo result = control.HitTest(pt.X, pt.Y); 5340result = control.HitTest(pt.X, pt.Y); 5364TreeViewHitTestInfo result = control.HitTest(pt.X, pt.Y); 5373result = control.HitTest(pt.X, pt.Y); 5397TreeViewHitTestInfo result = control.HitTest(pt.X, pt.Y); 5406result = control.HitTest(pt.X, pt.Y);
System\Windows\Forms\WebBrowserTests.cs (4)
4529yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(p.X, p.Y), (IntPtr)250, true }; 4535yield return new object[] { Size.Empty, PARAM.FromLowHigh(p.X, p.Y), IntPtr.Zero, true }; 4603yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(p.X, p.Y), (IntPtr)250 }; 4609yield return new object[] { Size.Empty, PARAM.FromLowHigh(p.X, p.Y), IntPtr.Zero };
TextBoxBaseTests.cs (10)
4857Assert.Equal(0, pt.Y); 4918Assert.Equal(0, pt.Y); 6982yield return new object[] { new Size(10, 20), shortcutsEnabled, PARAM.FromLowHigh(p.X, p.Y), (IntPtr)250, true, true }; 6988yield return new object[] { Size.Empty, shortcutsEnabled, PARAM.FromLowHigh(p.X, p.Y), expectedResult, false, true }; 7063yield return new object[] { new Size(10, 20), shortcutsEnabled, PARAM.FromLowHigh(p.X, p.Y), (IntPtr)250, true }; 7069yield return new object[] { Size.Empty, shortcutsEnabled, PARAM.FromLowHigh(p.X, p.Y), expectedResult, false }; 7828Assert.True(actualPoint.Y >= expectedPoint.Y - 1 || actualPoint.Y <= expectedPoint.Y + 1);
System.Windows.Forms.UI.IntegrationTests (85)
ButtonTests.cs (6)
264(int)Math.Round(65535.0 / verticalResolution * centerOnScreen.Y)); 270.MoveMouseTo(virtualPoint.X, virtualPoint.Y) 299Point virtualPoint = new((int)Math.Round(65535.0 / horizontalResolution * centerOnScreen.X), (int)Math.Round(65535.0 / verticalResolution * centerOnScreen.Y)); 300Point virtualPoint1 = new((int)Math.Round(65535.0 / horizontalResolution * centerOnScreen1.X), (int)Math.Round(65535.0 / verticalResolution * centerOnScreen1.Y)); 305.MoveMouseTo(virtualPoint.X, virtualPoint.Y) 306.MoveMouseTo(virtualPoint1.X, virtualPoint1.Y)
DataGridViewTests.cs (2)
34inputSimulator => inputSimulator.Mouse.MoveMouseTo(targetPoint.X, targetPoint.Y)); 63inputSimulator => inputSimulator.Mouse.MoveMouseTo(targetPoint.X, targetPoint.Y).Sleep(TimeSpan.FromMilliseconds(1000)));
DesignBehaviorsTests.cs (2)
129inputSimulator => inputSimulator.Mouse.MoveMouseTo(virtualPointStart.X + 6, virtualPointStart.Y + 6) 131.MoveMouseTo(virtualPointEnd.X, virtualPointEnd.Y)
DragDropTests.cs (62)
48.MoveMouseTo(targetMousePosition.X - 40, targetMousePosition.Y) 49.MoveMouseTo(targetMousePosition.X, targetMousePosition.Y) 50.MoveMouseTo(targetMousePosition.X + 2, targetMousePosition.Y + 2) 51.MoveMouseTo(targetMousePosition.X + 4, targetMousePosition.Y + 4) 103Point endCoordinates = new(startCoordinates.X + 5, startCoordinates.Y + 5); 111.MoveMouseTo(virtualPointStart.X + 6, virtualPointStart.Y + 6) 113.MoveMouseTo(virtualPointEnd.X, virtualPointEnd.Y) 114.MoveMouseTo(virtualPointEnd.X, virtualPointEnd.Y) 115.MoveMouseTo(virtualPointEnd.X + 2, virtualPointEnd.Y + 2) 116.MoveMouseTo(virtualPointEnd.X + 4, virtualPointEnd.Y + 4) 169WaitForExplorer(DragDrop, new Point(dragDropForm.Location.X + dragDropForm.Width, dragDropForm.Location.Y)); 200Y = (startCoordinates.Y - vscreen.Top) * DesktopNormalizedMax / vscreen.Height + DesktopNormalizedMax / (vscreen.Height * 2) 205Y = (endCoordinates.Y - vscreen.Top) * DesktopNormalizedMax / vscreen.Height + DesktopNormalizedMax / (vscreen.Height * 2) 259.MoveMouseToPositionOnVirtualDesktop(virtualPointStart.X, virtualPointStart.Y) 261.MoveMouseToPositionOnVirtualDesktop(virtualPointEnd.X, virtualPointEnd.Y) 262.MoveMouseToPositionOnVirtualDesktop(virtualPointEnd.X + 2, virtualPointEnd.Y + 2) 263.MoveMouseToPositionOnVirtualDesktop(virtualPointEnd.X + 4, virtualPointEnd.Y + 4) 264.MoveMouseToPositionOnVirtualDesktop(virtualPointEnd.X + 2, virtualPointEnd.Y + 2) 265.MoveMouseToPositionOnVirtualDesktop(virtualPointEnd.X + 4, virtualPointEnd.Y + 4) 266.MoveMouseToPositionOnVirtualDesktop(virtualPointEnd.X + 2, virtualPointEnd.Y + 2) 267.MoveMouseToPositionOnVirtualDesktop(virtualPointEnd.X + 4, virtualPointEnd.Y + 4) 268.MoveMouseToPositionOnVirtualDesktop(virtualPointEnd.X, virtualPointEnd.Y) 318Point endCoordinates = new(startCoordinates.X + 5, startCoordinates.Y + 5); 326.MoveMouseTo(virtualPointStart.X + 6, virtualPointStart.Y + 6) 328.MoveMouseTo(virtualPointEnd.X, virtualPointEnd.Y) 329.MoveMouseTo(virtualPointEnd.X, virtualPointEnd.Y) 330.MoveMouseTo(virtualPointEnd.X + 2, virtualPointEnd.Y + 2) 331.MoveMouseTo(virtualPointEnd.X + 4, virtualPointEnd.Y + 4) 389.MoveMouseTo(virtualPointStart.X + 6, virtualPointStart.Y + 6) 391.MoveMouseTo(virtualPointEnd.X, virtualPointEnd.Y) 392.MoveMouseTo(virtualPointEnd.X, virtualPointEnd.Y) 393.MoveMouseTo(virtualPointEnd.X + 2, virtualPointEnd.Y + 2) 394.MoveMouseTo(virtualPointEnd.X + 4, virtualPointEnd.Y + 4) 395.MoveMouseTo(virtualPointEnd.X + 2, virtualPointEnd.Y + 2) 396.MoveMouseTo(virtualPointEnd.X + 4, virtualPointEnd.Y + 4) 397.MoveMouseTo(virtualPointEnd.X + 2, virtualPointEnd.Y + 2) 398.MoveMouseTo(virtualPointEnd.X + 4, virtualPointEnd.Y + 4) 405.MoveMouseTo(virtualPointStart.X + 6, virtualPointStart.Y + 6) 407.MoveMouseTo(virtualPointEnd.X, virtualPointEnd.Y) 408.MoveMouseTo(virtualPointEnd.X, virtualPointEnd.Y) 409.MoveMouseTo(virtualPointEnd.X + 2, virtualPointEnd.Y + 2) 410.MoveMouseTo(virtualPointEnd.X + 4, virtualPointEnd.Y + 4) 411.MoveMouseTo(virtualPointEnd.X + 2, virtualPointEnd.Y + 2) 412.MoveMouseTo(virtualPointEnd.X + 4, virtualPointEnd.Y + 4) 413.MoveMouseTo(virtualPointEnd.X + 2, virtualPointEnd.Y + 2) 414.MoveMouseTo(virtualPointEnd.X + 4, virtualPointEnd.Y + 4) 437inputSimulator => inputSimulator.Mouse.MoveMouseTo(virtualPointStart.X, virtualPointStart.Y) 439.MoveMouseTo(virtualPointEnd.X, virtualPointEnd.Y) 473inputSimulator => inputSimulator.Mouse.MoveMouseTo(virtualToolStripItemCoordinates.X, virtualToolStripItemCoordinates.Y)); 480inputSimulator => inputSimulator.Mouse.MoveMouseTo(virtualPointStart.X, virtualPointStart.Y) 482.MoveMouseTo(virtualPointEnd.X, virtualPointEnd.Y) 528Point endCoordinates = new(startCoordinates.X + 5, startCoordinates.Y + 5); 536.MoveMouseTo(virtualPointStart.X + 6, virtualPointStart.Y + 6) 538.MoveMouseTo(virtualPointEnd.X, virtualPointEnd.Y) 539.MoveMouseTo(virtualPointEnd.X, virtualPointEnd.Y) 540.MoveMouseTo(virtualPointEnd.X + 2, virtualPointEnd.Y + 2) 541.MoveMouseTo(virtualPointEnd.X + 4, virtualPointEnd.Y + 4) 629startPosition.Y, 918((MousePosition.Y - _screenOffset.Y) < form.DesktopBounds.Top) || 919((MousePosition.Y - _screenOffset.Y) > form.DesktopBounds.Bottom))
Infra\ControlTestBase.cs (6)
186(int)Math.Ceiling((65535.0 / (primaryMonitor.Height - 1)) * point.Y)); 191TestOutputHelper.WriteLine($"Moving mouse to ({point.X}, {point.Y})."); 194TestOutputHelper.WriteLine($"Screen resolution of ({primaryMonitor.Width}, {primaryMonitor.Height}) translates mouse to ({virtualPoint.X}, {virtualPoint.Y})."); 196await InputSimulator.SendAsync(window, inputSimulator => inputSimulator.Mouse.MoveMouseTo(virtualPoint.X, virtualPoint.Y)); 206if (actualPoint.X != point.X || actualPoint.Y != point.Y)
Input\MouseSimulator.cs (1)
137return MoveMouseTo(virtualPoint.X, virtualPoint.Y);
ListBoxAccesibleObjectTests.cs (2)
41var result = listBox.AccessibilityObject.HitTest(testPoint.X, testPoint.Y); 57var result = listBox.AccessibilityObject.HitTest(testPoint.X, testPoint.Y);
ListViewTests.cs (1)
298listView.AccessibilityObject.HitTest(point.X, point.Y)!;
PropertyGridTests.cs (3)
233_propertyGrid.ContextMenuDefaultLocation.Y.Should().Be(oldLocation.Y + newLocation.Y);
WinFormsControlsTest (1)
MainForm.cs (1)
296+ padding * 2 + overarchingFlowLayoutPanel.Location.Y * 2);