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