168 writes to X
System.Drawing.Primitives (1)
System\Drawing\Point.cs (1)
155X += dx;
System.Windows.Forms (97)
System\Resources\ResXResourceReader.cs (1)
333pt.X = lineInfo.LinePosition;
System\Windows\Forms\Accessibility\LabelEditUiaTextProvider.cs (4)
130pt.X += EndOfLineWidth; // add 2 px to show the end of line 143pt.X += size.Width; 288clientLocation.X = Math.Max(clientLocation.X, clientRectangle.left); 289clientLocation.X = Math.Min(clientLocation.X, clientRectangle.right);
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (3)
283s_logPixels.X = PInvokeCore.GetDeviceCaps(dc, GET_DEVICE_CAPS_INDEX.LOGPIXELSX); 771X = (LogPixels.X * x + HiMetricPerInch / 2) / HiMetricPerInch, 1350X = (HiMetricPerInch * x + (LogPixels.X >> 1)) / LogPixels.X,
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxUiaTextProvider.cs (4)
185pt.X += EndOfLineWidth; // add 2 px to show the end of line 198pt.X += size.Width; 361clientLocation.X = Math.Max(clientLocation.X, clientRectangle.left); 362clientLocation.X = Math.Min(clientLocation.X, clientRectangle.right);
System\Windows\Forms\Controls\ComboBox\ComboBox.FlatComboAdapter.cs (2)
171middle.X -= (dropDownRect.Width % 2); 176middle.X += (dropDownRect.Width % 2);
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (1)
2354ptFirstDisplayedCellAddress.X = FirstDisplayedColumnIndex;
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (19)
12615_ptMouseEnteredCell.X = e.ColumnIndex; 12638_ptMouseEnteredCell.X = -2; 16121_ptMouseDownCell.X = hti._col; 16172_ptMouseEnteredCell.X = _ptMouseEnteredCell.Y = -2; 17404_ptCurrentCellCache.X = -1; 17415_ptCurrentCellCache.X = _ptCurrentCell.X; 17423_ptCurrentCellCache.X = -1; 18824pt.X += Width; 25855_ptMouseDownCell.X = -2; 26634_ptAnchorCell.X = dataGridViewColumn.Index; 26639_ptAnchorCell.X = -1; 26800_ptCurrentCell.X = columnIndex; 26934_ptCurrentCell.X = columnIndex; 26944_ptAnchorCell.X = columnIndex; 27006_ptAnchorCell.X = columnIndex; 27093_ptCurrentCell.X = -1; 27100_ptAnchorCell.X = -1; 28231_ptCurrentCellCache.X = _ptCurrentCell.X; 29212_ptMouseEnteredCell.X = _ptMouseEnteredCell.Y = -2;
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (2)
2157middle.X += (dropRect.Width % 2); 2181middle.X += ((dropRect.Width + 1) % 2);
System\Windows\Forms\Controls\DataGridView\DataGridViewUtilities.cs (9)
392ptTextLocation.X = cellBounds.X; 397ptTextLocation.X = cellBounds.X + (cellBounds.Width - sizeText.Width) / 2; 402ptTextLocation.X = cellBounds.Right - sizeText.Width; 407ptTextLocation.X = cellBounds.X; 412ptTextLocation.X = cellBounds.X + (cellBounds.Width - sizeText.Width) / 2; 417ptTextLocation.X = cellBounds.Right - sizeText.Width; 422ptTextLocation.X = cellBounds.X; 427ptTextLocation.X = cellBounds.X + (cellBounds.Width - sizeText.Width) / 2; 432ptTextLocation.X = cellBounds.Right - sizeText.Width;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (3)
1423location.X = Math.Min( 1661pt.X = RowValue; 3794location.X -= overhang;
System\Windows\Forms\Controls\TextBox\TextBoxBase.TextBoxBaseUiaTextProvider.cs (4)
126clientLocation.X = Math.Max(clientLocation.X, clientRectangle.left); 127clientLocation.X = Math.Min(clientLocation.X, clientRectangle.right); 334pt.X += EndOfLineWidth; // add 2 px to show the end of line 347pt.X += size.Width;
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (1)
375noMansLand.X += ClientSize.Width + 1;
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.ToolStripComboBoxControl.ToolStripComboBoxFlatComboAdapter.cs (1)
145middle.X += (dropDownRect.Width % 2);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (2)
1028offset.X = -dropDownBounds.Width; 1039offset.X = -dropDownBounds.Width;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownItem.cs (5)
307offset.X = -dropDownBounds.Width + Width; 317offset.X = -dropDownBounds.Width + Width; 321offset.X = Width; 325offset.X--; 331offset.X = -dropDownBounds.Width;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (4)
367nextPoint.X = _checkRectangle.Right + _checkPadding.Right + _imagePadding.Left; 409nextPoint.X = checkAndImageMarginWidth + 1; 419nextPoint.X = _imageMarginBounds.Right + _textPadding.Left; 424nextPoint.X = _textRectangle.Right + _textPadding.Right + _arrowPadding.Left;
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (3)
3452toPoint.X += currentToolStripItemLocation.X; 3464fromPoint.X += currentToolStripItemLocation.X; 3479fromPoint.X -= currentToolStripItemLocation.X;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.cs (2)
958cursorLoc.X += toolStripToDrag.GripRectangle.Width / 2; 964cursorLoc.X = Cursor.Position.X;
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (5)
1274start.X = overflowBoundsFill.Right + 1; 1275end.X = overflowBoundsFill.Right; 1303top1.X = overflowBoundsFill.Right + 1; 1304top2.X = overflowBoundsFill.Right; 1651middle.X += dropDownRect.Width % 2;
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackLayout.cs (2)
193_noMansLand.X += ToolStrip.ClientSize.Width + 1; 473itemLocation.X = bounds.X;
System\Windows\Forms\Controls\WebBrowser\WebBrowser.WebBrowserSite.cs (1)
48pt->X = -1;
System\Windows\Forms\Form.cs (5)
924loc.X -= screen.X; 3860p.X = (ownerRect.left + ownerRect.right - s.Width) / 2; 3863p.X = screenRect.X; 3867p.X = screenRect.X + screenRect.Width - s.Width; 3914p.X = Math.Max(screenRect.X, screenRect.X + (screenRect.Width - Width) / 2);
System\Windows\Forms\Layout\DefaultLayout.cs (1)
90location.X -= newSize.Width - oldBounds.Width;
System\Windows\Forms\Layout\FlowLayout.cs (1)
237location.X += requiredSize.Width;
System\Windows\Forms\Layout\LayoutUtils.cs (1)
436(point.Y, point.X) = (point.X, point.Y);
System\Windows\Forms\Printing\PrintPreviewControl.cs (8)
619_position.X = _hScrollBar.Value; 628offset.X -= Position.X; 643lastImageSize.X = 0; 667lastImageSize.X += imagePixels.Width; 935locPos.X = pos; 969locPos.X = pos; 1047locPos.X = pos; 1067locPos.X = pos;
System\Windows\Forms\ToolTip\ToolTip.cs (3)
1333p.X = visibleRect.left + visibleRect.Width / 2; 1935moveToLocation.X = screen.WorkingArea.Right - tipSize.Width; 1940moveToLocation.X = screen.WorkingArea.Left;
System.Windows.Forms.Design (58)
System\ComponentModel\Design\CollectionEditor.SplitButton.cs (1)
249middle.X += (dropDownRect.Width % 2);
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (2)
350editorLocation.X = Math.Min(rectScreen.Right - dropDownSize.Width, // min = right screen edge clip 374editorLocation.X = Math.Min(rectScreen.Right - dropDownSize.Width, // min = right screen edge clip
System\Drawing\Design\ColorEditor.ColorPalette.cs (4)
285SetFocus(_focus with { X = _focus.X - 1 }); 288SetFocus(_focus with { X = _focus.X + 1 }); 441newFocus.X = 0; 451newFocus.X = CellsAcross - 1;
System\Windows\Forms\Design\Behavior\BehaviorService.cs (1)
276pt.X -= c.Width;
System\Windows\Forms\Design\Behavior\DesignerActionGlyph.cs (3)
137topRight.X += relatedControl.Width; 155topRight.X = newRect.Right; 159topRight.X -= (GlyphImageOpened.Width + CONTROLOVERLAP_X);
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (2)
697offset.X = FindSmallestValidDistance(_verticalSnapLines, _verticalDistances, minRange, maxRange, directionOffset.X); 704offset.X *= -1;
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (4)
151offset.X = _parentGridSize.Width - xDelta; 155offset.X = -xDelta; 776newPosition.X += _lastSnapOffset.X; 790newPosition.X += _lastSnapOffset.X;
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (2)
275_parentLocation.X -= control.Location.X; 610mouseLoc.X += _lastSnapOffset.X;
System\Windows\Forms\Design\Behavior\ToolboxItemSnapLineBehavior.cs (5)
132offset.X = _lastRectangle.Left - mouseLoc.X; 138offset.X = _lastRectangle.Right - mouseLoc.X; 190offset.X = _lastRectangle.Left - mouseLoc.X; 196offset.X = _lastRectangle.Right - mouseLoc.X; 215offset.X = _lastRectangle.Left - mouseLoc.X;
System\Windows\Forms\Design\CommandSet.cs (20)
1059loc.X = primaryLocation.X + primarySize.Width - size.Width; 1067loc.X = primarySize.Width / 2 + primaryLocation.X - size.Width / 2; 1076loc.X = primaryLocation.X; 1191loc.X -= delta; 1195loc.X += (gridSize.Width - delta); 1350loc.X += deltaX; 1352loc.X -= deltaX; 2432loc.X = (loc.X / grid.Width) * grid.Width; 2799curLoc.X = lastLoc.X + lastSize.Width; 2805curLoc.X -= grid.Width * (n - primaryIndex); 2807curLoc.X = primaryLoc.X; 2811curLoc.X += grid.Width * (primaryIndex - n); 2813curLoc.X = primaryLoc.X; 2820curLoc.X += grid.Width * (n - primaryIndex); 2824curLoc.X -= grid.Width * (primaryIndex - n); 2829curLoc.X = lastLoc.X + lastSize.Width + nEqualDelta; 3253min.X = loc.X; 3263max.X = loc.X + size.Width; 3292parentOffset.X -= (max.X - min.X) / 2; 3385parentOffset.X = 0;
System\Windows\Forms\Design\ComponentTray.cs (3)
1311_mouseDragEnd.X = e.X; 1825_whiteSpace.X = _whiteSpace.X * 2 + 3; 1865newLoc.X = _whiteSpace.X;
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (1)
806controlOffset.X += Control.Width;
System\Windows\Forms\Design\SelectionUIHandler.cs (2)
283adjustedLoc.X = ctlBounds.lastRequestedX; 421adjustedLoc.X = newBounds.X;
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (6)
471newControlPosition.X = 0; 479newControlPosition.X = Table.ColumnCount - 1; 982position.X = columns.Length; 991position.X = i; 1005position.X = columns.Length; 1012position.X = i;
System\Windows\Forms\Design\TreeNodeCollectionEditor.cs (2)
530X = e.X, 573X = e.X,
System.Windows.Forms.Primitives (3)
System\Windows\Forms\Automation\UiaTextRange.cs (3)
794lineStartPoint.X -= UiaTextProvider.EndOfLineWidth; 849lineStartPoint.X = minX; 850lineEndPoint.X = maxX;
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)
713position.X--;
System\Windows\Forms\ToolStripDropDownTests.cs (1)
1931expected.X = Math.Max(expected.X, SystemInformation.WorkingArea.X);
System\Windows\Forms\TreeNode.IKeyboardToolTipTests.cs (1)
384position.X--;
System.Windows.Forms.UI.IntegrationTests (5)
DragDropTests.cs (2)
199X = (startCoordinates.X - vscreen.Left) * DesktopNormalizedMax / vscreen.Width + DesktopNormalizedMax / (vscreen.Width * 2), 204X = (endCoordinates.X - vscreen.Left) * DesktopNormalizedMax / vscreen.Width + DesktopNormalizedMax / (vscreen.Width * 2),
RichTextBoxTests.cs (3)
41pt.X += 2; 101pt.X += 2; 162pt.X += 2;
1710 references to X
PresentationUI (1)
MS\Internal\Documents\DialogDivider.cs (1)
54base.SetBoundsCore(Parent.Location.X, y, Parent.Size.Width, 1, specified);
System.ComponentModel.TypeConverter (2)
System\Drawing\PointConverter.cs (2)
77intConverter.ConvertToString(context, culture, pt.X), 87return new InstanceDescriptor(ctor, new object[] { pt.X, pt.Y });
System.Drawing.Common.Tests (11)
mono\System.Drawing\GraphicsTests.cs (1)
2953Assert.Equal(i, pts[i].X);
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)
41x = location.X; 63X = value.X; 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)
31width = pt.X;
System.Private.Windows.Core (2)
System\Private\Windows\Core\BinaryFormat\BinaryFormatWriter.cs (1)
146value.X,
Windows\Win32\Foundation\LPARAM.cs (1)
28public static explicit operator LPARAM(Point value) => MAKELPARAM(value.X, value.Y);
System.Windows.Forms (1070)
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); 388dataNodeInfo.ReaderPosition.X); 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)
288clientLocation.X = Math.Max(clientLocation.X, clientRectangle.left); 289clientLocation.X = Math.Min(clientLocation.X, clientRectangle.right);
System\Windows\Forms\ActiveX\AxHost.cs (3)
1096sz.Width = phm.X; 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); 701pSizel->Width = pt.X; 771X = (LogPixels.X * x + HiMetricPerInch / 2) / HiMetricPerInch, 1350X = (HiMetricPerInch * x + (LogPixels.X >> 1)) / LogPixels.X,
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); 8727viewportOrg.X, 8729viewportOrg.X + Width, 8756clientOffset = new(clientOffset.X - windowRect.left, clientOffset.Y - windowRect.top);
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (1)
398imageBounds.X = imageStart.X + 1;
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxUiaTextProvider.cs (2)
361clientLocation.X = Math.Max(clientLocation.X, clientRectangle.left); 362clientLocation.X = Math.Min(clientLocation.X, clientRectangle.right);
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 (25)
1135if (_ptCurrentCell.X != -1 && ColumnEditable(_ptCurrentCell.X)) 1701if (_ptCurrentCell.X == -1 && _ptCurrentCell.Y == -1) 1706Debug.Assert(_ptCurrentCell.X >= 0 && _ptCurrentCell.Y >= 0); 1707Debug.Assert(_ptCurrentCell.X < Columns.Count); 1710return dataGridViewRow.Cells[_ptCurrentCell.X]; 1714if ((value is not null && (value.RowIndex != _ptCurrentCell.Y || value.ColumnIndex != _ptCurrentCell.X)) 1715|| (value is null && _ptCurrentCell.X != -1)) 1775Debug.Assert(_ptCurrentCell.X >= 0 && _ptCurrentCell.X < Columns.Count); 1779DataGridViewCell dataGridViewCell = dataGridViewRow.Cells[_ptCurrentCell.X]; 1789if (_ptCurrentCell.X == -1) 1796bool previousVisibleColumnExists = (Columns.GetPreviousColumn(Columns[_ptCurrentCell.X], DataGridViewElementStates.Visible, DataGridViewElementStates.None) is not null); 1807if (_ptCurrentCell.X == -1) 1814bool nextVisibleColumnExists = (Columns.GetNextColumn(Columns[_ptCurrentCell.X], DataGridViewElementStates.Visible, DataGridViewElementStates.None) is not null); 1825if (_ptCurrentCell.X == -1) 1843if (_ptCurrentCell.X == -1) 2279if (firstDisplayedCellAddress.X >= 0) 2281return Rows[firstDisplayedCellAddress.Y].Cells[firstDisplayedCellAddress.X]; // un-shares the row of first displayed cell 2480if (_ptCurrentCell.X >= 0 2560if (_ptCurrentCell.X >= 0 2737&& !Columns[_ptCurrentCell.X].Frozen 2842=> _ptCurrentCell.X == -1 ? null : CurrentCellInternal.GetInheritedStyleInternal(_ptCurrentCell.Y); 3063if (value && _ptCurrentCell.X != -1 && IsCurrentCellInEditMode) 3135if (_ptCurrentCell.X != -1 && !SetCurrentCellAddressCore(
System\Windows\Forms\Controls\DataGridView\DataGridView.DataConnection.cs (4)
681Debug.Assert(_owner.CurrentCellAddress.X == -1); 1216int columnIndex = _owner.CurrentCellAddress.X == -1 ? _owner.FirstDisplayedColumnIndex : _owner.CurrentCellAddress.X; 1261if (rowIndex == _owner.CurrentCellAddress.Y && columnIndex == _owner.CurrentCellAddress.X)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (683)
23if (cellAddress.X < 0 || cellAddress.X >= Columns.Count) 34int visibleColumnIndex = Columns.ColumnIndexToActualDisplayIndex(cellAddress.X, DataGridViewElementStates.Visible); 2565public virtual bool BeginEdit(bool selectAll) => _ptCurrentCell.X == -1 2579Debug.Assert(_ptCurrentCell.X >= 0 && _ptCurrentCell.X < Columns.Count); 2586if (IsSharedCellReadOnly(dataGridViewCell, _ptCurrentCell.Y) || !ColumnEditable(_ptCurrentCell.X)) 2602DataGridViewCellCancelEventArgs dgvcce = new(_ptCurrentCell.X, _ptCurrentCell.Y); 2611if (_ptCurrentCell.X > -1) 2619if (IsSharedCellReadOnly(dataGridViewCell, _ptCurrentCell.Y) || !ColumnEditable(_ptCurrentCell.X)) 2723InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 3042if (_ptCurrentCell.X != -1) 3046int oldCurrentCellX = _ptCurrentCell.X; 3104_ptCurrentCell.X, 3130InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 3134else if (_ptCurrentCell.X == -1 && Focused) 3204int oldCurrentCellX = _ptCurrentCell.X; 3209if (currentCellDirty || _ptCurrentCell.Y == -1 || _ptCurrentCell.X == -1) 3308if (_ptCurrentCell.X > -1) 3425if (_ptCurrentCell.X != -1 && SelectionMode == DataGridViewSelectionMode.FullRowSelect) 3427InvalidateCellPrivate(_ptCurrentCell.X, -1); 3763Debug.Assert(_ptCurrentCell.X > -1); 3766if (_ptCurrentCell.X == -1) 3771OnCellLeave(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y); 3776if (_ptCurrentCell.X == -1) 3781OnRowLeave(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y); 3792if (_ptCurrentCell.X > -1 && _ptCurrentCell.Y > -1) 3794InvalidateCellPrivate(columnIndex: _ptCurrentCell.X, rowIndex: _ptCurrentCell.Y); 3802if (_ptCurrentCell.X == -1) 3807if (OnCellValidating(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y, context)) 3811if (_ptCurrentCell.X == -1) 3818_ptCurrentCell.X, 3826if (_ptCurrentCell.X == -1) 3831OnCellEnter(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y); 3834if (_ptCurrentCell.X == -1) 3841_ptCurrentCell.X, 3852if (_ptCurrentCell.X == -1) 3857OnCellValidated(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y); 3862if (_ptCurrentCell.X == -1 || !IsCurrentCellInEditMode) 3878Debug.Assert(_ptCurrentCell.X > -1); 3879if (_ptCurrentCell.X == -1) 3884if (OnCellValidating(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y, context)) 3886if (_ptCurrentCell.X == -1) 3893_ptCurrentCell.X, 3918if (_ptCurrentCell.X == -1) 3925_ptCurrentCell.X, 3960if (_ptCurrentCell.X == -1) 3965OnCellValidated(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y); 4025Debug.Assert(_ptCurrentCell.X > -1); 4026if (_ptCurrentCell.X == -1) 4031int columnIndex = _ptCurrentCell.X; 4089int columnIndexTmp = _ptCurrentCell.X; 4161if (forCurrentCellChange && _ptCurrentCell.X == -1 && lastVisibleRowIndex != -1) 5740Debug.Assert(_ptCurrentCell.X != -1); 5741int adjustedX = _editingPanel.Location.X + e.X; 5745adjustedX += EditingControl.Location.X; 5953Debug.Assert(_ptCurrentCell.X != -1); 5963Debug.Assert(_ptCurrentCell.X != -1); 6165if (_ptCurrentCell.X == -1) 6174int curColIndex = _ptCurrentCell.X; 6218if (curRowIndex != _ptCurrentCell.Y || curColIndex != _ptCurrentCell.X) 6242InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 6269InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 8692if (_ptAnchorCell.X != -1 8693&& Columns[_ptAnchorCell.X].Frozen 8721if (_ptAnchorCell.X != -1 8722&& (!Columns[_ptAnchorCell.X].Frozen || (_trackColumnEdge != -1 && !Columns[_trackColumnEdge].Frozen)) 8873if (((_ptAnchorCell.X != -1 && !Columns[_ptAnchorCell.X].Frozen) || (_ptCurrentCell.X != -1 && !Columns[_ptCurrentCell.X].Frozen)) 9636HitTestInfo hti = HitTest(ptMouse.X, ptMouse.Y); 9637int mouseX = ptMouse.X, mouseY = ptMouse.Y; 9648hti = HitTest(ptMouse.X + (RightToLeftInternal ? 1 : -1) * (xOffset + normOffset), mouseY); 9658ptMouse.X + (RightToLeftInternal ? 1 : -1) * (xOffset + normOffset), 9660: HitTest(ptMouse.X + (RightToLeftInternal ? 1 : -1) * (xOffset + normOffset), mouseY); 9699Debug.Assert(_ptCurrentCell.X == dataGridViewCell.ColumnIndex); 9700dataGridViewCell = Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X]; // un-share the edited cell 9710_ptCurrentCell.X, 9742_ptCurrentCell.X, 10113&& _ptCurrentCell.X != -1) 10393if (firstDisplayedCellAddress.X != -1 10397firstDisplayedCellAddress.X, 11905HitTestInfo hti = HitTest(ptGridCoord.X, ptGridCoord.Y); 11912Debug.Assert(_ptMouseDownCell.X == hti._col); 11964BeginMouseColumnResize(ptGridCoord.X, hti._mouseBarOffset, columnIndex); 11993BeginColumnRelocation(ptGridCoord.X, hti._col); 12032BeginRowHeadersResize(ptGridCoord.X, hti._mouseBarOffset); 12054if (_ptCurrentCell.X == -1) 12071if (_ptCurrentCell.X >= 0 && (_ptCurrentCell.X != hti._col || _ptCurrentCell.Y != hti._row)) 12076forCurrentCellChange: _ptCurrentCell.X != hti._col || _ptCurrentCell.Y != hti._row, 12096if (_ptCurrentCell.X == -1 && dataGridViewLastVisibleColumn is not null) 12112if (_ptCurrentCell.X == -1 && lastVisibleRowIndex != -1) 12158int oldEdgeColumnIndex = _ptCurrentCell.X; 12160if (_ptAnchorCell.X == -1) 12166_ptAnchorCell.X, 12210if (MultiSelect && isShiftDown && _ptAnchorCell.X > -1 && Columns[_ptAnchorCell.X].Selected) 12257if (Columns.DisplayInOrder(_ptAnchorCell.X, hti._col)) 12259SelectColumnRange(_ptAnchorCell.X, hti._col, true); 12263SelectColumnRange(hti._col, _ptAnchorCell.X, true); 12348int oldEdgeColumnIndex = _ptCurrentCell.X; 12350if (_ptAnchorCell.X == -1) 12356_ptAnchorCell.X, 12554int oldEdgeColumnIndex = _ptCurrentCell.X; 12556if (_ptAnchorCell.X == -1) 12562_ptAnchorCell.X, 12683&& _ptMouseDownCell.X >= 0 12684&& _ptMouseDownCell.X < Columns.Count) 12688HitTestInfo hti = HitTest(ptGridCoord.X, ptGridCoord.Y); 12703if (Math.Abs(_ptMouseDownGridCoord.X - ptGridCoord.X) >= s_dragSize.Width 12706BeginColumnRelocation(_ptMouseDownGridCoord.X, _ptMouseDownCell.X); 12768int oldEdgeColumnIndex = _ptCurrentCell.X; 12770if ((hti._col != _ptCurrentCell.X || hti._row != _ptCurrentCell.Y) 12780if (_ptAnchorCell.X == -1 || IsInnerCellOutOfBounds(hti._col, hti._row)) 12786_ptAnchorCell.X, 12793if (hti._col != _ptCurrentCell.X || hti._row != _ptCurrentCell.Y) 12827&& _ptCurrentCell.X == dataGridViewCell.ColumnIndex 12835&& ColumnEditable(_ptCurrentCell.X) 13703if (rowIndex > -1 && hti._col != _ptCurrentCell.X) 13706int oldCurrentCellX = _ptCurrentCell.X; 13772if (MultiSelect && isShiftDown && _ptAnchorCell.X > -1 && Columns[_ptAnchorCell.X].Selected) 13828if (Columns.DisplayInOrder(_ptAnchorCell.X, hti._col)) 13830SelectColumnRange(_ptAnchorCell.X, hti._col, true); 13834SelectColumnRange(hti._col, _ptAnchorCell.X, true); 13845if (hti._col != _ptCurrentCell.X) 13867else if (_ptCurrentCell.X != -1) 13871_ptCurrentCell.X, 14132if (_ptCurrentCell.X != -1 && hti._col != _ptCurrentCell.X && !CommitEditForOperation(hti._col, _ptCurrentCell.Y, true)) 14214if (_ptCurrentCell.X != -1 && hti._col != _ptCurrentCell.X) 14442&& dataGridViewColumn.Index == _ptCurrentCell.X 14448&& ColumnEditable(_ptCurrentCell.X) 14525PositionEditingControl(_ptCurrentCell.X != e.Column.Index, true, false); 14547if (_ptMouseDownCell.X == -2 14549&& _ptMouseDownCell.X == columnIndex 14551&& (_ptMouseDownCell.X == -1 14553|| (columnIndex == _ptCurrentCell.X && rowIndex == _ptCurrentCell.Y)))) 14728else if (dataGridViewColumn.Visible && _ptCurrentCell.X == dataGridViewColumn.Index) 14749if (_ptCurrentCell.X == dataGridViewColumn.Index 14849if (_ptCurrentCell.X == dataGridViewCell.ColumnIndex 14966if (Focused && EditMode == DataGridViewEditMode.EditOnEnter && _ptCurrentCell.X > -1 && !IsCurrentCellInEditMode) 15019if (_ptCurrentCell.X > -1) 15027_ptCurrentCell.X, 15031if (_ptCurrentCell.X == -1) 15036OnCellEnter(ref dataGridViewCell, _ptCurrentCell.X, _ptCurrentCell.Y); 15041InvalidateCellPrivate(_ptCurrentCell.X, -1); 15050if (_ptCurrentCell.X > -1 && !IsCurrentCellInEditMode) 15056if (_ptCurrentCell.X > -1 && CurrentCellInternal.EditType is null && !_dataGridViewOper[OperationInMouseDown]) 15061InvalidateCellPrivate(columnIndex: _ptCurrentCell.X, rowIndex: _ptCurrentCell.Y); 15070InvalidateCellPrivate(columnIndex: _ptCurrentCell.X, rowIndex: _ptCurrentCell.Y); 15193if (_ptCurrentCell.X != -1) 15195InvalidateCell(_ptCurrentCell.X, _ptCurrentCell.Y); 15202&& _ptCurrentCell.X > -1) 15235if (_ptCurrentCell.X == -1) 15241ScrollIntoView(_ptCurrentCell.X, _ptCurrentCell.Y, forCurrentCellChange: false); 15275if (newCurrentCell.X != -1) 15277Debug.Assert(_ptCurrentCell.X == -1); 15279newCurrentCell.X, 15315Debug.Assert(_ptCurrentCell.X == -1); 15317newCurrentCell.X, 15355Debug.Assert(_ptCurrentCell.X == -1); 15357newCurrentCell.X, 15414if (_ptCurrentCell.X != -1) 15416newCurrentCell = new Point(columnIndexInserted <= _ptCurrentCell.X ? _ptCurrentCell.X + 1 : _ptCurrentCell.X, 15536newCurrentCell = new Point(_ptCurrentCell.X, _ptCurrentCell.Y + insertionCount); 15619newCurrentCell = new Point(_ptCurrentCell.X, _ptCurrentCell.Y + dataGridViewRows.Length); 15682if (_ptCurrentCell.X != -1) 15741if (_ptCurrentCell.X != -1) 15775if (_ptCurrentCell.X != -1) 15818if (_ptCurrentCell.X > -1 && !_dataGridViewState1[State1_LeavingWithTabKey]) 15821OnCellLeave(ref dataGridViewCell, _ptCurrentCell.X, _ptCurrentCell.Y); 15822if (_ptCurrentCell.X == -1) 15827OnRowLeave(ref dataGridViewCell, _ptCurrentCell.X, _ptCurrentCell.Y); 15835if (_ptCurrentCell.X > -1 && _ptCurrentCell.Y > -1) 15837InvalidateCellPrivate(columnIndex: _ptCurrentCell.X, rowIndex: _ptCurrentCell.Y); 15851if (_ptCurrentCell.X != -1) 15853InvalidateCell(_ptCurrentCell.X, _ptCurrentCell.Y); 15876if (_ptMouseDownCell.X == hti._col 15879|| _ptMouseDownCell.X == -1 15881|| (_ptMouseDownCell.X == _ptCurrentCell.X && _ptMouseDownCell.Y == _ptCurrentCell.Y))) 15965if (_ptMouseDownCell.X == hti._col && _ptMouseDownCell.Y == hti._row) 16108if (_ptMouseDownCell.X != -2) 16163if (!mouseOverEditingPanel && !mouseOverEditingControl && !mouseOverToolTipControl && _ptMouseEnteredCell.X != -2) 16165if (_ptMouseEnteredCell.X >= -1 && _ptMouseEnteredCell.X < Columns.Count 16168OnCellMouseLeave(new(_ptMouseEnteredCell.X, _ptMouseEnteredCell.Y)); 16376&& _ptMouseDownCell.X == hti._col 16513if (_ptCurrentCell.X >= 0 && !CommitEdit( 16556if (_ptCurrentCell.X >= 0 && !CommitEdit( 16865&& _ptCurrentCell.X != -1 16866&& ColumnEditable(_ptCurrentCell.X) 16870&& !Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X].ReadOnly) // Un-shares the row 16903if (newCurrentCell.X != -1) 16905Debug.Assert(_ptCurrentCell.X == -1); 16907newCurrentCell.X, 16956Debug.Assert(_ptCurrentCell.X == -1); 16958newCurrentCell.X, 17038if (_ptCurrentCell.X != -1) 17040int newX = _ptCurrentCell.X; 17041if (columnIndex == _ptCurrentCell.X) 17068else if (columnIndex < _ptCurrentCell.X) 17070newX = _ptCurrentCell.X - 1; 17074if (columnIndex == _ptCurrentCell.X) 17288newCurrentCell = new Point(_ptCurrentCell.X, newY); 17397if (_ptCurrentCellCache.X != -1) 17399if (!IsInnerCellOutOfBounds(_ptCurrentCellCache.X, _ptCurrentCellCache.Y)) 17401SetCurrentCellAddressCore(_ptCurrentCellCache.X, _ptCurrentCellCache.Y, false, false, false); 17411if (_ptCurrentCell.X == dataGridViewRow.Index && _ptCurrentCell.Y == columnIndex) 17415_ptCurrentCellCache.X = _ptCurrentCell.X; 17556&& _ptCurrentCell.X == -1 17959int oldCurrentCellX = _ptCurrentCell.X; 18020if (_ptCurrentCell.X == -1 && lastVisibleRowIndex != -1) 18153_ptCurrentCell.X, 18413&& !CommitEditForOperation(_ptCurrentCell.X, hti._row, forCurrentCellChange: true)) 18497bool success = SetCurrentCellAddressCore(_ptCurrentCell.X, 18693&& !Columns[_ptCurrentCell.X].ReadOnly 18694&& ColumnEditable(_ptCurrentCell.X) 18707if (_ptCurrentCell.X != -1 && dataGridViewRow.Index == _ptCurrentCell.Y && EditingControl is not null) 18819if (pt.X < 0 && step < 0) 18821Invalidate(new Rectangle(new Point(-pt.X, ColumnHeadersHeight), new Size(-step, ClientSize.Height))); 18829if (pt.X > rect.Right && step > 0) 18831Invalidate(new Rectangle(new Point(ClientSize.Width - (pt.X - rect.Right) - step, ColumnHeadersHeight), 18988if (_ptCurrentCell.X != -1) 18992_ptCurrentCell.X, 19071if (_ptCurrentCell.X >= 0) 19074if (OnRowValidating(ref dataGridViewCellTmp, _ptCurrentCell.X, _ptCurrentCell.Y)) 19081if (_ptCurrentCell.X == -1) 19086OnRowValidated(ref dataGridViewCellTmp, _ptCurrentCell.X, _ptCurrentCell.Y); 19089if (DataSource is not null && _ptCurrentCell.X >= 0 && AllowUserToAddRowsInternal && NewRowIndex == _ptCurrentCell.Y) 19096_ptCurrentCell.X, 19812Debug.Assert(dataGridViewCell.ColumnIndex == _ptCurrentCell.X); 19826int leftEdge = GetColumnXFromIndex(_ptCurrentCell.X); 19829leftEdge -= Columns[_ptCurrentCell.X].Width - 1; 19833Columns[_ptCurrentCell.X].Width, Rows.SharedRow(_ptCurrentCell.Y).GetHeight(_ptCurrentCell.Y)); 19836if (!Columns[_ptCurrentCell.X].Frozen) 19872bool isFirstDisplayedColumn = FirstDisplayedColumnIndex == _ptCurrentCell.X; 20084if (_ptCurrentCell.X > -1 20187if (_ptCurrentCell.X == -1) 20213if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20219int oldEdgeColumnIndex = _ptCurrentCell.X; 20221if (_ptCurrentCell.X == -1 || _ptAnchorCell.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20228_ptAnchorCell.X, 20234success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, false, false, false); 20242if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20247if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20254SetSelectedCellCore(_ptCurrentCell.X, lastVisibleRowIndex, true); 20255success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, true, false, false); 20265if (_ptCurrentCell.X == -1) 20285if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20290if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20297SetSelectedCellCore(_ptCurrentCell.X, lastVisibleRowIndex, true); 20298success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, true, false, false); 20310if (_ptCurrentCell.X == -1) 20336if (!ScrollIntoView(_ptCurrentCell.X, nextVisibleRowIndex, true)) 20341if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 20349int oldEdgeColumnIndex = _ptCurrentCell.X; 20351if (_ptAnchorCell.X == -1) 20358_ptAnchorCell.X, 20368SetSelectedCellCore(_ptCurrentCell.X, nextVisibleRowIndex, true); 20371success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextVisibleRowIndex, !MultiSelect, false, false); 20380if (_ptCurrentCell.X == -1) 20406if (!ScrollIntoView(_ptCurrentCell.X, nextVisibleRowIndex, forCurrentCellChange: true)) 20411if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 20418SetSelectedCellCore(_ptCurrentCell.X, nextVisibleRowIndex, true); 20420_ptCurrentCell.X, 20440if (_ptCurrentCell.X == -1) 20462if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20467if (_ptAnchorCell.Y == -1 || _ptCurrentCell.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20476success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, false, false, false); 20484if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20489if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20497success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, true, false, false); 20507if (_ptCurrentCell.X == -1) 20527if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20532if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20540success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, true, false, false); 20552if (_ptCurrentCell.X == -1) 20578if (!ScrollIntoView(_ptCurrentCell.X, nextVisibleRowIndex, true)) 20583if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 20592if (_ptAnchorCell.X == -1) 20612success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextVisibleRowIndex, !MultiSelect, false, false); 20621if (_ptCurrentCell.X == -1) 20647if (!ScrollIntoView(_ptCurrentCell.X, nextVisibleRowIndex, true)) 20652if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 20660success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextVisibleRowIndex, true, false, false); 20676if (_ptCurrentCell.X == -1) 20698if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20717int oldEdgeColumnIndex = _ptCurrentCell.X; 20720_ptAnchorCell.X, 20728success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, false, false, false); 20736if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20754SetSelectedCellCore(_ptCurrentCell.X, _ptCurrentCell.Y, false); 20755SetSelectedCellCore(_ptCurrentCell.X, lastVisibleRowIndex, true); 20758success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, true, false, false); 20768if (_ptCurrentCell.X == -1) 20788if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20807SetSelectedCellCore(_ptCurrentCell.X, lastVisibleRowIndex, true); 20810success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, true, false, false); 20822if (_ptCurrentCell.X == -1) 20848if (!ScrollIntoView(_ptCurrentCell.X, nextVisibleRowIndex, true)) 20888int oldEdgeColumnIndex = _ptCurrentCell.X; 20890if (_ptAnchorCell.X == -1) 20897_ptAnchorCell.X, 20907SetSelectedCellCore(_ptCurrentCell.X, nextVisibleRowIndex, true); 20911success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextVisibleRowIndex, !MultiSelect, false, false); 20920if (_ptCurrentCell.X == -1) 20946if (!ScrollIntoView(_ptCurrentCell.X, nextVisibleRowIndex, true)) 20965SetSelectedCellCore(_ptCurrentCell.X, nextVisibleRowIndex, true); 20968success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextVisibleRowIndex, true, false, false); 20982if (_ptCurrentCell.X == -1) 21002if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 21007if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 21013success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, true, false, false); 21022if (_ptCurrentCell.X == -1) 21048if (!ScrollIntoView(_ptCurrentCell.X, nextVisibleRowIndex, true)) 21053if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 21059success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextVisibleRowIndex, true, false, false); 21115if (MultiSelect && _ptAnchorCell.X >= 0) 21117int oldEdgeColumnIndex = _ptCurrentCell.X; 21120_ptAnchorCell.X, 21164if (MultiSelect && _ptAnchorCell.X >= 0) 21174int oldEdgeColumnIndex = _ptCurrentCell.X; 21177_ptAnchorCell.X, 21242if (MultiSelect && _ptCurrentCell.X >= 0) 21244SelectColumnRange(_ptAnchorCell.X, lastVisibleColumnIndex, true); 21281if (_ptCurrentCell.X >= 0 && Columns[_ptCurrentCell.X].Selected) 21286if (_ptAnchorCell.X == -1) 21291SelectColumnRange(_ptAnchorCell.X, lastVisibleColumnIndex, true); 21298if (MultiSelect && _ptCurrentCell.X >= 0) 21300int oldEdgeColumnIndex = _ptCurrentCell.X; 21302if (_ptAnchorCell.X == -1) 21308_ptAnchorCell.X, 21336if (_ptCurrentCell.X >= 0 && Columns[_ptCurrentCell.X].Selected) 21428if (_ptCurrentCell.X != -1) 21467int columnIndex = _ptCurrentCell.X; 21510if (_ptCurrentCell.X != -1 && !IsCurrentCellInEditMode && ModifierKeys == 0) 21516|| !ColumnEditable(_ptCurrentCell.X)); 21518if (ColumnEditable(_ptCurrentCell.X) 21522bool success = ScrollIntoView(_ptCurrentCell.X, _ptCurrentCell.Y, forCurrentCellChange: false); 21539if (_ptCurrentCell.X != -1) 21541DataGridViewColumn dataGridViewColumn = Columns[_ptCurrentCell.X]; 21589if (MultiSelect && _ptAnchorCell.X >= 0) 21591int oldEdgeColumnIndex = _ptCurrentCell.X; 21594_ptAnchorCell.X, 21638if (MultiSelect && _ptAnchorCell.X >= 0) 21648int oldEdgeColumnIndex = _ptCurrentCell.X; 21651_ptAnchorCell.X, 21716if (MultiSelect && _ptCurrentCell.X >= 0) 21718if (_ptAnchorCell.X == -1) 21723SelectColumnRange(firstVisibleColumnIndex, _ptAnchorCell.X, true); 21760if (_ptCurrentCell.X >= 0 && Columns[_ptCurrentCell.X].Selected) 21765if (_ptAnchorCell.X == -1) 21770SelectColumnRange(firstVisibleColumnIndex, _ptAnchorCell.X, true); 21777if (MultiSelect && _ptCurrentCell.X >= 0) 21779int oldEdgeColumnIndex = _ptCurrentCell.X; 21781if (_ptAnchorCell.X == -1) 21787_ptAnchorCell.X, 21815if (_ptCurrentCell.X >= 0 && Columns[_ptCurrentCell.X].Selected) 21887if (_ptCurrentCell.X != -1) 21893&& ColumnEditable(_ptCurrentCell.X) 21911bool success = ScrollIntoView(_ptCurrentCell.X, _ptCurrentCell.Y, false); 22014if ((keyData & Keys.Alt) == Keys.Alt && AllowUserToResizeColumns && _ptCurrentCell.X != -1) 22018DataGridViewColumn dataGridViewColumn = Columns[_ptCurrentCell.X]; 22023BeginKeyboardColumnResize(_ptCurrentCell.X); 22050if (CurrentCell is null || _ptCurrentCell.X == -1 || _ptCurrentCell.Y == -1) 22092if (_ptCurrentCell.X != -1) 22094dataGridViewColumn = Columns.GetPreviousColumn(Columns[_ptCurrentCell.X], 22118if (_ptCurrentCell.X == -1) 22151Debug.Assert(_ptAnchorCell.X >= 0); 22152int oldEdgeColumnIndex = _ptCurrentCell.X; 22154if (_ptAnchorCell.X == -1) 22160_ptAnchorCell.X, 22179if (_ptCurrentCell.X == -1) 22229if (_ptCurrentCell.X == -1) 22263if (_ptAnchorCell.X == -1) 22268if (Columns.DisplayInOrder(_ptAnchorCell.X, previousVisibleColumnIndex)) 22270SelectColumnRange(_ptAnchorCell.X, previousVisibleColumnIndex, true); 22274SelectColumnRange(previousVisibleColumnIndex, _ptAnchorCell.X, true); 22288if (_ptCurrentCell.X == -1) 22338if (_ptCurrentCell.X == -1) 22364if (_ptCurrentCell.X == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22369if (Columns[_ptCurrentCell.X].Selected) 22374if (_ptAnchorCell.X == -1) 22379if (Columns.DisplayInOrder(_ptAnchorCell.X, previousVisibleColumnIndex)) 22381SelectColumnRange(_ptAnchorCell.X, previousVisibleColumnIndex, true); 22385SelectColumnRange(previousVisibleColumnIndex, _ptAnchorCell.X, true); 22395int oldEdgeColumnIndex = _ptCurrentCell.X; 22397if (_ptAnchorCell.X == -1) 22403_ptAnchorCell.X, 22423if (_ptCurrentCell.X == -1) 22449if (_ptCurrentCell.X == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22454if (Columns[_ptCurrentCell.X].Selected) 22480if (_ptCurrentCell.X == -1) 22542if (_ptCurrentCell.X == -1) 22565Debug.Assert(_ptAnchorCell.X >= 0); 22566int oldEdgeColumnIndex = _ptCurrentCell.X; 22568if (_ptAnchorCell.X == -1 || _ptCurrentCell.X == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22574_ptAnchorCell.X, 22614if (_ptCurrentCell.X == -1) 22662if (_ptCurrentCell.X == -1) 22690if (_ptAnchorCell.X == -1 || _ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22696Debug.Assert(_ptAnchorCell.X >= 0); 22697SelectColumnRange(firstVisibleColumnIndex, _ptAnchorCell.X, true); 22708if (_ptCurrentCell.X == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22713SetSelectedColumnCore(_ptCurrentCell.X, false); 22722if (_ptCurrentCell.X == -1) 22760if (_ptCurrentCell.X == -1) 22783if (_ptAnchorCell.X == -1 || _ptCurrentCell.X == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22788Debug.Assert(_ptAnchorCell.X >= 0); 22789if (Columns[_ptCurrentCell.X].Selected) 22792SelectColumnRange(firstVisibleColumnIndex, _ptAnchorCell.X, true); 22796int oldEdgeColumnIndex = _ptCurrentCell.X; 22799_ptAnchorCell.X, 22817if (_ptCurrentCell.X == -1 || IsInnerCellOutOfBounds(firstVisibleColumnIndex, firstVisibleRowIndex)) 22822if (Columns[_ptCurrentCell.X].Selected) 22824SetSelectedColumnCore(_ptCurrentCell.X, false); 22829SetSelectedCellCore(_ptCurrentCell.X, _ptCurrentCell.Y, false); 22840if (_ptCurrentCell.X == -1) 22861if (_ptCurrentCell.X == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22866if (Columns[_ptCurrentCell.X].Selected) 22885if (_ptCurrentCell.X == -1) 22959if (!ScrollIntoView(_ptCurrentCell.X == -1 ? firstVisibleColumnIndex : _ptCurrentCell.X, 22997if (_ptCurrentCell.X == -1) 23030if (!ScrollIntoView(_ptCurrentCell.X, nextScreenVisibleRowIndex, true)) 23035if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextScreenVisibleRowIndex)) 23043int oldEdgeColumnIndex = _ptCurrentCell.X; 23051_ptAnchorCell.X, 23061SetSelectedCellCore(_ptCurrentCell.X, nextScreenVisibleRowIndex, true); 23064success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextScreenVisibleRowIndex, false, false, false); 23069if (!ScrollIntoView(_ptCurrentCell.X, nextScreenVisibleRowIndex, true)) 23074if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextScreenVisibleRowIndex)) 23102success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextScreenVisibleRowIndex, false, false, false); 23106if (!ScrollIntoView(_ptCurrentCell.X, nextScreenVisibleRowIndex, true)) 23111if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextScreenVisibleRowIndex)) 23138int oldEdgeColumnIndex = _ptCurrentCell.X; 23141_ptAnchorCell.X, 23159SetSelectedCellCore(_ptCurrentCell.X, nextScreenVisibleRowIndex, true); 23163success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextScreenVisibleRowIndex, !MultiSelect, false, false); 23167if (!ScrollIntoView(_ptCurrentCell.X, nextScreenVisibleRowIndex, true)) 23172if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextScreenVisibleRowIndex)) 23177success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextScreenVisibleRowIndex, true, false, false); 23241_ptCurrentCell.X == -1 ? firstVisibleColumnIndex : _ptCurrentCell.X, 23257if (_ptCurrentCell.X == -1) 23289if (!ScrollIntoView(_ptCurrentCell.X, previousScreenVisibleRowIndex, true)) 23294if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousScreenVisibleRowIndex)) 23302int oldEdgeColumnIndex = _ptCurrentCell.X; 23304if (_ptAnchorCell.X == -1) 23310_ptAnchorCell.X, 23320SetSelectedCellCore(_ptCurrentCell.X, previousScreenVisibleRowIndex, true); 23323SetCurrentCellAddressCore(_ptCurrentCell.X, previousScreenVisibleRowIndex, false, false, false); 23327if (!ScrollIntoView(_ptCurrentCell.X, previousScreenVisibleRowIndex, true)) 23332if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousScreenVisibleRowIndex)) 23360SetCurrentCellAddressCore(_ptCurrentCell.X, previousScreenVisibleRowIndex, false, false, false); 23364if (!ScrollIntoView(_ptCurrentCell.X, previousScreenVisibleRowIndex, true)) 23369if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousScreenVisibleRowIndex)) 23396int oldEdgeColumnIndex = _ptCurrentCell.X; 23399_ptAnchorCell.X, 23417SetSelectedCellCore(_ptCurrentCell.X, previousScreenVisibleRowIndex, true); 23421SetCurrentCellAddressCore(_ptCurrentCell.X, previousScreenVisibleRowIndex, !MultiSelect, false, false); 23425if (!ScrollIntoView(_ptCurrentCell.X, previousScreenVisibleRowIndex, true)) 23430if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousScreenVisibleRowIndex)) 23435SetCurrentCellAddressCore(_ptCurrentCell.X, previousScreenVisibleRowIndex, true, false, false); 23471if (_ptCurrentCell.X != -1) 23473dataGridViewColumn = Columns.GetNextColumn(Columns[_ptCurrentCell.X], 23497if (_ptCurrentCell.X == -1) 23530int oldEdgeColumnIndex = _ptCurrentCell.X; 23532if (_ptAnchorCell.X == -1) 23538_ptAnchorCell.X, 23557if (_ptCurrentCell.X == -1) 23607if (_ptCurrentCell.X == -1) 23641if (_ptAnchorCell.X == -1) 23646if (Columns.DisplayInOrder(_ptAnchorCell.X, nextVisibleColumnIndex)) 23648SelectColumnRange(_ptAnchorCell.X, nextVisibleColumnIndex, true); 23652SelectColumnRange(nextVisibleColumnIndex, _ptAnchorCell.X, true); 23666if (_ptCurrentCell.X == -1) 23716if (_ptCurrentCell.X == -1) 23747if (Columns[_ptCurrentCell.X].Selected) 23752if (_ptAnchorCell.X == -1) 23757if (Columns.DisplayInOrder(_ptAnchorCell.X, nextVisibleColumnIndex)) 23759SelectColumnRange(_ptAnchorCell.X, nextVisibleColumnIndex, true); 23763SelectColumnRange(nextVisibleColumnIndex, _ptAnchorCell.X, true); 23775if (_ptAnchorCell.X == -1) 23780int oldEdgeColumnIndex = _ptCurrentCell.X; 23783_ptAnchorCell.X, 23803if (_ptCurrentCell.X == -1) 23829if (_ptCurrentCell.X == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23834if (Columns[_ptCurrentCell.X].Selected) 23860if (_ptCurrentCell.X == -1) 23922if (_ptCurrentCell.X == -1) 23950Debug.Assert(_ptAnchorCell.X >= 0); 23951if (_ptAnchorCell.X == -1) 23956int oldEdgeColumnIndex = _ptCurrentCell.X; 23959_ptAnchorCell.X, 23979if (_ptCurrentCell.X == -1) 24017if (_ptCurrentCell.X == -1) 24045if (_ptAnchorCell.X == -1) 24051Debug.Assert(_ptAnchorCell.X >= 0); 24052SelectColumnRange(_ptAnchorCell.X, lastVisibleColumnIndex, true); 24058SetSelectedColumnCore(_ptCurrentCell.X, false); 24067if (_ptCurrentCell.X == -1) 24105if (_ptCurrentCell.X == -1) 24133Debug.Assert(_ptAnchorCell.X >= 0); 24134if (_ptAnchorCell.X == -1) 24139if (Columns[_ptCurrentCell.X].Selected) 24142SelectColumnRange(_ptAnchorCell.X, lastVisibleColumnIndex, true); 24146int oldEdgeColumnIndex = _ptCurrentCell.X; 24149_ptAnchorCell.X, 24162if (Columns[_ptCurrentCell.X].Selected) 24164SetSelectedColumnCore(_ptCurrentCell.X, false); 24169SetSelectedCellCore(_ptCurrentCell.X, _ptCurrentCell.Y, false); 24180if (_ptCurrentCell.X == -1) 24206if (Columns[_ptCurrentCell.X].Selected) 24225if (_ptCurrentCell.X == -1) 24268if ((keyData & (Keys.Control | Keys.Shift | Keys.Alt)) == Keys.Shift && _ptCurrentCell.X != -1) 24287if (_selectedBandIndexes[bandIndex] != _ptCurrentCell.X) 24299if (!Columns[_ptCurrentCell.X].Selected) 24301Debug.Assert(!_selectedBandIndexes.Contains(_ptCurrentCell.X)); 24302SetSelectedColumnCore(_ptCurrentCell.X, true); 24567if (_ptCurrentCell.X == -1) 24583if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 24588if (_ptAnchorCell.X == -1 || _ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 24594int oldEdgeColumnIndex = _ptCurrentCell.X; 24597_ptAnchorCell.X, 24603SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, false, false, false); 24607if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 24612if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 24618SetSelectedCellCore(_ptCurrentCell.X, firstVisibleRowIndex, true); 24619SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, true, false, false); 24625if (_ptCurrentCell.X == -1) 24639if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 24644if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 24650SetSelectedCellCore(_ptCurrentCell.X, firstVisibleRowIndex, true); 24651SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, true, false, false); 24659if (_ptCurrentCell.X == -1) 24678if (!ScrollIntoView(_ptCurrentCell.X, previousVisibleRowIndex, true)) 24683if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex)) 24696int oldEdgeColumnIndex = _ptCurrentCell.X; 24699_ptAnchorCell.X, 24709SetSelectedCellCore(_ptCurrentCell.X, previousVisibleRowIndex, true); 24712SetCurrentCellAddressCore(_ptCurrentCell.X, previousVisibleRowIndex, !MultiSelect, false, false); 24717if (_ptCurrentCell.X == -1) 24736if (!ScrollIntoView(_ptCurrentCell.X, previousVisibleRowIndex, true)) 24741if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex)) 24747SetSelectedCellCore(_ptCurrentCell.X, previousVisibleRowIndex, selected: true); 24749_ptCurrentCell.X, 24765if (_ptCurrentCell.X == -1) 24781if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 24786if (_ptAnchorCell.X == -1 || _ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 24794SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, false, false, false); 24798if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 24803if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 24810SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, true, false, false); 24816if (_ptCurrentCell.X == -1) 24830if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 24835if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 24842SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, true, false, false); 24850if (_ptCurrentCell.X == -1) 24869if (!ScrollIntoView(_ptCurrentCell.X, previousVisibleRowIndex, true)) 24874if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex)) 24901SetCurrentCellAddressCore(_ptCurrentCell.X, previousVisibleRowIndex, !MultiSelect, false, false); 24906if (_ptCurrentCell.X == -1) 24925if (!ScrollIntoView(_ptCurrentCell.X, previousVisibleRowIndex, true)) 24930if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex)) 24937SetCurrentCellAddressCore(_ptCurrentCell.X, previousVisibleRowIndex, true, false, false); 24949if (_ptCurrentCell.X == -1) 24965if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 24970if (_ptAnchorCell.X == -1 || _ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 24983int oldEdgeColumnIndex = _ptCurrentCell.X; 24986_ptAnchorCell.X, 24994SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, false, false, false); 24998if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 25003if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 25015SetSelectedCellCore(_ptCurrentCell.X, _ptCurrentCell.Y, false); 25016SetSelectedCellCore(_ptCurrentCell.X, firstVisibleRowIndex, true); 25019SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, true, false, false); 25025if (_ptCurrentCell.X == -1) 25039if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 25044if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 25057SetSelectedCellCore(_ptCurrentCell.X, firstVisibleRowIndex, true); 25060SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, true, false, false); 25068if (_ptCurrentCell.X == -1) 25087if (!ScrollIntoView(_ptCurrentCell.X, previousVisibleRowIndex, true)) 25092if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex)) 25123int oldEdgeColumnIndex = _ptCurrentCell.X; 25131_ptAnchorCell.X, 25141SetSelectedCellCore(_ptCurrentCell.X, previousVisibleRowIndex, true); 25145SetCurrentCellAddressCore(_ptCurrentCell.X, previousVisibleRowIndex, !MultiSelect, false, false); 25150if (_ptCurrentCell.X == -1) 25169if (!ScrollIntoView(_ptCurrentCell.X, previousVisibleRowIndex, true)) 25174if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex)) 25187SetSelectedCellCore(_ptCurrentCell.X, previousVisibleRowIndex, true); 25190SetCurrentCellAddressCore(_ptCurrentCell.X, previousVisibleRowIndex, true, false, false); 25200if (_ptCurrentCell.X == -1) 25219if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, forCurrentCellChange: true)) 25224if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 25229SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, true, false, false); 25234if (_ptCurrentCell.X == -1) 25253if (!ScrollIntoView(_ptCurrentCell.X, previousVisibleRowIndex, true)) 25258if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex)) 25263SetCurrentCellAddressCore(_ptCurrentCell.X, previousVisibleRowIndex, true, false, false); 25280if (_ptCurrentCell.X != -1 && !IsCurrentCellInEditMode && ColumnEditable(_ptCurrentCell.X)) 25289bool success = ScrollIntoView(_ptCurrentCell.X, _ptCurrentCell.Y, false); 25320InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 25362_ptCurrentCell.X, 25375dataGridViewCurrentCell = Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X]; 25400dataGridViewCurrentCell = Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X]; 25482if (_ptCurrentCell.X != -1 && IsCurrentCellInEditMode) 26021if (!committed && _ptCurrentCell.X >= 0 && !CommitEdit( 26023forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26039if (!committed && _ptCurrentCell.X >= 0 && !CommitEdit( 26041forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26053if (!committed && _ptCurrentCell.X >= 0 && !CommitEdit( 26055forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26220if (_ptCurrentCell.X >= 0 && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex)) 26281if (!committed && _ptCurrentCell.X >= 0 && !CommitEdit( 26283forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26310if (!committed && _ptCurrentCell.X >= 0 && !CommitEdit( 26312forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26795if (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex) 26815int oldCurrentCellX = _ptCurrentCell.X; 26861Debug.Assert(oldCurrentCellX == _ptCurrentCell.X); 26956OnCellEnter(ref dataGridViewCellTmp, _ptCurrentCell.X, _ptCurrentCell.Y); 26971InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 26978&& _ptCurrentCell.X != -1 26996if (_ptCurrentCell.X != -1) 26998AccessibilityNotifyCurrentCellChanged(new Point(_ptCurrentCell.X, _ptCurrentCell.Y)); 27025int oldCurrentCellX = _ptCurrentCell.X; 27066Debug.Assert(oldCurrentCellX == _ptCurrentCell.X); 27091if (_ptCurrentCell.X != -1) 28231_ptCurrentCellCache.X = _ptCurrentCell.X; 28299if (_ptCurrentCellCache.X != -1) 28301if (!IsInnerCellOutOfBounds(_ptCurrentCellCache.X, _ptCurrentCellCache.Y)) 28304_ptCurrentCellCache.X, 28507if (_ptCurrentCell.X != -1) 28509dataGridViewColumn = Columns.GetNextColumn(Columns[_ptCurrentCell.X], 28529if (_ptCurrentCell.X == -1) 28557if (_ptCurrentCell.X == -1) 28580if (_ptCurrentCell.X == -1) 28603if (_ptCurrentCell.X == -1) 28634if (_ptCurrentCell.X == -1) 28668if (_ptCurrentCell.X != -1) 28670dataGridViewColumn = Columns.GetPreviousColumn(Columns[_ptCurrentCell.X], 28698if (_ptCurrentCell.X == -1) 28726if (_ptCurrentCell.X == -1) 28749if (_ptCurrentCell.X == -1) 28772if (_ptCurrentCell.X == -1) 28803if (_ptCurrentCell.X == -1) 29166HitTestInfo htiToUse = hti ?? HitTest(ptMouse.X, ptMouse.Y); 29172if (_ptMouseEnteredCell.X != htiToUse._col || _ptMouseEnteredCell.Y != htiToUse._row) 29175if (_ptMouseEnteredCell.X >= -1 29176&& _ptMouseEnteredCell.X < Columns.Count 29180dgvce = new DataGridViewCellEventArgs(_ptMouseEnteredCell.X, _ptMouseEnteredCell.Y); 29200else if (_ptMouseEnteredCell.X != -2) 29202if (_ptMouseEnteredCell.X >= -1 29203&& _ptMouseEnteredCell.X < Columns.Count 29207DataGridViewCellEventArgs dgvce = new(_ptMouseEnteredCell.X, _ptMouseEnteredCell.Y); 29876HitTestInfo hti = HitTest(ptMouse.X, ptMouse.Y); 29877int mouseX = ptMouse.X, mouseY = ptMouse.Y; 29902? HitTest(ptMouse.X - xOffset - (xOffset / Math.Abs(xOffset)), 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; 543ColumnIndex == DataGridView.MouseDownCellAddress.X && 566if (e.ColumnIndex == DataGridView.MouseDownCellAddress.X && 663bool cellCurrent = (ptCurrentCell.X == ColumnIndex && ptCurrentCell.Y == rowIndex); 729DataGridView.MouseEnteredCellAddress.X == ColumnIndex && s_mouseInContentBounds) 785DataGridView.MouseEnteredCellAddress.X == ColumnIndex && s_mouseInContentBounds) 822DataGridView.MouseEnteredCellAddress.X == ColumnIndex && 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)
406return ptCurrentCell.X != -1 && 407ptCurrentCell.X == ColumnIndex && 1488if (ColumnIndex == ptCurrentCell.X && rowIndex == ptCurrentCell.Y) 2709if (ptCurrentCell.X != -1 && 2710ptCurrentCell.X == ColumnIndex &&
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (11)
433return ptCurrentCell.X == ColumnIndex && 520if (ptCurrentCell.X == ColumnIndex && 767return ColumnIndex == DataGridView.MouseDownCellAddress.X && rowIndex == DataGridView.MouseDownCellAddress.Y; 789if (ptCurrentCell.X == ColumnIndex && 893ColumnIndex == DataGridView.MouseDownCellAddress.X && 916if (e.ColumnIndex == DataGridView.MouseDownCellAddress.X && 1073if (ptCurrentCell.X == ColumnIndex && 1139ptCurrentCell.X == ColumnIndex && 1160&& DataGridView.MouseEnteredCellAddress.X == ColumnIndex 1294DataGridView.MouseEnteredCellAddress.X == ColumnIndex && 1436&& DataGridView.MouseEnteredCellAddress.X == ColumnIndex
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (49)
809DataGridView.MouseEnteredCellAddress.X == ColumnIndex) 1017sortGlyphLocation.X, 1019sortGlyphLocation.X + s_sortGlyphWidth / 2 - 1, 1022sortGlyphLocation.X + 1, 1024sortGlyphLocation.X + s_sortGlyphWidth / 2 - 1, 1027sortGlyphLocation.X + s_sortGlyphWidth / 2, 1029sortGlyphLocation.X + s_sortGlyphWidth - 2, 1032sortGlyphLocation.X + s_sortGlyphWidth / 2, 1034sortGlyphLocation.X + s_sortGlyphWidth - 3, 1037sortGlyphLocation.X, 1039sortGlyphLocation.X + s_sortGlyphWidth - 2, 1046sortGlyphLocation.X, 1048sortGlyphLocation.X + s_sortGlyphWidth / 2 - 1, 1051sortGlyphLocation.X + 1, 1053sortGlyphLocation.X + s_sortGlyphWidth / 2 - 1, 1056sortGlyphLocation.X + s_sortGlyphWidth / 2, 1058sortGlyphLocation.X + s_sortGlyphWidth - 2, 1061sortGlyphLocation.X + s_sortGlyphWidth / 2, 1063sortGlyphLocation.X + s_sortGlyphWidth - 3, 1066sortGlyphLocation.X, 1068sortGlyphLocation.X + s_sortGlyphWidth - 2, 1077sortGlyphLocation.X + line, 1079sortGlyphLocation.X + s_sortGlyphWidth - line - 1, 1084sortGlyphLocation.X + s_sortGlyphWidth / 2, 1086sortGlyphLocation.X + s_sortGlyphWidth / 2, 1101sortGlyphLocation.X, 1103sortGlyphLocation.X + s_sortGlyphWidth / 2 - 1, 1106sortGlyphLocation.X + 1, 1108sortGlyphLocation.X + s_sortGlyphWidth / 2 - 1, 1111sortGlyphLocation.X + s_sortGlyphWidth / 2, 1113sortGlyphLocation.X + s_sortGlyphWidth - 2, 1116sortGlyphLocation.X + s_sortGlyphWidth / 2, 1118sortGlyphLocation.X + s_sortGlyphWidth - 3, 1121sortGlyphLocation.X, 1123sortGlyphLocation.X + s_sortGlyphWidth - 2, 1130sortGlyphLocation.X, 1132sortGlyphLocation.X + s_sortGlyphWidth / 2 - 1, 1135sortGlyphLocation.X + 1, 1137sortGlyphLocation.X + s_sortGlyphWidth / 2 - 1, 1140sortGlyphLocation.X + s_sortGlyphWidth / 2, 1142sortGlyphLocation.X + s_sortGlyphWidth - 2, 1145sortGlyphLocation.X + s_sortGlyphWidth / 2, 1147sortGlyphLocation.X + s_sortGlyphWidth - 3, 1150sortGlyphLocation.X, 1152sortGlyphLocation.X + s_sortGlyphWidth - 2, 1161sortGlyphLocation.X + line, 1163sortGlyphLocation.X + s_sortGlyphWidth - line - 1, 1168sortGlyphLocation.X + s_sortGlyphWidth / 2, 1170sortGlyphLocation.X + s_sortGlyphWidth / 2,
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (11)
1670if (ptCurrentCell.X == e.ColumnIndex && ptCurrentCell.Y == e.RowIndex) 1894DataGridView.MouseEnteredCellAddress.X == ColumnIndex; 1901DataGridView.MouseEnteredCellAddress.X == ColumnIndex && 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)
433&& ColumnIndex == DataGridView.MouseDownCellAddress.X 467if (ColumnIndex == DataGridView.MouseDownCellAddress.X && 492Debug.Assert(ColumnIndex == DataGridView.MouseDownCellAddress.X);
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (1)
891&& ptCurrentCell.X == ColumnIndex
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (1)
911bool cellCurrent = ptCurrentCell.X == ColumnIndex && ptCurrentCell.Y == rowIndex;
System\Windows\Forms\Controls\DataGridView\DataGridViewRowCollection.cs (1)
2139DataGridView.OnRowCollectionChanged_PostNotification(recreateNewRow, newCurrentCell.X == -1, cca, dataGridViewRow, rowIndex);
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (1)
687DataGridView.MouseEnteredCellAddress.X == -1)
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 (6)
3210return FindNearestItem(dir, point.X, point.Y); 3701public ListViewHitTestInfo HitTest(Point point) => HitTest(point.X, point.Y); 4376item = GetItemAt(pos.X, pos.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 (2)
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));
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 (1)
309int x = _detailsTextBox.Location.X;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (37)
457return new Point(point.X + (rect.Width / 2), point.Y + (rect.Height / 2)); 619return new Rectangle(pt.X, pt.Y, rect.Width, rect.Height); 678g.TranslateTransform(newOrigin.X, newOrigin.Y); 679r.Offset(-newOrigin.X, -newOrigin.Y); 1073return _location.X + GetEntryLabelIndent(gridEntry) + size.Width; 1084return length > _location.X + LabelWidth; 1111clipRect.Offset(-newOrigin.X, -newOrigin.Y); 1166clipRect.Offset(-newOrigin.X, -newOrigin.Y); 1425Math.Max(rectScreen.X, location.X + rect.X + rect.Width - size.Width)); 1454_dropDownHolder.SetBounds(location.X, location.Y, size.Width, size.Height); 1653if (x < 0 || x > size.Width + _location.X) 1659if (x > LabelWidth + _location.X) 1884rect.X = _location.X; 1901rect.X = _location.X + LabelWidth; 2100int startPS = _location.X; 2596if (Math.Abs(screenPoint.X - _rowSelectPos.X) < SystemInformation.DoubleClickSize.Width && 3025if (point == InvalidPosition || (point.X != RowLabel && point.X != RowValue)) 3033onLabel = point.X == RowLabel; 3047if ((rowMoveCurrent != TipRow || point.X != TipColumn) && !_flags.HasFlag(Flags.IsSplitterMove)) 3055Rectangle itemRect = GetRectangle(point.Y, point.X); 3060TipColumn = point.X; 3070TipColumn = point.X; 3308int lineEnd = location.X + size.Width; 3309int lineStart = location.X; 3791int overhang = toolTip.Location.X + toolTip.Size.Width - SystemInformation.VirtualScreen.Width; 4430_labelWidth = _location.X + (int)(size.Width / _labelRatio); 4448_labelRatio = GetOurSize().Width / (double)(oldWidth - _location.X); 4829if (_labelWidth > _location.X + size.Width) 4831_labelWidth = _location.X + (int)(size.Width / _labelRatio); 4835_labelRatio = GetOurSize().Width / (double)(_labelWidth - _location.X); 5251mouseLoc = FindPosition(mouseLoc.X, mouseLoc.Y); 5266Rectangle itemRect = GetRectangle(mouseLoc.Y, mouseLoc.X); 5270if (mouseLoc.X == RowLabel) 5272tipPt = curEntry.GetLabelToolTipLocation(mouseLoc.X - itemRect.X, mouseLoc.Y - itemRect.Y); 5274else if (mouseLoc.X == RowValue)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (2)
454int delta = dragPoint.X - _dragStart.X;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.PropertyGridViewAccessibleObject.cs (1)
435Point position = owner.FindPosition(point.X, point.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)
132MousePosition.X, 138MousePosition.X, 233MousePosition.X, 239MousePosition.X,
System\Windows\Forms\Controls\Splitter\Splitter.cs (2)
774delta = x - _anchor.X; 958int size = GetSplitSize(splitTarget, x - Left + _anchor.X, y - Top + _anchor.Y);
System\Windows\Forms\Controls\TabControl\TabControl.cs (2)
388r.X -= p.X; 589if (value.X < 0 || value.Y < 0)
System\Windows\Forms\Controls\TextBox\TextBoxBase.TextBoxBaseUiaTextProvider.cs (2)
126clientLocation.X = Math.Max(clientLocation.X, clientRectangle.left); 127clientLocation.X = Math.Min(clientLocation.X, clientRectangle.right);
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (1)
592int deltaRightEdge = Math.Abs(rootHwndClientArea.right - gripLocation.X);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (7)
2165int oppositeSide = otherItemMidLocation.X - midPointOfCurrent.X; 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);
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)
132int deltaX = currentLocation.X - _startLocation.X;
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (3)
3452toPoint.X += currentToolStripItemLocation.X; 3464fromPoint.X += currentToolStripItemLocation.X; 3479fromPoint.X -= currentToolStripItemLocation.X;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.cs (4)
809if (clientLocation.X < 0 || clientLocation.Y < 0) 867index = (clientLocation.X <= Padding.Left) ? 0 : index; 894Point endLocation = (Orientation == Orientation.Horizontal) ? new Point(clientLocation.X, row.Bounds.Y) : new Point(row.Bounds.X, clientLocation.Y); 964cursorLoc.X = Cursor.Position.X;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.HorizontalRowManager.cs (6)
149int deltaX = clientEndLocation.X - clientStartLocation.X; 421if (Row.Cells[index].Bounds.X >= locationToDrag.X) 449requiredSpace += locationToDrag.X; 496lastCellMargin.Left = Math.Max(0, locationToDrag.X - nextCell.Bounds.Right); 543cellMargin.Left = Math.Max(0, locationToDrag.X - Row.Margin.Left);
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (27)
195middle.X - Offset2X, 197middle.X + Offset2X, 200middle.X - Offset2X + 1 + rightToLeftShift, 202middle.X + Offset2X + 1 + rightToLeftShift, 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 (2)
213if ((orig.Left + widthUnit) >= check.X) 217else if ((orig.Right - widthUnit) <= check.X)
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.cs (1)
1353if (location.X == -1)
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); 1130sz.Width = phm.X;
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); 1370Location.X, 3861if (p.X < screenRect.X) 3865else if (p.X + s.Width > screenRect.X + screenRect.Width) 6910if (point.X >= (clientSize.Width - 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)
31X = location.X;
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) 1356_splitterRect.X = Location.X + SplitterDistanceInternal; 1388r.X = Panel1.Location.X + splitSize; 1491delta = x - _anchor.X; 1571_splitterRect.X = ((RightToLeft == RightToLeft.Yes) ? Width - _splitterDistance - SplitterWidthInternal : Location.X + _splitterDistance); 1578_splitterRect.X = Location.X;
System\Windows\Forms\Layout\FlowLayout.ContainerProxy.cs (3)
71pt.Offset(0, ptScroll.X); 75pt.Offset(ptScroll.X, 0); 161pt.Offset(ptScroll.X, 0);
System\Windows\Forms\Layout\FlowLayout.cs (2)
243if (location.X > rowBounds.Right) 252rowSize.Width = location.X - rowBounds.X;
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)
628offset.X -= Position.X; 631int borderPixelsX = PhysicalToPixels(Border, _screenDPI.X); 664int x = offset.X + borderPixelsX * (column + 1) + lastImageSize.X; 752new(PixelsToPhysical(pixels.Width, dpi.X), PixelsToPhysical(pixels.Height, dpi.Y)); 758new(PhysicalToPixels(physical.Width, dpi.X), PhysicalToPixels(physical.Height, dpi.Y)); 764_hScrollBar.Value = Math.Clamp(value.X, _hScrollBar.Minimum, _hScrollBar.Maximum); 919pos = vertical ? locPos.Y : locPos.X; 952pos = vertical ? locPos.Y : locPos.X; 1037pos = locPos.X; 1055pos = locPos.X;
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)
47viewportOrg.X + bounds.Left, 49viewportOrg.X + bounds.Right, 60viewportOrg.X + bounds.Left,
System\Windows\Forms\Scrolling\ScrollableControl.cs (4)
130SetDisplayRectLocation(-value.X, -value.Y); 839SetDisplayRectLocation(scrollLocation.X, scrollLocation.Y); 898xCalc += activeControl.AutoScrollOffset.X; 1119if (pt.X != 0 || pt.Y != 0)
System\Windows\Forms\ToolTip\ToolTip.cs (13)
1320if (cursorLocation.X < rect.left || cursorLocation.X > rect.right || 1336SetTrackPosition(p.X, p.Y); 1410int pointX = r.left + point.X; 1430int pointX = r.left + point.X; 1498pointX = optimalPoint.X; 1933if (moveToLocation.X + tipSize.Width > screen.WorkingArea.Right) 1938if (moveToLocation.X < screen.WorkingArea.Left) 1952moveToLocation.X, 2012if (cursorLocation.X >= r.left && cursorLocation.X <= r.right && 2185wp->x = cursorPos.X; 2205wp->x = tipInfo.Position.X;
System.Windows.Forms.Design (344)
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 (4)
177_button.Location = new Point(EditRegionLocation.X + EditRegionSize.Width - buttonHeight - EditorLineButtonPadding, EditRegionLocation.Y + EditorLineButtonPadding + 1); 300g.DrawImage(_swatch, new Point(EditRegionRelativeLocation.X + 2, EditorLineSwatchPadding + 5)); 351Math.Max(rectScreen.X, editorLocation.X + editorBounds.Right - dropDownSize.Width)); // max = left screen edge clip 375Math.Max(rectScreen.X, editorLocation.X - editorBounds.Width)); // max = left screen edge clip
System\ComponentModel\Design\DesignerActionPanel.TextBoxPropertyLine.cs (1)
114EditControl!.Location = new Point(_editRegionLocation.X + GetTextBoxLeftPadding(textBoxPreferredHeight) + 1 + specialPadding, _editRegionLocation.Y + TextBoxLineInnerPadding + 1);
System\ComponentModel\Design\MultilineStringEditor.MultilineStringEditorUI.cs (1)
168int maxDelta = location.X - workingArea.Left;
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); 285SetFocus(_focus with { X = _focus.X - 1 }); 288SetFocus(_focus with { X = _focus.X + 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); 439if (newFocus.X < 0) 449if (newFocus.X >= CellsAcross)
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)
215controlRect.X += offset.X; // offset for non-client area 690if (directionOffset.X != 0) 695int minRange = directionOffset.X < 0 ? 0 : currentBounds.X; 696int maxRange = directionOffset.X < 0 ? currentBounds.Right : int.MaxValue; 697offset.X = FindSmallestValidDistance(_verticalSnapLines, _verticalDistances, minRange, maxRange, directionOffset.X); 698if (offset.X != 0) 701IdentifyAndStoreValidLines(_verticalSnapLines, _verticalDistances, currentBounds, offset.X); 702if (directionOffset.X < 0) 732_cachedDragRect.Offset(offset.X, offset.Y); 733if (offset.X != 0) 1100_dragOffset = new Point(dragBounds.X - _dragOffset.X, dragBounds.Y - _dragOffset.Y); 1111_targetVerticalSnapLines[i].AdjustOffset(_dragOffset.X); 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); 146int xDelta = controlLocation.X % _parentGridSize.Width; 271Point pt = new(dropPoint.X, dropPoint.Y); 276pt.Offset(-ptScroll.X, -ptScroll.Y); 493Point dropPoint = new(initialDropPoint.X + _dragComponents[i].positionOffset.X, 739Point newPosition = new(mouseLoc.X - _initialMouseLoc.X + _dragComponents[_primaryComponentIndex].originalControlLocation.X, 744Rectangle newRect = new(newPosition.X, newPosition.Y, 776newPosition.X += _lastSnapOffset.X; 788newPosition = new Point(mouseLoc.X - _initialMouseLoc.X + _originalDragImageLocation.X, 790newPosition.X += _lastSnapOffset.X; 806invalidDragRegion.Translate(mouseLoc.X - _initialMouseLoc.X + _lastSnapOffset.X, mouseLoc.Y - _initialMouseLoc.Y + _lastSnapOffset.Y); 948_dragComponents[i].positionOffset = new Point(dragControl.Location.X - primaryControl.Location.X, 1033Rectangle controlRect = new(_dragComponents[i].draggedLocation.X - _dragImageRect.X,
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (18)
181lines.Add(new SnapLine(SnapLineType.Right, loc.X - 1)); 184lines.Add(new SnapLine(SnapLineType.Vertical, loc.X + _primaryControl.Margin.Right, SnapLine.MarginRight, SnapLinePriority.Always)); 189lines.Add(new SnapLine(SnapLineType.Left, loc.X)); 192lines.Add(new SnapLine(SnapLineType.Vertical, loc.X - _primaryControl.Margin.Left, SnapLine.MarginLeft, SnapLinePriority.Always)); 275_parentLocation.X -= control.Location.X; 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); 610mouseLoc.X += _lastSnapOffset.X; 712int xOffset = _initialPoint.X; 718bounds.Width = Math.Max(minWidth, baseBounds.Width + (!fRTL ? (mouseLoc.X - xOffset) : (xOffset - mouseLoc.X))); 725int xPos = _initialPoint.X; 731int xOffset = !fRTL ? (xPos - mouseLoc.X) : (mouseLoc.X - xPos);
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)
132offset.X = _lastRectangle.Left - mouseLoc.X; 138offset.X = _lastRectangle.Right - mouseLoc.X; 190offset.X = _lastRectangle.Left - mouseLoc.X; 196offset.X = _lastRectangle.Right - mouseLoc.X; 215offset.X = _lastRectangle.Left - mouseLoc.X; 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)
818moveOffsetX = snappedOffset.X; 887moveOffsetX = loc.X - primaryControl.Location.X; 1059loc.X = primaryLocation.X + primarySize.Width - size.Width; 1067loc.X = primarySize.Width / 2 + primaryLocation.X - size.Width / 2; 1076loc.X = primaryLocation.X; 1188delta = loc.X % gridSize.Width; 1302if (loc.X < left) 1303left = loc.X; 1306if (loc.X + size.Width > right) 1307right = loc.X + size.Width; 2432loc.X = (loc.X / grid.Width) * grid.Width; 2702? (lastSize.Width + lastLoc.X - curLoc.X - total) / (selectedObjects.Length - 1) 2799curLoc.X = lastLoc.X + lastSize.Width; 2806if (curLoc.X < primaryLoc.X) 2807curLoc.X = primaryLoc.X; 2812if (curLoc.X > primaryLoc.X) 2813curLoc.X = primaryLoc.X; 2829curLoc.X = lastLoc.X + lastSize.Width + nEqualDelta; 3251if (min.X > loc.X) 3253min.X = loc.X; 3261if (max.X < loc.X + size.Width) 3263max.X = loc.X + size.Width; 3278Point offset = new(-min.X, -min.Y); 3292parentOffset.X -= (max.X - min.X) / 2; 3374groupEndX = parentOffset.X + max.X - min.X; 3379groupEndX = parentOffset.X + gridSize.Width; 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); 1205_mouseDragWorkspace.X = Math.Min(start.X, end.X); 1207_mouseDragWorkspace.Width = Math.Abs(end.X - start.X); 1340X = Math.Min(_mouseDragStart.X, e.X), 1342Width = Math.Abs(e.X - _mouseDragStart.X), 1575location = new Point(location.X + autoScrollLoc.X, location.Y + autoScrollLoc.Y); 1619if (location.X == -1 && location.Y == -1) 1825_whiteSpace.X = _whiteSpace.X * 2 + 3; 1832Point newLoc = new(display.X + _whiteSpace.X, display.Y + _whiteSpace.Y); 1844newLoc = new Point(newLoc.X - autoScrollLoc.X, newLoc.Y - autoScrollLoc.Y); 1860Point newLoc = new(bounds.X + bounds.Width + _whiteSpace.X, bounds.Y); 1863if (newLoc.X + c.Size.Width > Size.Width) 1865newLoc.X = _whiteSpace.X; 1879newLoc = new Point(newLoc.X - autoScrollLoc.X, newLoc.Y - autoScrollLoc.Y); 2196(Math.Abs(_mouseDragLast.X - newPt.X) < minDrag.Width && 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) 2796return ((tcLoc1.X <= tcLoc2.X) ? -1 : 1);
System\Windows\Forms\Design\ControlCommandSet.cs (7)
480lines.Add(new SnapLine(SnapLineType.Right, pt.X + primaryControl.Width - 1)); 481lines.Add(new SnapLine(SnapLineType.Vertical, pt.X + primaryControl.Width + primaryControl.Margin.Right, SnapLine.MarginRight, SnapLinePriority.Always)); 488lines.Add(new SnapLine(SnapLineType.Left, pt.X)); 489lines.Add(new SnapLine(SnapLineType.Vertical, pt.X - primaryControl.Margin.Left, SnapLine.MarginLeft, SnapLinePriority.Always)); 644primaryControlsize += new Size(snappedOffset.X, snappedOffset.Y); 655moveOffsetX = snappedOffset.X; 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); 1385(Math.Abs(_mouseDragLast.X - x) < minDrag.Width && 1878if (button == MouseButtons.Left && IsDoubleClick(location.X, location.Y)) 1919mouseHandler.OnMouseDown(Component, button, location.X, location.Y); 1923OnMouseDragBegin(location.X, location.Y); 1932_lastMoveScreenX = location.X; 1954if (_lastMoveScreenX != location.X || _lastMoveScreenY != location.Y) 1968mouseHandler.OnMouseMove(Component, location.X, location.Y); 1972OnMouseDragMove(location.X, location.Y); 1976_lastMoveScreenX = location.X; 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 (4)
586newBounds.X += e.Offset.X; // snap to left- 590newBounds.X = originalBounds.X - originalBounds.Width + e.Offset.X; 599newBounds.X = originalBounds.X - originalBounds.Width - e.Offset.X; 604newBounds.X -= e.Offset.X;
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); 459_oldPoint1.X, 461_oldPoint2.X - _oldPoint1.X + 1, 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 500point1.X - (IBarHatWidth - 1 - i * 2) / 2, 502point1.X + (IBarHatWidth - 1 - i * 2) / 2, 507point2.X - (IBarHatWidth - 1 - i * 2) / 2, 509point2.X + (IBarHatWidth - 1 - i * 2) / 2, 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); 523if (Math.Abs(point1.X - point2.X) <= MinIBar) 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 539point1.X + i, 541point1.X + i, 546point2.X - i, 548point2.X - i, 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)
372newRect.X = oldOffset.X; 377newRect.Offset(oldOffset.X, oldOffset.Y); 393newRect.X = newOffset.X; 398newRect.Offset(newOffset.X, newOffset.Y); 605if ((Dragging && de.X == _dragBase.X && de.Y == _dragBase.Y) || 769bounds.X = dropPt.X + pt.X; 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)
312displayRectangle.X += offset.X; // offset for non-client area 465bounds.X = location.X; 490bounds.X = DefaultControlLocation.X; 496bounds.X = selectedControl.Location.X + GridSize.Width; 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); 925centeredLocation.X = DefaultControlLocation.X; 1104if (adjustedRect.X < minimumLocation.X) 1106adjustedRect.X = minimumLocation.X; 1120Rectangle r = GetUpdatedRect(Rectangle.Empty, new Rectangle(pt.X, pt.Y, 0, 0), false); 1151if (dragRect.X - updatedRect.X > halfGrid.X) 1783Rectangle frameRect = new(offset.X - _adornerWindowToScreenOffset.X, 1823Point location = new(baseVar.X, baseVar.Y); 1825_statusCommandUI?.SetStatusInformation(new Rectangle(location.X, location.Y, offset.Width, offset.Height)); 1920_mouseDragOffset.X = _mouseDragBase.X; 1922_mouseDragOffset.Width = x - _mouseDragBase.X; 1938Rectangle r = new(_mouseDragBase.X - _adornerWindowToScreenOffset.X, 1940x - _mouseDragBase.X, y - _mouseDragBase.Y); 1942_mouseDragOffset.Width += offset.X; 1975Rectangle frameRect = new(_mouseDragOffset.X - _adornerWindowToScreenOffset.X, 1989oldFrameRect.X -= _adornerWindowToScreenOffset.X; 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)
456leftProp.SetValue(component, adjustedLoc.X); 460controls[i].Left = adjustedLoc.X; 647X = loc.X;
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)) 631Math.Abs(screenCoord.X - _mouseDragAnchor.X) < minDragSize.Width && 639if (((ISelectionUIService)this).BeginDrag(_dragRules, _mouseDragAnchor.X, _mouseDragAnchor.Y)) 655_mouseDragOffset.X = screenCoord.X - _mouseDragAnchor.X; 667_mouseDragOffset.X = screenCoord.X - _mouseDragAnchor.X; 668_mouseDragOffset.Width = _mouseDragAnchor.X - screenCoord.X; 672_mouseDragOffset.Width = screenCoord.X - _mouseDragAnchor.X;
System\Windows\Forms\Design\SelectionUIService.SelectionUIItem.cs (20)
247if (pt.X >= _outerRect.X && pt.X <= _innerRect.X) 272Debug.Assert(!(pt.X >= _outerRect.X && pt.X <= _innerRect.X), "Should be handled by left top check"); 273if (pt.X >= _innerRect.X + _innerRect.Width && pt.X <= _outerRect.X + _outerRect.Width) 278if (pt.X >= _outerRect.X + (_outerRect.Width - GRABHANDLE_WIDTH) / 2 279&& pt.X <= _outerRect.X + (_outerRect.Width + GRABHANDLE_WIDTH) / 2) 287if (pt.X >= _innerRect.X + _innerRect.Width && pt.X <= _outerRect.X + _outerRect.Width) 308Debug.Assert(!(pt.X >= _outerRect.X && pt.X <= _innerRect.X), "Should be handled by left bottom check"); 310Debug.Assert(!(pt.X >= _innerRect.X + _innerRect.Width && pt.X <= _outerRect.X + _outerRect.Width), "Should be handled by right bottom check"); 312if (pt.X >= _outerRect.X + (_outerRect.Width - GRABHANDLE_WIDTH) / 2 && pt.X <= _outerRect.X + (_outerRect.Width + GRABHANDLE_WIDTH) / 2) 390if (pt.X < _outerRect.X || pt.X > _outerRect.X + _outerRect.Width) 400if (pt.X > _innerRect.X 401&& pt.X < _innerRect.X + _innerRect.Width
System\Windows\Forms\Design\StatusCommandUI.cs (1)
57bounds.X = location.X;
System\Windows\Forms\Design\TabControlDesigner.cs (1)
627x = p.X;
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (14)
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)); 980if (pos.X <= bounds.X) 984else if (pos.X < bounds.Right) 992if (pos.X >= offset - columns[i]) 1003if (pos.X >= bounds.Right) 1007else if (pos.X > bounds.X) 1013if (pos.X <= offset + columns[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); 1298_curCol = cell.X;
System\Windows\Forms\Design\ToolStripDesigner.cs (2)
1808if (offset.X >= parentToolStrip.Items[0].Bounds.X) 1813else if (offset.X <= parentToolStrip.Items[0].Bounds.X)
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)
492x = p.X;
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 (23)
System\Windows\Forms\Automation\UiaTextRange.cs (16)
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); 792|| lineEndPoint.X > clippingRectangle.Right)) 801if (lineEndPoint.X <= lineStartPoint.X && lineTextLength > 0) 829int minX = lineEndPoint.X; 836if (pt.X < minX) 838minX = pt.X; 843if (pt.X > maxX) 845maxX = pt.X; 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)
22float x = point.X;
System.Windows.Forms.Tests (154)
System\Windows\Forms\AccessibleObjects\ComboBox.ComboBoxItemAccessibleObjectTests.cs (1)
412Assert.Equal(expectedPosition.X, actual.X);
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)
442Assert.True(actualPoint.X >= expectedPoint.X - 1 || actualPoint.X <= expectedPoint.X + 1); 508Assert.True(actualPoint.X >= expectedPoint.X - 1 || actualPoint.X <= expectedPoint.X + 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)
7176Assert.Equal(value.X, control.Left); 7177Assert.Equal(value.X, control.Right); 7183Assert.Equal(new Rectangle(value.X, value.Y, 0, 0), control.Bounds); 7198Assert.Equal(value.X, control.Left); 7199Assert.Equal(value.X, control.Right); 7205Assert.Equal(new Rectangle(value.X, value.Y, 0, 0), control.Bounds); 7266Assert.Equal(value.X, control.Left); 7267Assert.Equal(value.X, control.Right); 7273Assert.Equal(new Rectangle(value.X, value.Y, 0, 0), control.Bounds); 7289Assert.Equal(value.X, control.Left); 7290Assert.Equal(value.X, control.Right); 7296Assert.Equal(new Rectangle(value.X, value.Y, 0, 0), control.Bounds); 7368Assert.Equal(value.X, control.Left); 7369Assert.Equal(value.X, control.Right); 7375Assert.Equal(new Rectangle(value.X, value.Y, 0, 0), control.Bounds); 7393Assert.Equal(value.X, control.Left); 7394Assert.Equal(value.X, control.Right); 7400Assert.Equal(new Rectangle(value.X, value.Y, 0, 0), control.Bounds); 7479Assert.Equal(value.X, control.Left); 7480Assert.Equal(value.X, control.Right); 7486Assert.Equal(new Rectangle(value.X, value.Y, 0, 0), control.Bounds); 7509Assert.Equal(value.X, control.Left); 7510Assert.Equal(value.X, control.Right); 7516Assert.Equal(new Rectangle(value.X, value.Y, 0, 0), control.Bounds);
System\Windows\Forms\CursorsTests.cs (2)
54Assert.True(hotSpot.X >= 0 && hotSpot.X <= cursor.Size.Width);
System\Windows\Forms\CursorTests.cs (6)
232Assert.True(hotSpot.X >= 0 && hotSpot.X <= cursor.Size.Width); 266Assert.True(position.X >= virtualScreen.X); 268Assert.True(position.X <= virtualScreen.Right); 280Assert.True(position.X >= 0); 286Assert.True(position.X >= virtualScreen.X);
System\Windows\Forms\ImageListTests.cs (1)
976list.Draw(graphics, pt.X, pt.Y, 0);
System\Windows\Forms\ListViewInsertionMarkTests.cs (1)
614Assert.Equal(1, pPt->X);
System\Windows\Forms\MonthCalendarTests.cs (1)
4492hitTestInfo.Point.X.Should().Be(x);
System\Windows\Forms\PropertyGridInternal\PropertyGridViewTests.Rendering.cs (2)
48Validate.TextOut(pt.X.ToString(), new(145, 22, 5, 14), stateValidators: State.FontFace(Control.DefaultFont.Name))), 51Validate.TextOut(nameof(Point.X), new(25, 23, 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)
544Assert.Equal(value.X, control.Left); 545Assert.Equal(value.X + 200, control.Right); 551Assert.Equal(new Rectangle(value.X, value.Y, 200, 100), control.Bounds); 566Assert.Equal(value.X, control.Left); 567Assert.Equal(value.X + 200, control.Right); 573Assert.Equal(new Rectangle(value.X, value.Y, 200, 100), control.Bounds);
System\Windows\Forms\TabPageTests.cs (18)
1902Assert.Equal(value.X, control.Left); 1903Assert.Equal(value.X + 200, control.Right); 1909Assert.Equal(new Rectangle(value.X, value.Y, 200, 100), control.Bounds); 1924Assert.Equal(value.X, control.Left); 1925Assert.Equal(value.X + 200, control.Right); 1931Assert.Equal(new Rectangle(value.X, value.Y, 200, 100), control.Bounds); 1992Assert.Equal(value.X, control.Left); 1993Assert.Equal(value.X + 200, control.Right); 1999Assert.Equal(new Rectangle(value.X, value.Y, 200, 100), control.Bounds); 2015Assert.Equal(value.X, control.Left); 2016Assert.Equal(value.X + 200, control.Right); 2022Assert.Equal(new Rectangle(value.X, value.Y, 200, 100), control.Bounds); 2093Assert.Equal(value.X, control.Left); 2094Assert.Equal(value.X + 200, control.Right); 2100Assert.Equal(new Rectangle(value.X, value.Y, 200, 100), control.Bounds); 2118Assert.Equal(value.X, control.Left); 2119Assert.Equal(value.X + 200, control.Right); 2125Assert.Equal(new Rectangle(value.X, value.Y, 200, 100), control.Bounds);
System\Windows\Forms\TextBoxBase.TextBoxBaseUiaTextProviderTests.cs (8)
406Assert.True(actualPoint.X >= expectedPoint.X - 1 || actualPoint.X <= expectedPoint.X + 1); 450Assert.True(actualPoint.X >= expectedPoint.X - 1 || actualPoint.X <= expectedPoint.X + 1);
System\Windows\Forms\ToolStripContentPanelTests.cs (6)
943Assert.Equal(value.X, control.Left); 944Assert.Equal(value.X + 200, control.Right); 950Assert.Equal(new Rectangle(value.X, value.Y, 200, 100), control.Bounds); 965Assert.Equal(value.X, control.Left); 966Assert.Equal(value.X + 200, control.Right); 972Assert.Equal(new Rectangle(value.X, value.Y, 200, 100), control.Bounds);
System\Windows\Forms\ToolStripDropDownTests.cs (7)
1931expected.X = Math.Max(expected.X, SystemInformation.WorkingArea.X); 1969Assert.Equal(expected.X, control.Left); 1970Assert.Equal(expected.X + 100, control.Right); 1976Assert.Equal(new Rectangle(expected.X, expected.Y, 100, 25), control.Bounds); 1991Assert.Equal(expected.X, control.Left); 1992Assert.Equal(expected.X + 100, control.Right); 1998Assert.Equal(new Rectangle(expected.X, expected.Y, 100, 25), control.Bounds);
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)
4856Assert.True(pt.X > 0); 4917Assert.True(pt.X > 0); 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 }; 7827Assert.True(actualPoint.X >= expectedPoint.X - 1 || actualPoint.X <= expectedPoint.X + 1);
System.Windows.Forms.UI.IntegrationTests (85)
ButtonTests.cs (6)
263Point virtualPoint = new((int)Math.Round(65535.0 / horizontalResolution * centerOnScreen.X), 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)); 199X = (startCoordinates.X - vscreen.Left) * DesktopNormalizedMax / vscreen.Width + DesktopNormalizedMax / (vscreen.Width * 2), 204X = (endCoordinates.X - vscreen.Left) * DesktopNormalizedMax / vscreen.Width + DesktopNormalizedMax / (vscreen.Width * 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) 628startPosition.X, 916if (((MousePosition.X - _screenOffset.X) < form.DesktopBounds.Left) || 917((MousePosition.X - _screenOffset.X) > form.DesktopBounds.Right) ||
Infra\ControlTestBase.cs (6)
185(int)Math.Ceiling((65535.0 / (primaryMonitor.Width - 1)) * point.X), 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)
232_propertyGrid.ContextMenuDefaultLocation.X.Should().Be(oldLocation.X + newLocation.X);
WinFormsControlsTest (1)
MainForm.cs (1)
294(biggestButton.Width + padding * 2) * 3 + padding * 2 + overarchingFlowLayoutPanel.Location.X * 2,