305 writes to X
System.Drawing.Common.Tests (4)
mono\System.Drawing\GraphicsTests.cs (4)
2879
arcrect.
X
= baserect.Right - d;
2883
arcrect.
X
= baserect.Left;
2921
arcrect.
X
= baserect.Right - d;
2925
arcrect.
X
= baserect.Left;
System.Drawing.Primitives (4)
System\Drawing\Rectangle.cs (4)
63
X
= value.X;
248
X
-= width;
278
X
= result.X;
335
X
+= x;
System.Windows.Forms (236)
System\Windows\Forms\Control.cs (1)
8160
rectangle.
X
++;
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (2)
398
imageBounds.
X
= imageStart.X + 1;
466
r.
X
-= 1;
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.LayoutOptions.cs (11)
301
layout.Focus.
X
++;
374
layout.CheckBounds.
X
= (field.X + field.Width) - layout.CheckBounds.Width;
378
layout.CheckBounds.
X
= field.X + (field.Width - layout.CheckBounds.Width) / 2;
399
layout.CheckArea.
X
= field.X;
405
layout.Field.
X
+= checkSizeFull + 1;
411
layout.CheckArea.
X
= field.X + field.Width - checkSizeFull;
420
layout.CheckArea.
X
= field.X;
431
layout.CheckArea.
X
= field.X;
589
layout.TextBounds.
X
= Math.Max(
601
layout.TextBounds.
X
= layout.ImageBounds.X + layout.ImageBounds.Width;
635
layout.TextBounds.
X
++;
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonBaseAdapter.cs (1)
199
check.
X
--; // compensate for Windows drawing slightly offset to right
System\Windows\Forms\Controls\ComboBox\ComboBox.FlatComboAdapter.cs (5)
47
_dropDownRect.
X
+= WhiteFillRectWidth;
55
_innerBorder.
X
= _clientRect.Width - _innerBorder.Right;
56
_innerInnerBorder.
X
= _clientRect.Width - _innerInnerBorder.Right;
57
_dropDownRect.
X
= _clientRect.Width - _dropDownRect.Right;
58
_whiteFillRect.
X
= _clientRect.Width - _whiteFillRect.Right + 1; // since we're filling, we need to move over to the next px.
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (4)
2133
rectDisplay.
X
= _vertScrollBar.Width;
2708
rectTmp.
X
--;
2718
rectTmp.
X
++;
2726
rectTmp.
X
+= totalVisibleFrozenWidth;
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (53)
2464
cursorClip.
X
+= cursorClip.Width - frozenWidth;
2474
cursorClip.
X
+= frozenWidth;
2478
cursorClip.
X
+= _layout.Data.Width - frozenWidth - scrollingWidth;
2542
clip.
X
= _layout.Data.X - _mouseBarOffset - 1;
2547
clip.
X
+= overflowWidth;
2553
clip.
X
= leftEdge + Columns[columnIndex].MinimumThickness - _mouseBarOffset - 1;
2748
clip.
X
-= mouseBarOffset + 1;
2754
clip.
X
+= MinimumRowHeadersWidth - mouseBarOffset - 1;
2984
r.
X
= Math.Max(inside.Left, r.X);
2985
r.
X
= Math.Min(r.X, inside.Right - r.Width);
2994
r.
X
= Math.Min(inside.Right - r.Width, r.X);
2995
r.
X
= Math.Max(r.X, inside.Left);
3011
r.
X
= Math.Max(inside.Left, r.X);
3015
r.
X
= Math.Min(inside.Right - 3, r.X);
3016
r.
X
= Math.Max(r.X, 0);
4408
rowHeaders.
X
+= insideLeft.Width - rowHeaders.Width;
4412
insideLeft.
X
+= rowHeaders.Width;
4428
topLeft.
X
+= insideLeft.Width;
4432
colHeaders.
X
+= topLeft.Width;
4455
insideLeft.
X
++;
5500
rectScrollingArea.
X
+= emptyBackgroundWidth;
5509
rectScrollingArea.
X
+= frozenVisibleColumnsWidth;
5643
rectInsertionBar.
X
= GetColumnXFromIndex(Columns.GetFirstColumn(DataGridViewElementStates.Visible)!.Index);
5646
rectInsertionBar.
X
-= InsertionBarWidth;
5664
rectInsertionBar.
X
= RightToLeftInternal
6829
rect.
X
--;
7088
rowRect.
X
-= width;
9101
rowRect.
X
-= _layout.RowHeaders.Width;
10228
_layout.Data.
X
+= vertScrollBarWidth;
10237
_layout.ColumnHeaders.
X
+= vertScrollBarWidth;
10260
_layout.ColumnHeaders.
X
-= vertScrollBarWidth;
10267
_layout.Data.
X
-= vertScrollBarWidth;
10285
_layout.Data.
X
+= vertScrollBarWidth;
10294
_layout.ColumnHeaders.
X
+= vertScrollBarWidth;
14514
rightArea.
X
= leftEdge;
16755
gridRect.
X
--;
16805
focusRect.
X
-= change;
16836
edge.
X
+= rect.Width - 1;
19246
rcNextRows.
X
+= _layout.RowHeaders.Width;
19255
rcNextRows.
X
++;
19265
rcNextRows.
X
+= rowsWidth;
19310
edge.
X
= bounds.Width - borderWidth;
19370
cellBounds.
X
= RightToLeftInternal ? bandBounds.Right - cx - cellBounds.Width : bandBounds.X + cx;
19414
scrollingBounds.
X
-= FirstDisplayedScrollingColumnHiddenWidth;
19428
rowRect.
X
+= cx;
19448
cellBounds.
X
= RightToLeftInternal
19841
editingZone.
X
+= totalVisibleFrozenWidth;
19879
cellBounds.
X
--;
19880
cellClip.
X
--;
26354
rowsRect.
X
--;
26380
rowsRect.
X
= _layout.Inside.X;
29019
bottomArea.
X
--;
29094
bottomArea.
X
--;
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (1)
417
s_rectThemeMargins.
X
= rectContent.X;
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (10)
835
X
= (advancedBorderStyle.Left == DataGridViewAdvancedCellBorderStyle.None) ? 0 : 1
839
rect.
X
++;
864
rect.
X
+= OwningColumn.DividerWidth;
3169
bounds.
X
+= dividerThickness;
3571
iconBounds.
X
+= cellBounds.X;
3600
rectPadding.
X
= bounds.Right - cellStyle.Padding.Left;
3603
rectPadding.
X
= bounds.Left + cellStyle.Padding.Right;
3609
rectPadding.
X
= bounds.Right - cellStyle.Padding.Right;
3612
rectPadding.
X
= bounds.Left + cellStyle.Padding.Left;
3804
borderAndPaddingWidths.
X
+= cellStyle.Padding.Left;
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.DataGridViewCellAccessibleObject.cs (1)
353
cellRect.
X
= cellLeft;
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (3)
854
valBounds.
X
+= rectThemeMargins.Width;
859
valBounds.
X
+= rectThemeMargins.X;
942
valBounds.
X
+= s_sortGlyphSeparatorWidth +
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (11)
532
borderAndPaddingWidths.
X
+= cellStyle.Padding.Left;
1766
cellBounds.
X
-= DataGridView.FirstDisplayedScrollingColumnHiddenWidth;
2175
dropRect.
X
--;
2192
dropRect.
X
++;
2215
textBounds.
X
--;
2229
errorBounds.
X
+= dropWidth;
2230
textBounds.
X
+= dropWidth;
2239
errorBounds.
X
+= dropWidth + 1;
2240
textBounds.
X
+= dropWidth + 1;
2260
focusBounds.
X
--;
2271
focusBounds.
X
++;
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (1)
387
s_rectThemeMargins.
X
= rectContent.X;
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (3)
613
imageBounds.
X
= cellStyle.Alignment switch
626
imageBounds.
X
= cellStyle.Alignment switch
643
imageBounds.
X
= bounds.X + (bounds.Width - imageBounds.Width) / 2;
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (2)
993
focusBounds.
X
--;
998
focusBounds.
X
++;
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (7)
1526
cellBounds.
X
= rowBounds.Right - cx - cellBounds.Width;
1530
cellBounds.
X
= rowBounds.X + cx;
1582
dataBounds.
X
-= dataGridView.FirstDisplayedScrollingColumnHiddenWidth;
1594
rowRect.
X
+= cx;
1616
cellBounds.
X
= dataBounds.Right - cx - cellBounds.Width;
1620
cellBounds.
X
= dataBounds.X + cx;
1703
cellBounds.
X
= rowBounds.Right - cellBounds.Width;
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (4)
714
valBounds.
X
+= rectThemeMargins.Height;
718
valBounds.
X
+= rectThemeMargins.Y;
832
valBounds.
X
+= s_iconsWidth + 2 * RowHeaderIconMarginWidth;
862
valBounds.
X
+= s_iconsWidth + 2 * RowHeaderIconMarginWidth;
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.DataGridViewRowHeaderCellAccessibleObject.cs (1)
38
cellRect.
X
= rowRect.Right - cellRect.Width;
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (5)
153
editingControlBounds.
X
+= 1;
158
editingControlBounds.
X
+= DATAGRIDVIEWTEXTBOXCELL_horizontalTextOffsetLeft;
167
editingControlBounds.
X
+= 1;
177
editingControlBounds.
X
+= DATAGRIDVIEWTEXTBOXCELL_horizontalTextOffsetRight - 1;
182
editingControlBounds.
X
+= 1;
System\Windows\Forms\Controls\GroupBox\GroupBox.cs (1)
464
textRectangle.
X
+= TextOffset;
System\Windows\Forms\Controls\GroupBox\GroupBoxRenderer.cs (8)
194
textBounds.
X
= bounds.Right - textBounds.Width - BoxHeaderWidth + 1;
199
textBounds.
X
+= BoxHeaderWidth - 1;
221
clipLeft.
X
= boxBounds.Right - BoxHeaderWidth;
222
clipMiddle.
X
= clipLeft.Left - clipMiddle.Width;
227
clipMiddle.
X
= clipLeft.Right;
228
clipRight.
X
= clipMiddle.Right;
296
textBounds.
X
= bounds.Right - textBounds.Width - TextOffset;
300
textBounds.
X
+= TextOffset;
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (2)
549
box.
X
= bounds.X + bounds.Width - _idealCheckSize - _listItemStartPosition;
578
textBounds.
X
= bounds.X;
System\Windows\Forms\Controls\ListView\DrawListViewItemEventArgs.cs (3)
109
resultBounds.
X
+= 4;
114
resultBounds.
X
+= 4;
120
resultBounds.
X
--;
System\Windows\Forms\Controls\ListView\ListView.cs (1)
5013
rectInvalid.
X
= rectInvalid.Y = 0;
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (2)
361
result.
X
+= (result.Width - _image.Width) / 2;
371
result.
X
= (ClientRectangle.Width - result.Width) / 2;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (1)
1862
rect.
X
+= paintIndent + PropertyGridView.ValueStringIndent;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (10)
1884
rect.
X
= _location.X;
1891
rect.
X
= 1;
1896
rect.
X
= 1;
1901
rect.
X
= _location.X + LabelWidth;
1973
boundsScroll.
X
= sizeWindow.Width - boundsScroll.Width - 1;
2126
r.
X
= oldLabelWidth - _requiredLabelPaintMargin;
2297
drawBounds.
X
-= 1;
4314
rect.
X
+= 1;
4338
rect.
X
+= _paintIndent + 1;
4343
rect.
X
+= EditIndent + 1; // +1 to compensate for where GDI+ draws it's string relative to the rect.
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (1)
458
newBounds.
X
= _dragBaseRect.Left + delta;
System\Windows\Forms\Controls\Splitter\Splitter.cs (3)
413
bounds.
X
+= bounds.Width - _splitSize;
584
r.
X
= bounds.X + splitSize;
592
r.
X
= bounds.X + bounds.Width - splitSize - r.Width;
System\Windows\Forms\Controls\TabControl\TabControl.cs (1)
388
r.
X
-= p.X;
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (6)
739
rect.
X
+= (RightToLeft == RightToLeft.No) ? gripwidth : 0;
4176
gripRectangle.
X
= Math.Max(0, displayRect.X - Grip.GripThickness);
4182
gripRectangle.
X
= ClientRectangle.Right - gripRectangle.Width - Grip.Margin.Horizontal;
4183
gripRectangle.
X
+= Grip.Margin.Left;
4187
gripRectangle.
X
-= Grip.Margin.Right;
4193
gripRectangle.
X
= displayRect.Left;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (5)
439
_checkRectangle.
X
= width - _checkRectangle.Right;
440
_imageRectangle.
X
= width - _imageRectangle.Right;
441
_textRectangle.
X
= width - _textRectangle.Right;
442
_arrowRectangle.
X
= width - _arrowRectangle.Right;
443
_imageMarginBounds.
X
= width - _imageMarginBounds.Right;
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (2)
1075
rect.
X
-= dropDownMenu.Padding.Left;
1076
rect.
X
= Math.Max(rect.X, 0);
System\Windows\Forms\Controls\ToolStrips\ToolStripOverflowButton.cs (1)
102
bounds.
X
= 0;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.cs (3)
443
cachedBounds.
X
-= Math.Max(0, margins[i] - c.Margin.Left);
495
cachedBounds.
X
-= cellOffsets[i];
540
cachedBounds.
X
= Math.Max(0, cachedBounds.X - margins[i] - c.Margin.Top);
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.HorizontalRowManager.cs (1)
71
dragBounds.
X
-= Row.Margin.Left + ToolStripPanel.Padding.Left + 4;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.VerticalRowManager.cs (1)
61
dragBounds.
X
= x;
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (9)
973
endGradient.
X
= bounds.Right - endGradient.Width;
1003
endGradient.
X
+= 1;
1226
overflowBoundsFill.
X
+= overflowBoundsFill.Width - _overflowButtonWidth + 1;
1324
fillRect.
X
= overflowBoundsFill.Right;
1355
topLeftShadowRect.
X
+= 1;
1363
topRightShadowRect.
X
-= 2; // was 2?
1368
topRightShadowRect2.
X
+= 1;
1477
bounds.
X
+= dropDownMenu.Padding.Left - 2;
1484
bounds.
X
+= 2;
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (2)
786
imageRect.
X
++;
985
baseRect.
X
= sizeGripBounds.Width - baseRect.X - baseRect.Width;
System\Windows\Forms\Controls\ToolStrips\ToolStripSeparator.cs (1)
313
rect.
X
= 2;
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemRenderer.cs (1)
448
fillRect.
X
+= 2;
System\Windows\Forms\Controls\TreeView\TreeView.cs (1)
2761
bounds.
X
-= value;
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (4)
548
backRect.
X
--;
563
backRect.
X
--;
877
upDownButtonsBounds.
X
= totalClientWidth - upDownButtonsBounds.Right;
878
upDownEditBounds.
X
= totalClientWidth - upDownEditBounds.Right;
System\Windows\Forms\Design\ComponentEditorForm.cs (4)
261
bounds.
X
= bounds.Width + bounds.X - BUTTON_WIDTH;
272
bounds.
X
-= (BUTTON_WIDTH + BUTTON_PAD);
279
bounds.
X
-= (BUTTON_WIDTH + BUTTON_PAD);
286
bounds.
X
-= (BUTTON_WIDTH + BUTTON_PAD);
System\Windows\Forms\ErrorProvider\ErrorProvider.ErrorWindow.cs (1)
322
iconBounds.
X
-= _windowBounds.X;
System\Windows\Forms\Form.cs (3)
901
bounds.
X
-= screen.X;
5182
_restoredWindowBounds.
X
= x;
5206
_restoreBounds.
X
= x;
System\Windows\Forms\Input\Cursor.cs (1)
253
targetRect.
X
+= (int)graphics.Transform.OffsetX;
System\Windows\Forms\Internal\WinFormsUtils.cs (2)
91
bounds.
X
= constrainingBounds.Right - bounds.Width;
96
bounds.
X
= constrainingBounds.Left;
System\Windows\Forms\Layout\CommonProperties.cs (1)
301
originalBounds.
X
= x;
System\Windows\Forms\Layout\Containers\SplitContainer.cs (7)
767
r.
X
= _splitterRect.X - Left;
1356
_splitterRect.
X
= Location.X + SplitterDistanceInternal;
1360
_splitterRect.
X
= Right - SplitterDistanceInternal - SplitterWidthInternal;
1388
r.
X
= Panel1.Location.X + splitSize;
1392
r.
X
= Width - splitSize - SplitterWidthInternal;
1571
_splitterRect.
X
= ((RightToLeft == RightToLeft.Yes) ? Width - _splitterDistance - SplitterWidthInternal : Location.X + _splitterDistance);
1578
_splitterRect.
X
= Location.X;
System\Windows\Forms\Layout\DefaultLayout.cs (1)
432
remainingBounds.
X
+= element.Bounds.Width;
System\Windows\Forms\Layout\FlowLayout.ContainerProxy.cs (2)
59
value.
X
= DisplayRect.Right - value.Right;
137
newBounds.
X
= DisplayRect.Right - bounds.X - bounds.Width + ElementProxy.Margin.Left - ElementProxy.Margin.Right;
System\Windows\Forms\Layout\LayoutUtils.cs (9)
294
withinThis.
X
+= withinThis.Width - alignThis.Width;
298
withinThis.
X
+= (withinThis.Width - alignThis.Width) / 2;
310
withinThis.
X
+= withinThis.Width - alignThis.Width;
314
withinThis.
X
+= (withinThis.Width - alignThis.Width) / 2;
374
rect.
X
-= padding.Left;
383
rect.
X
+= padding.Left;
510
region2.
X
+= specifiedContent.Width;
514
region1.
X
+= bounds.Width - specifiedContent.Width;
603
bounds.
X
= withinBounds.Width - bounds.Right;
System\Windows\Forms\Layout\TableLayout.cs (1)
1277
elementBounds.
X
= cellBounds.X + (cellBounds.Right - elementBounds.Right);
System\Windows\Forms\Printing\PrintPreviewControl.cs (1)
454
rect.
X
+= _vScrollBar.Width;
System\Windows\Forms\Rendering\ControlPaint.cs (5)
89
result.
X
= (bounds.Width - result.Width) / 2;
125
result.
X
= (bounds.Width - result.Width) / 2;
452
imageRectangle.
X
+= clipRect.Width - imageRectangle.Width;
1382
rectangle.
X
+= 1;
1384
rectangle.
X
-= 1;
System\Windows\Forms\Scrolling\ScrollableControl.cs (2)
197
rect.
X
= _displayRect.X;
788
_displayRect.
X
= x;
System.Windows.Forms.Design (60)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (2)
587
Rectangle res = e.Bounds with {
X
= e.Bounds.X + offset, Width = e.Bounds.Width - offset };
617
e.Bounds with {
X
= e.Bounds.X + offset, Width = e.Bounds.Width - offset });
System\ComponentModel\Design\CollectionEditor.SplitButton.cs (1)
205
_dropDownRectangle.
X
= bounds.Left + 1;
System\Drawing\Design\ColorEditor.ColorPalette.cs (2)
123
rect.
X
= s_marginX + across * (s_cellSizeX + s_marginX);
367
X
= s_marginX,
System\Drawing\Design\IconEditor.cs (1)
122
rectangle.
X
+= (rectangle.Width - icon.Width) / 2;
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (1)
215
controlRect.
X
+= offset.X; // offset for non-client area
System\Windows\Forms\Design\Behavior\NoResizeSelectionBorderGlyph.cs (1)
54
hitBounds.
X
-= (DesignerUtils.s_selectionBorderHitArea - DesignerUtils.s_selectionBorderSize) / 2;
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (3)
111
rect.
X
+= _parentGridSize.Width - xDelta;
116
rect.
X
-= xDelta;
739
bounds.
X
= Math.Min(baseBounds.Right - minWidth, baseBounds.X - xOffset);
System\Windows\Forms\Design\Behavior\SelectionBorderGlyph.cs (2)
67
hitBounds.
X
-= (DesignerUtils.s_selectionBorderHitArea - DesignerUtils.s_selectionBorderSize) / 2;
78
hitBounds.
X
-= (DesignerUtils.s_selectionBorderHitArea - DesignerUtils.s_selectionBorderSize) / 2;
System\Windows\Forms\Design\ComponentTray.cs (4)
1205
_mouseDragWorkspace.
X
= Math.Min(start.X, end.X);
1340
X
= Math.Min(_mouseDragStart.X, e.X),
2275
rc.
X
+= WhiteSpace + _borderWidth;
2305
rc.
X
+= (_cxIcon + _borderWidth);
System\Windows\Forms\Design\ControlDesigner.cs (3)
2246
borderRectangle.
X
++;
2253
textRect.
X
= imageRect.X + imageRect.Width + 2 * marginX;
2286
textRect.
X
++;
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (1)
991
bounds.
X
+= listBoxItem.ToolboxBitmap.Width + 2 * OWNERDRAWITEMIMAGEBUFFER;
System\Windows\Forms\Design\DesignerUtils.cs (4)
586
newBounds.
X
+= e.Offset.X; // snap to left-
590
newBounds.
X
= originalBounds.X - originalBounds.Width + e.Offset.X;
599
newBounds.
X
= originalBounds.X - originalBounds.Width - e.Offset.X;
604
newBounds.
X
-= e.Offset.X;
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (2)
209
bounds.
X
-= IsRtl ? margin.Right : margin.Left;
327
_childInfo[controlIndex].MarginBounds.
X
= size.Min;
System\Windows\Forms\Design\OleDragDropHandler.cs (3)
372
newRect.
X
= oldOffset.X;
393
newRect.
X
= newOffset.X;
769
bounds.
X
= dropPt.X + pt.X;
System\Windows\Forms\Design\ParentControlDesigner.cs (14)
312
displayRectangle.
X
+= offset.X; // offset for non-client area
465
bounds.
X
= location.X;
490
bounds.
X
= DefaultControlLocation.X;
496
bounds.
X
= selectedControl.Location.X + GridSize.Width;
533
bounds.
X
+= offset.Width;
925
centeredLocation.
X
= DefaultControlLocation.X;
1106
adjustedRect.
X
= minimumLocation.X;
1142
updatedRect.
X
= originalRect.X;
1148
updatedRect.
X
= (dragRect.X / gridSize.Width) * gridSize.Width;
1153
updatedRect.
X
+= gridSize.Width;
1920
_mouseDragOffset.
X
= _mouseDragBase.X;
1949
_mouseDragOffset.
X
+= _mouseDragOffset.Width;
1989
oldFrameRect.
X
-= _adornerWindowToScreenOffset.X;
2040
paintRect.
X
= paintRect.Y = 0;
System\Windows\Forms\Design\SelectionUIHandler.cs (3)
105
b.
X
= bounds[i].X;
354
newBounds.
X
= tempNewBounds.X;
372
newBounds.
X
= tempNewBounds.X;
System\Windows\Forms\Design\SelectionUIService.cs (4)
655
_mouseDragOffset.
X
= screenCoord.X - _mouseDragAnchor.X;
667
_mouseDragOffset.
X
= screenCoord.X - _mouseDragAnchor.X;
692
delta.
X
-= old.X;
1075
newOffset = offset with {
X
= 0, Y = 0 };
System\Windows\Forms\Design\SelectionUIService.SelectionUIItem.cs (5)
157
rect.
X
= inner.X + inner.Width;
163
rect.
X
= outer.X;
166
rect.
X
+= (outer.Width - GRABHANDLE_WIDTH) / 2;
172
rect.
X
= outer.X;
176
rect.
X
= inner.X + inner.Width;
System\Windows\Forms\Design\StatusCommandUI.cs (1)
57
bounds.
X
= location.X;
System\Windows\Forms\Design\ToolStripItemDesigner.cs (3)
1253
boundsInAdornerWindow.
X
++;
1259
boundsInAdornerWindow.
X
+= (ToolStripItem.Width - _editorNode.EditorToolStrip.Width) / 2;
1260
boundsInAdornerWindow.
X
++;
System.Windows.Forms.Primitives.Tests (1)
System\Windows\Forms\DeviceContextHdcScopeTests.cs (1)
120
expectedClipRect.
X
-= 1;
1062 references to X
PresentationUI (1)
MS\Internal\Documents\RMPublishingDialog.RightsTable.cs (1)
1035
cellBounds.
X
+ (cellBounds.Width - boxSize.Width) / 2,
System.ComponentModel.TypeConverter (2)
System\Drawing\RectangleConverter.cs (2)
75
intConverter.ConvertToString(context, culture, rect.
X
),
90
rect.
X
, rect.Y, rect.Width, rect.Height});
System.Drawing.Common.Tests (63)
mono\System.Imaging\MetafileTest.cs (3)
68
Assert.Equal(-30, header.Bounds.
X
);
143
Assert.Equal(0, header.Bounds.
X
);
191
Assert.Equal(0, mh.Bounds.
X
);
System\Drawing\BitmapTests.cs (1)
383
Color expectedColor = bitmap.GetPixel(rectangle.
X
+ x, rectangle.Y + y);
System\Drawing\Imaging\ImageAttributesTests.cs (49)
77
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, clone);
99
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
103
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
152
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
157
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
179
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
183
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
187
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
210
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
281
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
308
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
312
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
316
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
348
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
371
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
398
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
427
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
487
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
500
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
513
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
543
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
557
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
586
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
599
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
612
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
645
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
676
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
692
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
726
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
743
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
760
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
792
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
807
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
821
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
855
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
870
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
910
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
936
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
966
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
1016
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
1031
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
1062
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
1130
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
1146
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
1176
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
1189
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
1202
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
1254
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
1268
graphics.DrawImage(bitmap, _rectangle, _rectangle.
X
, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
System\Drawing\Printing\PrinterSettingsTests.cs (2)
459
Assert.Equal((double)printerSettings.DefaultPageSettings.Bounds.
X
, graphic.VisibleClipBounds.X, 0);
482
Assert.Equal((double)printerSettings.DefaultPageSettings.Bounds.
X
, graphic.VisibleClipBounds.X, 0);
System\Drawing\RegionTests.cs (8)
1342
Assert.Equal(expected, region.IsVisible(rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height));
1343
Assert.Equal(expected, region.IsVisible((float)rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height));
1344
Assert.Equal(expected, region.IsVisible(rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, s_graphic));
1345
Assert.Equal(expected, region.IsVisible(rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, disposedGraphics));
1346
Assert.Equal(expected, region.IsVisible(rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, null));
1347
Assert.Equal(expected, region.IsVisible((float)rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, s_graphic));
1348
Assert.Equal(expected, region.IsVisible((float)rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, disposedGraphics));
1349
Assert.Equal(expected, region.IsVisible((float)rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, null));
System.Drawing.Primitives (27)
System\Drawing\Rectangle.cs (26)
60
readonly get => new Point(
X
, Y);
125
public readonly int Left =>
X
;
139
public readonly int Right => unchecked(
X
+ Width);
167
left.
X
== right.
X
&& left.Y == right.Y && left.Width == right.Width && left.Height == right.Height;
223
public readonly bool Contains(int x, int y) =>
X
<= x && x <
X
+ Width && Y <= y && y < Y + Height;
236
(
X
<= rect.
X
) && (rect.
X
+ rect.Width <=
X
+ Width) &&
239
public override readonly int GetHashCode() => HashCode.Combine(
X
, Y, Width, Height);
278
X = result.
X
;
290
int x1 = Math.Max(a.
X
, b.
X
);
291
int x2 = Math.Min(a.
X
+ a.Width, b.
X
+ b.Width);
307
(rect.
X
<
X
+ Width) && (
X
< rect.
X
+ rect.Width) &&
315
int x1 = Math.Min(a.
X
, b.
X
);
316
int x2 = Math.Max(a.
X
+ a.Width, b.
X
+ b.Width);
343
public override readonly string ToString() => $"{{X={
X
},Y={Y},Width={Width},Height={Height}}}";
System\Drawing\RectangleF.cs (1)
323
public static implicit operator RectangleF(Rectangle r) => new RectangleF(r.
X
, r.Y, r.Width, r.Height);
System.Private.Windows.Core (2)
System\Private\Windows\Core\BinaryFormat\BinaryFormatWriter.cs (1)
167
value.
X
,
Windows\Win32\Graphics\Gdi\RegionScope.cs (1)
29
Region = PInvokeCore.CreateRectRgn(rectangle.
X
, rectangle.Y, rectangle.Right, rectangle.Bottom);
System.Windows.Forms (693)
System\Windows\Forms\Accessibility\AccessibleObject.cs (2)
1699
*pxLeft = bounds.
X
;
1712
*pxLeft = bounds.
X
;
System\Windows\Forms\Accessibility\LabelEditUiaTextProvider.cs (1)
192
Point ptStart = new(rectangle.
X
+ 1, rectangle.Y + 1);
System\Windows\Forms\ActiveX\AxHost.cs (1)
1201
if (oldBounds.
X
== x && oldBounds.Y == y && oldBounds.Width == width && oldBounds.Height == height)
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (1)
1702
bounds.Location = new Point(bounds.
X
, bounds.Y);
System\Windows\Forms\ContextMenuStrip.cs (3)
103
else if (bounds.
X
< screenBounds.
X
)
110
Show(bounds.
X
, bounds.Y);
System\Windows\Forms\Control.cs (12)
1011
set => SetBounds(value.
X
, value.Y, value.Width, value.Height, BoundsSpecified.All);
4500
cp.X -= parentClient.
X
;
4906
|| targetBounds.
X
< 0 || targetBounds.Y < 0)
4935
targetBounds.
X
,
5281
int sx = bounds.
X
;
5295
sx = (int)Math.Round(bounds.
X
* dx);
8165
e.Graphics.DrawRectangle(pen, rectangle.
X
, rectangle.Y, rectangle.Width - 1, rectangle.Height - 1);
8249
newArgs.Graphics.TranslateClip(-shift.
X
, -shift.Y);
9786
SetBoundsCore(rawScaledBounds.
X
, rawScaledBounds.Y, scaledSize.Width, scaledSize.Height, BoundsSpecified.All);
10074
x = adjustedBounds.
X
;
12646
if (locationProperty is not null && !locationProperty.IsReadOnly && (bounds.
X
!= _x || bounds.Y != _y))
12664
SetBoundsCore(bounds.
X
, bounds.Y, bounds.Width, bounds.Height, specified);
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (18)
137
Point p1 = new(bounds.
X
+ bounds.Width - 1, bounds.Y); // Upper inner right
138
Point p2 = new(bounds.
X
, bounds.Y); // Upper left
139
Point p3 = new(bounds.
X
, bounds.Y + bounds.Height - 1); // Bottom inner left
140
Point p4 = new(bounds.
X
+ bounds.Width - 1, bounds.Y + bounds.Height - 1); // Inner bottom right
192
Point p1 = new(bounds.
X
+ bounds.Width - 1, bounds.Y); // Upper inner right
193
Point p2 = new(bounds.
X
, bounds.Y); // Upper left
194
Point p3 = new(bounds.
X
, bounds.Y + bounds.Height - 1); // Bottom inner left
195
Point p4 = new(bounds.
X
+ bounds.Width - 1, bounds.Y + bounds.Height - 1); // Inner bottom right
240
Point p1 = new(bounds.
X
+ bounds.Width - 1, bounds.Y); // Upper inner right
241
Point p2 = new(bounds.
X
, bounds.Y); // Upper left
242
Point p3 = new(bounds.
X
, bounds.Y + bounds.Height - 1); // Bottom inner left
243
Point p4 = new(bounds.
X
+ bounds.Width - 1, bounds.Y + bounds.Height - 1); // Inner bottom right
332
Rectangle left = new(bounds.
X
, bounds.Y, size, bounds.Height);
333
Rectangle right = new(bounds.
X
+ bounds.Width - size, bounds.Y, size, bounds.Height);
334
Rectangle top = new(bounds.
X
+ size, bounds.Y, bounds.Width - size * 2, size);
335
Rectangle bottom = new(bounds.
X
+ size, bounds.Y + bounds.Height - size, bounds.Width - size * 2, size);
411
graphics.DrawImage(image, imageBounds.
X
, imageBounds.Y, image.Width, image.Height);
438
graphics.DrawRectangle(pen, r.
X
, r.Y, r.Width - 1, r.Height - 1);
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.LayoutOptions.cs (13)
281
layout.TextBounds.
X
- 1,
358
layout.CheckBounds = new Rectangle(Client.
X
, Client.Y, checkSizeFull, checkSizeFull);
374
layout.CheckBounds.X = (field.
X
+ field.Width) - layout.CheckBounds.Width;
378
layout.CheckBounds.X = field.
X
+ (field.Width - layout.CheckBounds.Width) / 2;
399
layout.CheckArea.X = field.
X
;
411
layout.CheckArea.X = field.
X
+ field.Width - checkSizeFull;
420
layout.CheckArea.X = field.
X
;
431
layout.CheckArea.X = field.
X
;
590
Math.Min(layout.TextBounds.
X
, layout.Field.
X
+ (layout.Field.Width - layout.TextBounds.Width) / 2),
591
layout.Field.
X
);
592
layout.TextBounds.Width = textRight - layout.TextBounds.
X
;
601
layout.TextBounds.X = layout.ImageBounds.
X
+ layout.ImageBounds.Width;
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxStandardAdapter.cs (1)
39
int focusRectFixup = layout.Focus.
X
& 0x1; // if it's odd, subtract one pixel for fixup.
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonBaseAdapter.cs (29)
105
hdc.FillRectangle(fieldBrush, new(bounds.
X
+ 2, bounds.Y + 2, 8, 8));
106
hdc.FillRectangle(fieldBrush, new(bounds.
X
+ 4, bounds.Y + 1, 4, 10));
107
hdc.FillRectangle(fieldBrush, new(bounds.
X
+ 1, bounds.Y + 4, 10, 4));
109
hdc.DrawLine(borderPen, new(bounds.
X
+ 4, bounds.Y + 0), new(bounds.
X
+ 8, bounds.Y + 0));
110
hdc.DrawLine(borderPen, new(bounds.
X
+ 4, bounds.Y + 11), new(bounds.
X
+ 8, bounds.Y + 11));
112
hdc.DrawLine(borderPen, new(bounds.
X
+ 2, bounds.Y + 1), new(bounds.
X
+ 4, bounds.Y + 1));
113
hdc.DrawLine(borderPen, new(bounds.
X
+ 8, bounds.Y + 1), new(bounds.
X
+ 10, bounds.Y + 1));
115
hdc.DrawLine(borderPen, new(bounds.
X
+ 2, bounds.Y + 10), new(bounds.
X
+ 4, bounds.Y + 10));
116
hdc.DrawLine(borderPen, new(bounds.
X
+ 8, bounds.Y + 10), new(bounds.
X
+ 10, bounds.Y + 10));
118
hdc.DrawLine(borderPen, new(bounds.
X
+ 0, bounds.Y + 4), new(bounds.
X
+ 0, bounds.Y + 8));
119
hdc.DrawLine(borderPen, new(bounds.
X
+ 11, bounds.Y + 4), new(bounds.
X
+ 11, bounds.Y + 8));
121
hdc.DrawLine(borderPen, new(bounds.
X
+ 1, bounds.Y + 2), new(bounds.
X
+ 1, bounds.Y + 4));
122
hdc.DrawLine(borderPen, new(bounds.
X
+ 1, bounds.Y + 8), new(bounds.
X
+ 1, bounds.Y + 10));
124
hdc.DrawLine(borderPen, new(bounds.
X
+ 10, bounds.Y + 2), new(bounds.
X
+ 10, bounds.Y + 4));
125
hdc.DrawLine(borderPen, new(bounds.
X
+ 10, bounds.Y + 8), new(bounds.
X
+ 10, bounds.Y + 10));
153
layout.CheckBounds.
X
+ GetScaledNumber(offset, scale),
161
layout.CheckBounds.
X
+ GetScaledNumber(offset - 1, scale),
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxUiaTextProvider.cs (1)
253
Point ptStart = new(rectangle.
X
+ 1, rectangle.Y + 1);
System\Windows\Forms\Controls\ComboBox\ComboBox.FlatComboAdapter.cs (8)
36
_innerBorder = new Rectangle(_outerBorder.
X
+ 1, _outerBorder.Y + 1, _outerBorder.Width - dropDownButtonWidth - 2, _outerBorder.Height - 2);
37
_innerInnerBorder = new Rectangle(_innerBorder.
X
+ 1, _innerBorder.Y + 1, _innerBorder.Width - 2, _innerBorder.Height - 2);
95
new Rectangle(_outerBorder.
X
, _outerBorder.Y, _dropDownRect.Width + 1, _outerBorder.Height));
101
new Rectangle(_dropDownRect.
X
, _outerBorder.Y, _outerBorder.Right - _dropDownRect.
X
, _outerBorder.Height));
143
new Rectangle(_outerBorder.
X
, _outerBorder.Y, _dropDownRect.Width + 1, _outerBorder.Height));
149
new Rectangle(_dropDownRect.
X
, _outerBorder.Y, _outerBorder.Right - _dropDownRect.
X
, _outerBorder.Height));
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (1)
4070
Invalidate(new Rectangle(_layout.Inside.
X
, _layout.Inside.Y, RowHeadersWidth, ColumnHeadersHeight));
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (52)
2542
clip.X = _layout.Data.
X
- _mouseBarOffset - 1;
2543
clip.Width = leftEdge - Columns[columnIndex].MinimumThickness - _layout.Data.
X
+ 3;
2984
r.X = Math.Max(inside.Left, r.
X
);
2985
r.X = Math.Min(r.
X
, inside.Right - r.Width);
2994
r.X = Math.Min(inside.Right - r.Width, r.
X
);
2995
r.X = Math.Max(r.
X
, inside.Left);
3011
r.X = Math.Max(inside.Left, r.
X
);
3015
r.X = Math.Min(inside.Right - 3, r.
X
);
3016
r.X = Math.Max(r.
X
, 0);
3026
inside.
X
,
4477
Debug.Assert(newLayout.Data.
X
>= 0);
5666
_layout.ColumnHeaders.
X
,
5713
PInvoke.PatBlt(dc, r.
X
, r.Y, r.Width, DATAGRIDVIEW_shadowEdgeThickness, ROP_CODE.PATINVERT);
5714
PInvoke.PatBlt(dc, r.
X
, r.Y + r.Height - DATAGRIDVIEW_shadowEdgeThickness, r.Width, DATAGRIDVIEW_shadowEdgeThickness, ROP_CODE.PATINVERT);
5715
PInvoke.PatBlt(dc, r.
X
, r.Y + DATAGRIDVIEW_shadowEdgeThickness, DATAGRIDVIEW_shadowEdgeThickness, r.Height - 2 * DATAGRIDVIEW_shadowEdgeThickness, ROP_CODE.PATINVERT);
5716
PInvoke.PatBlt(dc, r.
X
+ r.Width - DATAGRIDVIEW_shadowEdgeThickness, r.Y + DATAGRIDVIEW_shadowEdgeThickness, DATAGRIDVIEW_shadowEdgeThickness, r.Height - 2 * DATAGRIDVIEW_shadowEdgeThickness, ROP_CODE.PATINVERT);
5731
PInvoke.PatBlt(dc, r.
X
, r.Y, r.Width, r.Height, ROP_CODE.PATINVERT);
6116
newX = Math.Max(x + _mouseBarOffset, _layout.Data.
X
);
6305
delta = x - _layout.RowHeaders.
X
- RowHeadersWidth + 1;
7084
width = rowRect.
X
- columnRect.
X
;
8217
cx = RightToLeftInternal ? data.Right : data.
X
;
8222
if ((RightToLeftInternal && cx < data.
X
) || (!RightToLeftInternal && cx > data.Right))
8253
if ((RightToLeftInternal && cx < data.
X
) || (!RightToLeftInternal && cx > data.Right))
8303
|| (RightToLeftInternal && cx - viewedColumnWidth < data.
X
))
8304
? RightToLeftInternal ? cx - data.
X
: data.Right - cx
8328
Debug.Assert(RightToLeftInternal || (x >= data.
X
- 1 && x < data.Right), "x must be inside the horizontal bounds of this.layout.Data");
8329
Debug.Assert(!RightToLeftInternal || (x >= data.
X
&& x <= data.Right), "x must be inside the horizontal bounds of this.layout.Data");
8331
if (!RightToLeftInternal && x == data.
X
- 1)
8340
int cx = RightToLeftInternal ? data.Right - 1 : data.
X
;
8345
&& ((!RightToLeftInternal && cx < data.Right) || (RightToLeftInternal && cx >= data.
X
)))
8386
&& ((!RightToLeftInternal && cx < data.Right) || (RightToLeftInternal && cx >= data.
X
)))
8459
int x = RightToLeftInternal ? _layout.Data.Right - 1 : _layout.Data.
X
;
9094
Rectangle rowRect = new(data.
X
, cy, data.Width, displayHeight);
10021
Invalidate(new Rectangle(data.
X
, top, data.Width, bottom - top));
10308
rightToLeftInternal ? _layout.Data.
X
- _vertScrollBar.Width : _layout.Data.Right,
10325
rightToLeftInternal ? _layout.Inside.
X
+ _layout.ResizeBoxRect.Width : _layout.Inside.
X
,
10366
rightToLeftInternal ? _layout.Data.
X
- _vertScrollBar.Width : _layout.Data.Right,
14513
rightArea.Width -= leftEdge - rightArea.
X
;
17449
right = new Rectangle(oldClientRectangle.
X
+ oldClientRectangle.Width - borderWidth,
17453
bottom = new Rectangle(oldClientRectangle.
X
,
17471
right = new Rectangle(newClientRectangle.
X
+ newClientRectangle.Width - borderWidth,
17481
bottom = new Rectangle(newClientRectangle.
X
,
17491
right = new Rectangle(oldGridFocusRectangle.
X
+ oldGridFocusRectangle.Width - 1,
17497
bottom = new Rectangle(oldGridFocusRectangle.
X
,
19370
cellBounds.X = RightToLeftInternal ? bandBounds.Right - cx - cellBounds.Width : bandBounds.
X
+ cx;
19450
: scrollingBounds.
X
+ cx;
26068
while (xColumnRightEdge < _layout.Data.
X
&& Columns.DisplayInOrder(firstDisplayedScrollingColumn, columnIndex))
26077
if (xColumnRightEdge < _layout.Data.
X
)
26353
Debug.Assert(rowsRect.
X
> 0);
26380
rowsRect.X = _layout.Inside.
X
;
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (4)
310
marginWidths = rectThemeMargins.
X
+ rectThemeMargins.Width;
413
if (s_rectThemeMargins.
X
== -1)
417
s_rectThemeMargins.X = rectContent.
X
;
681
valBounds.Offset(borderWidths.
X
, borderWidths.Y);
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (48)
3162
DataGridView.RightToLeftInternal ? bounds.
X
: bounds.Right - dividerThickness,
3197
bounds.
X
, bounds.Bottom - dividerThickness, bounds.Width, dividerThickness);
3213
graphics.DrawLine(penGridColor, bounds.
X
, bounds.Y, bounds.
X
, bounds.Bottom - 1);
3217
graphics.DrawLine(penControlDark, bounds.
X
, bounds.Y, bounds.
X
, bounds.Bottom - 1);
3221
graphics.DrawLine(penControlLightLight, bounds.
X
, bounds.Y, bounds.
X
, bounds.Bottom - 1);
3237
graphics.DrawLine(penBackColor, bounds.
X
, bounds.Y, bounds.
X
, bounds.Bottom - 1);
3238
graphics.DrawLine(penControlLightLight, bounds.
X
, y1, bounds.
X
, y2);
3255
graphics.DrawLine(penControlDark, bounds.
X
, bounds.Y, bounds.
X
, bounds.Bottom - 1);
3256
graphics.DrawLine(penControlLightLight, bounds.
X
+ 1, y1, bounds.
X
+ 1, y2);
3273
graphics.DrawLine(penControlLightLight, bounds.
X
, bounds.Y, bounds.
X
, bounds.Bottom - 1);
3274
graphics.DrawLine(penControlDark, bounds.
X
+ 1, y1, bounds.
X
+ 1, y2);
3351
graphics.DrawLine(penGridColor, bounds.
X
, bounds.Y, bounds.Right - 1, bounds.Y);
3355
x1 = bounds.
X
;
3373
x1 = bounds.
X
;
3391
x1 = bounds.
X
;
3418
x1 = bounds.
X
;
3432
graphics.DrawLine(penControlDark, bounds.
X
, bounds.Y, bounds.Right - 1, bounds.Y);
3437
x1 = bounds.
X
;
3451
graphics.DrawLine(penControlLightLight, bounds.
X
, bounds.Y, bounds.Right - 1, bounds.Y);
3459
graphics.DrawLine(penGridColor, bounds.
X
, bounds.Bottom - 1, bounds.Right - 1, bounds.Bottom - 1);
3469
graphics.DrawLine(penControlLightLight, bounds.
X
, bounds.Bottom - 1, x2, bounds.Bottom - 1);
3473
x1 = bounds.
X
;
3485
x1 = bounds.
X
;
3571
iconBounds.X += cellBounds.
X
;
3598
rectPadding = new Rectangle(bounds.
X
, bounds.Y, cellStyle.Padding.Right, bounds.Height);
3607
rectPadding = new Rectangle(bounds.
X
, bounds.Y, cellStyle.Padding.Left, bounds.Height);
3767
DataGridView.EditingControl.Location = new Point(editingControlBounds.
X
, editingControlBounds.Y);
3813
if (cellClip.
X
- cellBounds.
X
>= borderAndPaddingWidths.
X
)
3815
xEditingPanel = cellClip.
X
;
3816
wEditingPanel -= cellClip.
X
- cellBounds.
X
;
3820
xEditingPanel = cellBounds.
X
+ borderAndPaddingWidths.
X
;
3821
wEditingPanel -= borderAndPaddingWidths.
X
;
3833
xEditingControl = cellBounds.
X
- cellClip.
X
;
3834
wEditingControl = cellBounds.Width - borderAndPaddingWidths.
X
- borderAndPaddingWidths.Width;
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (2)
735
preferredSize.Width += borderWidths.
X
;
1064
valBounds.Offset(borderWidths.
X
, borderWidths.Y);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (5)
693
preferredSize.Width += rectThemeMargins.
X
+ rectThemeMargins.Width;
766
valBounds.Offset(borderWidths.
X
, borderWidths.Y);
855
valBounds.Width -= rectThemeMargins.
X
+ rectThemeMargins.Width;
859
valBounds.X += rectThemeMargins.
X
;
860
valBounds.Width -= rectThemeMargins.
X
+ rectThemeMargins.Width;
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (29)
537
Size adjustedSize = new(size.Width - borderAndPaddingWidths.
X
- borderAndPaddingWidths.Width,
554
if (x >= borderAndPaddingWidths.
X
+ 1 &&
555
x <= borderAndPaddingWidths.
X
+ dropWidth + 1)
1914
valBounds.Offset(borderWidths.
X
, borderWidths.Y);
1983
g.DrawRectangle(SystemPens.ControlLightLight, new Rectangle(valBounds.
X
, valBounds.Y, valBounds.Width - 1, valBounds.Height - 1));
2095
g.DrawLine(pen, dropRect.
X
, dropRect.Y,
2096
dropRect.
X
+ dropRect.Width - 1, dropRect.Y);
2097
g.DrawLine(pen, dropRect.
X
, dropRect.Y,
2098
dropRect.
X
, dropRect.Y + dropRect.Height - 1);
2104
g.DrawLine(pen, valBounds.
X
, valBounds.Y + valBounds.Height - 1,
2105
valBounds.
X
+ valBounds.Width - 1, valBounds.Y + valBounds.Height - 1);
2106
g.DrawLine(pen, valBounds.
X
+ valBounds.Width - 1, valBounds.Y,
2107
valBounds.
X
+ valBounds.Width - 1, valBounds.Y + valBounds.Height - 1);
2115
g.DrawLine(pen, dropRect.
X
, dropRect.Y + dropRect.Height - 1,
2116
dropRect.
X
+ dropRect.Width - 1, dropRect.Y + dropRect.Height - 1);
2117
g.DrawLine(pen, dropRect.
X
+ dropRect.Width - 1, dropRect.Y,
2118
dropRect.
X
+ dropRect.Width - 1, dropRect.Y + dropRect.Height - 1);
2124
g.DrawLine(pen, valBounds.
X
, valBounds.Y,
2125
valBounds.
X
+ valBounds.Width - 2, valBounds.Y);
2126
g.DrawLine(pen, valBounds.
X
, valBounds.Y,
2127
valBounds.
X
, valBounds.Y + valBounds.Height - 1);
2134
g.DrawLine(pen, dropRect.
X
+ 1, dropRect.Y + 1,
2135
dropRect.
X
+ dropRect.Width - 2, dropRect.Y + 1);
2136
g.DrawLine(pen, dropRect.
X
+ 1, dropRect.Y + 1,
2137
dropRect.
X
+ 1, dropRect.Y + dropRect.Height - 2);
2144
g.DrawLine(pen, dropRect.
X
+ 1, dropRect.Y + dropRect.Height - 2,
2145
dropRect.
X
+ dropRect.Width - 2, dropRect.Y + dropRect.Height - 2);
2146
g.DrawLine(pen, dropRect.
X
+ dropRect.Width - 2, dropRect.Y + 1,
2147
dropRect.
X
+ dropRect.Width - 2, dropRect.Y + dropRect.Height - 2);
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (4)
383
if (s_rectThemeMargins.
X
== -1)
387
s_rectThemeMargins.X = rectContent.
X
;
393
if (s_rectThemeMargins.
X
== 3 &&
539
bounds.Offset(borderWidths.
X
, borderWidths.Y);
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (13)
584
imageBounds = new Rectangle(bounds.
X
, bounds.Y, imgWidth, imgHeight);
592
bounds.
X
,
601
bounds.
X
,
615
DataGridViewContentAlignment.TopRight => bounds.
X
,
617
DataGridViewContentAlignment.MiddleRight => bounds.
X
,
619
DataGridViewContentAlignment.BottomRight => bounds.
X
,
621
_ => imageBounds.
X
629
DataGridViewContentAlignment.TopLeft => bounds.
X
,
631
DataGridViewContentAlignment.MiddleLeft => bounds.
X
,
633
DataGridViewContentAlignment.BottomLeft => bounds.
X
,
634
_ => imageBounds.
X
643
imageBounds.X = bounds.
X
+ (bounds.Width - imageBounds.Width) / 2;
746
valBounds.Offset(borderWidths.
X
, borderWidths.Y);
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (1)
906
valBounds.Offset(borderWidths.
X
, borderWidths.Y);
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (2)
1530
cellBounds.X = rowBounds.
X
+ cx;
1620
cellBounds.X = dataBounds.
X
+ cx;
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (4)
541
borderAndPaddingHeights += rectThemeMargins.
X
;
648
valBounds.Offset(borderWidths.
X
, borderWidths.Y);
722
valBounds.Height -= rectThemeMargins.
X
+ rectThemeMargins.Width;
723
valBounds.Y += rectThemeMargins.
X
;
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (2)
671
valBounds.Offset(borderWidths.
X
, borderWidths.Y);
798
DataGridView!.EditingControl!.Location = new Point(editingControlBounds.
X
, editingControlBounds.Y);
System\Windows\Forms\Controls\DataGridView\DataGridViewTopLeftHeaderCell.cs (10)
235
valBounds.Offset(borderWidths.
X
, borderWidths.Y);
378
graphics.DrawLine(penControlDark, bounds.
X
, bounds.Y, bounds.
X
, bounds.Bottom - 1);
379
graphics.DrawLine(penControlDark, bounds.
X
, bounds.Y, bounds.Right - 1, bounds.Y);
384
graphics.DrawLine(penControlLightLight, bounds.
X
, bounds.Y, bounds.
X
, bounds.Bottom - 1);
385
graphics.DrawLine(penControlLightLight, bounds.
X
, bounds.Y, bounds.Right - 1, bounds.Y);
390
graphics.DrawLine(penControlDark, bounds.
X
+ 1, bounds.Y + 1, bounds.
X
+ 1, bounds.Bottom - 1);
391
graphics.DrawLine(penControlDark, bounds.
X
+ 1, bounds.Y + 1, bounds.Right - 1, bounds.Y + 1);
System\Windows\Forms\Controls\DataGridView\DataGridViewUtilities.cs (6)
392
ptTextLocation.X = cellBounds.
X
;
397
ptTextLocation.X = cellBounds.
X
+ (cellBounds.Width - sizeText.Width) / 2;
407
ptTextLocation.X = cellBounds.
X
;
412
ptTextLocation.X = cellBounds.
X
+ (cellBounds.Width - sizeText.Width) / 2;
422
ptTextLocation.X = cellBounds.
X
;
427
ptTextLocation.X = cellBounds.
X
+ (cellBounds.Width - sizeText.Width) / 2;
System\Windows\Forms\Controls\GroupBox\GroupBoxRenderer.cs (7)
223
clipRight.Width = clipMiddle.
X
- boxBounds.
X
;
229
clipRight.Width = boxBounds.Right - clipRight.
X
;
323
bounds.Left, boxTop - 1, textBounds.
X
- 3, boxTop - 1, // Top-left
324
textBounds.
X
+ textBounds.Width + 2, boxTop - 1, bounds.Width - 2, boxTop - 1, // Top-right
335
bounds.Left + 1, boxTop, textBounds.
X
- 2, boxTop, // Top-left
336
textBounds.
X
+ textBounds.Width + 1, boxTop, bounds.Width - 1, boxTop, // Top-right
System\Windows\Forms\Controls\Labels\Label.cs (5)
877
int xLoc = r.
X
+ 2;
882
xLoc = (r.
X
+ r.Width - 4) - pointImageSize.Width;
886
xLoc = r.
X
+ (r.Width - pointImageSize.Width) / 2;
991
ControlPaint.DrawImageDisabled(g, image, loc.
X
, loc.Y, BackColor);
995
g.DrawImage(image, loc.
X
, loc.Y, image.Width, image.Height);
System\Windows\Forms\Controls\Labels\LinkLabel.cs (3)
386
xLoc = clientRect.
X
;
405
xLoc = clientRect.
X
;
581
clientRectWithPadding.
X
+ iLeftMargin,
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (7)
541
bounds.
X
+ _listItemStartPosition,
549
box.X = bounds.
X
+ bounds.Width - _idealCheckSize - _listItemStartPosition;
561
CheckBoxRenderer.DrawCheckBoxWithVisualStyles(e, new Point(box.
X
, box.Y), cbState, HWNDInternal);
570
bounds.
X
+ _idealCheckSize + (_listItemStartPosition * 2),
578
textBounds.X = bounds.
X
;
627
textBounds.
X
+ BORDER_SIZE,
720
bounds.
X
+ BORDER_SIZE,
System\Windows\Forms\Controls\ListView\DrawListViewColumnHeaderEventArgs.cs (4)
113
Graphics.DrawLine(SystemPens.ControlLightLight, r.
X
, r.Y, r.Right, r.Y);
114
Graphics.DrawLine(SystemPens.ControlLightLight, r.
X
, r.Y, r.
X
, r.Bottom);
117
Graphics.DrawLine(SystemPens.ControlDark, r.
X
+ 1, r.Bottom, r.Right, r.Bottom);
System\Windows\Forms\Controls\ListView\DrawListViewItemEventArgs.cs (1)
106
resultBounds = new Rectangle(originalBounds.
X
, originalBounds.Y, textSize.Width, textSize.Height);
System\Windows\Forms\Controls\ListView\ListView.cs (1)
5011
rectInvalid.Width += rectInvalid.
X
;
System\Windows\Forms\Controls\ListView\ListViewItem.IKeyboardToolTip.cs (2)
97
Point point = new(listviewBounds.
X
+ itemBounds.
X
, listviewBounds.Y + itemBounds.Y);
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemBaseAccessibleObject.cs (2)
43
_owningListView.AccessibilityObject.Bounds.
X
+ _owningItem.Bounds.
X
,
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemListAccessibleObject.cs (2)
21
_owningListView.AccessibilityObject.Bounds.
X
+ _owningItem.Bounds.
X
,
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObject.cs (4)
55
width = ParentInternal.GetSubItemBounds(ParentInternal.FirstSubItemIndex + 1).
X
- bounds.
X
;
64
_owningListView.AccessibilityObject.Bounds.
X
+ bounds.
X
,
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (4)
1974
ControlPaint.DrawReversibleLine(new Point(rc.
X
+ i, rc.Y), new Point(rc.
X
+ i, rc.Y + rc.Height), targetControl.BackColor);
1981
ControlPaint.DrawReversibleLine(new Point(rc.
X
, rc.Y + i), new Point(rc.
X
+ rc.Width, rc.Y + i), targetControl.BackColor);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CategoryGridEntry.cs (2)
137
g.DrawLine(topLinePen, rect.
X
- 1, rect.Y - 1, rect.Width + 2, rect.Y - 1);
154
g.DrawLine(topLinePen, rect.
X
- 2, rect.Y - 1, rect.Width + 1, rect.Y - 1);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (12)
1540
int stringX = rect.
X
+ PropertyLabelIndent;
1556
rect.Width = totalWidth - rect.
X
;
1561
g.FillRectangle(backBrush, rect.
X
, rect.Y, rect.Width, rect.Height);
1566
g.FillRectangle(stripeBrush, rect.
X
, rect.Y, borderWidth, rect.Height);
1756
g.DrawRectangle(pen, outline.
X
, outline.Y, outline.Width - 1, outline.Height - 1);
1762
outline.
X
+ indent,
1764
outline.
X
+ outline.Width - indent - 1,
1772
outline.
X
+ outline.Width / 2,
1774
outline.
X
+ outline.Width / 2,
1846
rect.
X
+ 1,
1906
rect.
X
- 1,
1946
ValueToolTipLocation = doToolTip ? new Point(rect.
X
+ 2, rect.Y - 1) : InvalidPoint;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (16)
456
Point point = PointToScreen(new(rect.
X
, rect.Y));
602
Point pt = new(rect.
X
, rect.Y);
895
control.SetBounds(targetRectangle.
X
, targetRectangle.Y, targetRectangle.Width, targetRectangle.Height);
1102
Point newOrigin = new(rect.
X
, rect.Y);
1157
Point newOrigin = new(rect.
X
, rect.Y);
1364
return PARAM.ToInt(r.
X
, r.Y);
1424
rectScreen.
X
+ rectScreen.Width - size.Width,
1425
Math.Max(rectScreen.
X
, location.X + rect.
X
+ rect.Width - size.Width));
2127
r.Width -= r.
X
;
2988
gridEntry.OnMouseClick(e.X - r.
X
, e.Y - r.Y, e.Clicks, e.Button);
3056
if (onLabel && gridItem.GetLabelToolTipLocation(e.X - itemRect.
X
, e.Y - itemRect.Y) != InvalidPoint)
3271
Point startPosition = FindPosition(clipRect.
X
, clipRect.Y);
3272
Point endPosition = FindPosition(clipRect.
X
, clipRect.Y + clipRect.Height);
4326
rect.
X
+ rect.Width - sizeBtn.Width, rect.Y,
5272
tipPt = curEntry.GetLabelToolTipLocation(mouseLoc.X - itemRect.
X
, mouseLoc.Y - itemRect.Y);
System\Windows\Forms\Controls\Splitter\Splitter.cs (4)
584
r.X = bounds.
X
+ splitSize;
592
r.X = bounds.
X
+ bounds.Width - splitSize - r.Width;
702
PInvoke.PatBlt(dc, r.
X
, r.Y, r.Width, r.Height, ROP_CODE.PATINVERT);
827
int xSplit = r.
X
;
System\Windows\Forms\Controls\TabControl\TabPage.cs (2)
617
inflateRect.
X
- 4,
736
base.SetBoundsCore(r.
X
, r.Y, r.Width, r.Height, specified == BoundsSpecified.None ? BoundsSpecified.None : BoundsSpecified.All);
System\Windows\Forms\Controls\TextBox\TextBoxBase.TextBoxBaseUiaTextProvider.cs (1)
371
Point ptStart = new(rectangle.
X
+ 1, rectangle.Y + 1);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (18)
202
CommonProperties.UpdateSpecifiedBounds(this, bounds.
X
, bounds.Y, bounds.Width, bounds.Height, BoundsSpecified.Location);
2140
Point midPointOfCurrent = new(selectedItem.Bounds.
X
+ selectedItem.Width / 2,
2164
Point otherItemMidLocation = new(otherItem.Bounds.
X
+ otherItem.Width / 2, (down) ? otherItem.Bounds.Top : otherItem.Bounds.Bottom);
2666
bounds.
X
,
3547
clippingRect.Offset(-bounds.
X
, -bounds.Y);
3558
item.Bounds.
X
,
3571
item.Bounds.
X
,
3782
int start = _lastInsertionMarkRect.
X
;
3815
new(_lastInsertionMarkRect.
X
, horizontalBeamStart), new(_lastInsertionMarkRect.Right - 1, horizontalBeamStart),
3816
new(_lastInsertionMarkRect.
X
, horizontalBeamStart + 1), new(_lastInsertionMarkRect.Right - 1, horizontalBeamStart + 1)
3822
new(_lastInsertionMarkRect.
X
, start), new(_lastInsertionMarkRect.
X
, start + widthOfBeam - 1),
3823
new(_lastInsertionMarkRect.
X
+ 1, start + 1), new(_lastInsertionMarkRect.
X
+ 1, start + widthOfBeam - 2)
4176
gripRectangle.X = Math.Max(0, displayRect.
X
- Grip.GripThickness);
4344
bool verticallyContained = clientBounds.Contains(clientBounds.
X
, item.Bounds.Top)
4345
&& clientBounds.Contains(clientBounds.
X
, item.Bounds.Bottom);
4657
SetBoundsCore(bounds.
X
, bounds.Y, bounds.Width, bounds.Height, specified);
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.cs (3)
43
CommonProperties.UpdateSpecifiedBounds(c, bounds.
X
, bounds.Y, bounds.Width, bounds.Height);
364
CommonProperties.UpdateSpecifiedBounds(_control, specifiedBounds.
X
, specifiedBounds.Y, specifiedBounds.Width, specifiedBounds.Height);
375
CommonProperties.UpdateSpecifiedBounds(_control, bounds.
X
, bounds.Y, bounds.Width, bounds.Height);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (2)
1202
SetBoundsCore(bounds.
X
, bounds.Y, bounds.Width, bounds.Height, BoundsSpecified.Location);
1528
base.SetBoundsCore(bounds.
X
, bounds.Y, bounds.Width, bounds.Height, specified);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (11)
467
if (!displayRect.Contains(displayRect.
X
, nextItem.Bounds.Top)
468
|| !displayRect.Contains(displayRect.
X
, nextItem.Bounds.Bottom))
483
if ((Items[index].Visible && displayRect.Contains(displayRect.
X
, Items[index].Bounds.Top - delta))
496
if (displayRect.Contains(displayRect.
X
, Items[index].Bounds.Bottom - delta))
665
if (displayRectangle.Contains(displayRectangle.
X
, adjustedLastItemBounds.Top)
666
&& displayRectangle.Contains(displayRectangle.
X
, adjustedLastItemBounds.Bottom))
692
if (displayRectangle.Contains(displayRectangle.
X
, adjustedLastItemBounds.Top)
693
&& displayRectangle.Contains(displayRectangle.
X
, adjustedLastItemBounds.Bottom))
834
if (_indexOfFirstDisplayedItem == -1 && displayRectangle.Contains(displayRectangle.
X
, item.Bounds.Top))
843
UpScrollButton.Enabled = !displayRectangle.Contains(displayRectangle.
X
, minY);
844
DownScrollButton.Enabled = !displayRectangle.Contains(displayRectangle.
X
, maxY);
System\Windows\Forms\Controls\ToolStrips\ToolStripHighContrastRenderer.cs (10)
144
g.DrawRectangle(SystemPens.ButtonHighlight, bounds.
X
, bounds.Y, bounds.Width - 1, bounds.Height - 1);
190
g.DrawRectangle(SystemPens.ControlLight, bounds.
X
, bounds.Y, bounds.Width - 1, bounds.Height - 1);
263
g.DrawRectangle(SystemPens.ButtonHighlight, bounds.
X
, bounds.Y, bounds.Width - 1, bounds.Height - 1);
277
g.DrawRectangle(SystemPens.ButtonShadow, bounds.
X
, bounds.Y, bounds.Width - 1, bounds.Height - 1);
302
g.DrawLine(p, bounds.
X
+ indent, bounds.Y, bounds.Width - 1, bounds.Y);
304
g.DrawLine(p, bounds.
X
+ indent, bounds.Height - 1, bounds.Width - 1, bounds.Height - 1);
307
g.DrawLine(p, bounds.
X
, bounds.Y + indent, bounds.
X
, bounds.Height - 1);
420
g.DrawRectangle(SystemPens.ControlLight, bounds.
X
, bounds.Y, bounds.Width - 1, bounds.Height - 1);
452
g.DrawRectangle(SystemPens.ControlLight, bounds.
X
, bounds.Y, bounds.Width - 1, bounds.Height - 1);
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (2)
953
SetBounds(currentBounds.
X
, currentBounds.Y, currentBounds.Width, value);
2010
SetBounds(currentBounds.
X
, currentBounds.Y, value, currentBounds.Height);
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (1)
1076
rect.X = Math.Max(rect.
X
, 0);
System\Windows\Forms\Controls\ToolStrips\ToolStripOverflow.cs (1)
77
SetBoundsCore(bounds.
X
, bounds.Y, bounds.Width, bounds.Height, specified);
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.cs (1)
894
Point endLocation = (Orientation == Orientation.Horizontal) ? new Point(clientLocation.X, row.Bounds.Y) : new Point(row.Bounds.
X
, clientLocation.Y);
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.ToolStripPanelControlCollection.XYComparer.cs (4)
26
if (one.Bounds.
X
< two.Bounds.
X
)
31
if (one.Bounds.
X
== two.Bounds.
X
)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.ToolStripPanelControlCollection.YXComparer.cs (2)
34
return one.Bounds.
X
< two.Bounds.
X
? -1 : 1;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelCell.cs (1)
66
Debug.Assert(_cachedBounds.
X
>= 0 && _cachedBounds.Y >= 0, "cached bounds are outside of the client area, investigate");
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.cs (1)
540
cachedBounds.X = Math.Max(0, cachedBounds.
X
- margins[i] - c.Margin.Top);
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.HorizontalRowManager.cs (1)
421
if (Row.Cells[index].Bounds.
X
>= locationToDrag.X)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.VerticalRowManager.cs (2)
58
int x = previousRowBounds.
X
+ previousRowBounds.Width - (previousRowBounds.Width >> 2);
60
dragBounds.Width += dragBounds.
X
- x;
System\Windows\Forms\Controls\ToolStrips\ToolStripProfessionalLowResolutionRenderer.cs (4)
67
g.DrawLine(p, bounds.
X
+ indent, bounds.Y, bounds.Width - 1, bounds.Y);
69
g.DrawLine(p, bounds.
X
+ indent, bounds.Height - 1, bounds.Width - 1, bounds.Height - 1);
72
g.DrawLine(p, bounds.
X
, bounds.Y + indent, bounds.
X
, bounds.Height - 1);
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (20)
208
overflowArrowRect.
X
,
210
overflowArrowRect.
X
,
213
overflowArrowRect.
X
+ 1,
215
overflowArrowRect.
X
+ 1,
374
g.DrawRectangle(pen, bounds.
X
, bounds.Y, bounds.Width - 1, bounds.Height - 1);
388
g.DrawRectangle(pen, bounds.
X
, bounds.Y, bounds.Width - 1, bounds.Height - 1);
588
g.DrawRectangle(pen, bounds.
X
, bounds.Y, bounds.Width - 1, bounds.Height - 1);
645
g.DrawRectangle(pen, bounds.
X
, bounds.Y, bounds.Width - 1, bounds.Height - 1);
663
g.DrawRectangle(pen, bounds.
X
, bounds.Y, bounds.Width - 1, bounds.Height - 1);
1062
g.DrawRectangle(pen, bounds.
X
, bounds.Y, bounds.Width - 1, bounds.Height - 1);
1075
g.DrawRectangle(SystemPens.Highlight, bounds.
X
, bounds.Y, bounds.Width - 1, bounds.Height - 1);
1096
g.DrawRectangle(pen, bounds.
X
, bounds.Y, bounds.Width - 1, bounds.Height - 1);
1199
g.DrawRectangle(pen, bounds.
X
, bounds.Y, bounds.Width - 1, bounds.Height - 1);
1298
Point top1 = new(overflowBoundsFill.
X
- 2, 0);
1299
Point top2 = new(overflowBoundsFill.
X
- 1, 1);
1321
Rectangle fillRect = new(overflowBoundsFill.
X
- 1, 0, 1, 1);
1331
g.FillRectangle(brush, overflowBoundsFill.
X
, overflowBoundsFill.Top - 1, 1, 1);
1478
bounds.Width = dropDownMenu.Width - bounds.
X
;
1485
bounds.Width = dropDownMenu.Width - bounds.
X
- dropDownMenu.Padding.Right;
1596
g.DrawRectangle(pen, bounds.
X
, bounds.Y, bounds.Width - 1, bounds.Height - 1);
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (2)
985
baseRect.X = sizeGripBounds.Width - baseRect.
X
- baseRect.Width;
988
baseRect.Offset(sizeGripBounds.
X
, sizeGripBounds.Bottom - 12 /*height of pyramid (10px) + 2px padding from bottom*/);
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderEventArgs.cs (1)
125
return new Rectangle(itemBounds.
X
+ 1, 0, itemBounds.Width - 2, 2);
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackLayout.cs (1)
473
itemLocation.X = bounds.
X
;
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemRenderer.cs (1)
467
g.DrawRectangle(pen, bounds.
X
, bounds.Y, bounds.Width - 1, bounds.Height - 1);
System\Windows\Forms\Controls\TrackBar\TrackBar.cs (1)
395
SetBounds(r.
X
, r.Y, r.Height, r.Width, BoundsSpecified.All);
System\Windows\Forms\Controls\TrackBar\TrackBarRenderer.cs (4)
120
t_visualStyleRenderer.DrawEdge(g, new Rectangle(bounds.
X
, bounds.Y, LineWidth, bounds.Height), Edges.Left, edgeStyle, EdgeEffects.None);
129
float x = bounds.
X
+ (numTicks - 1) * inc;
150
t_visualStyleRenderer.DrawEdge(g, new Rectangle(bounds.
X
, bounds.Y, bounds.Width, LineWidth), Edges.Top, edgeStyle, EdgeEffects.None);
160
t_visualStyleRenderer.DrawEdge(g, new Rectangle(bounds.
X
, (int)Math.Round(y), bounds.Width, LineWidth), Edges.Top, edgeStyle, EdgeEffects.None);
System\Windows\Forms\Controls\TreeView\TreeView.cs (2)
2829
Point textLoc = new(bounds.
X
- 1, bounds.Y); // required to center the text
3431
client = new Point(treeNode.Bounds.
X
, treeNode.Bounds.Y + treeNode.Bounds.Height / 2);
System\Windows\Forms\Design\ComponentEditorForm.cs (2)
238
grayStrip.Bounds = new Rectangle(pageHostBounds.
X
, BUTTON_PAD,
261
bounds.X = bounds.Width + bounds.
X
- BUTTON_WIDTH;
System\Windows\Forms\Dialogs\CommonDialogs\CommonDialog.cs (1)
98
int x = screen.
X
+ (screen.Width - r.right + r.left) / 2;
System\Windows\Forms\ErrorProvider\ErrorProvider.ErrorWindow.cs (7)
158
_windowBounds.
X
,
198
bounds.
X
- _windowBounds.
X
,
322
iconBounds.X -= _windowBounds.
X
;
344
iconRegion.Region.Translate(iconBounds.
X
, iconBounds.Y);
346
iconRegion.Region.Translate(-iconBounds.
X
, -iconBounds.Y);
387
_windowBounds.
X
,
System\Windows\Forms\Form.cs (18)
901
bounds.X -= screen.
X
;
907
SetDesktopBounds(value.
X
, value.Y, value.Width, value.Height);
924
loc.X -= screen.
X
;
1673
&& _restoreBounds.
X
== -1
3652
cp.X = Math.Max(clientRect.
X
, clientRect.
X
+ (clientRect.Width - cp.Width) / 2);
3677
cp.X = Math.Max(screenRect.
X
, screenRect.
X
+ (screenRect.Width - cp.Width) / 2);
3861
if (p.X < screenRect.
X
)
3863
p.X = screenRect.
X
;
3865
else if (p.X + s.Width > screenRect.
X
+ screenRect.Width)
3867
p.X = screenRect.
X
+ screenRect.Width - s.Width;
3914
p.X = Math.Max(screenRect.
X
, screenRect.
X
+ (screenRect.Width - Width) / 2);
5010
SetBounds(_restoredWindowBounds.
X
, _restoredWindowBounds.Y,
5324
SetBounds(x + workingArea.
X
, y + workingArea.Y, width, height, BoundsSpecified.All);
5333
Location = new Point(workingArea.
X
+ x, workingArea.Y + y);
6818
mmi->ptMaxPosition.X = maximizedBounds.
X
;
System\Windows\Forms\Input\Cursor.cs (2)
272
imageX = imageRect.
X
;
285
targetX = targetRect.
X
;
System\Windows\Forms\Layout\CommonProperties.cs (1)
290
bool xChangedButNotSpecified = ((specified & BoundsSpecified.X) == BoundsSpecified.None) & x != originalBounds.
X
;
System\Windows\Forms\Layout\Containers\ContainerControl.cs (1)
1419
suggestedRectangle.
X
,
System\Windows\Forms\Layout\Containers\SplitContainer.cs (9)
718
OnSplitterMoved(new SplitterEventArgs(SplitterRectangle.
X
+ SplitterRectangle.Width / 2, SplitterRectangle.Y + SplitterRectangle.Height / 2, SplitterRectangle.
X
, SplitterRectangle.Y));
767
r.X = _splitterRect.
X
- Left;
989
int xSplit = r.
X
;
991
SplitterCancelEventArgs se = new(Left + SplitterRectangle.
X
+ SplitterRectangle.Width / 2, Top + SplitterRectangle.Y + SplitterRectangle.Height / 2, xSplit, ySplit);
1102
int xSplit = r.
X
;
1478
PInvoke.PatBlt(dc, r.
X
, r.Y, r.Width, r.Height, ROP_CODE.PATINVERT);
2285
return new Rectangle(containerRectangle.
X
+ splitterRectangle.
X
, containerRectangle.Y + splitterRectangle.Y, splitterRectangle.Width, splitterRectangle.Height);
System\Windows\Forms\Layout\DefaultLayout.cs (11)
241
int left = layout.Left + displayRect.
X
;
243
int right = layout.Right + displayRect.
X
;
302
if (right < left || cachedBounds.Width != element.Bounds.Width || cachedBounds.
X
!= element.Bounds.
X
)
401
Rectangle newElementBounds = new(remainingBounds.
X
, remainingBounds.Y, elementSize.Width, elementSize.Height);
414
Rectangle newElementBounds = new(remainingBounds.
X
, remainingBounds.Bottom - elementSize.Height, elementSize.Width, elementSize.Height);
427
Rectangle newElementBounds = new(remainingBounds.
X
, remainingBounds.Y, elementSize.Width, elementSize.Height);
458
Rectangle newElementBounds = new(remainingBounds.
X
, remainingBounds.Y, elementSize.Width, elementSize.Height);
754
anchorInfo.Left -= parentDisplayRect.
X
;
756
anchorInfo.Right -= parentDisplayRect.
X
;
879
int x = elementBounds.
X
;
System\Windows\Forms\Layout\FlowLayout.ContainerProxy.cs (3)
67
Point pt = new(value.
X
, value.Y);
137
newBounds.X = DisplayRect.Right - bounds.
X
- bounds.Width + ElementProxy.Margin.Left - ElementProxy.Margin.Right;
145
Point pt = new(newBounds.
X
, newBounds.Y);
System\Windows\Forms\Layout\FlowLayout.cs (16)
71
displayRect.Width = int.MaxValue - displayRect.
X
;
76
Rectangle measureBounds = new(displayRect.
X
, displayRect.Y, displayRect.Width, displayRect.Height - layoutSize.Height);
86
Rectangle rowBounds = new(displayRect.
X
,
252
rowSize.Width = location.X - rowBounds.
X
;
323
Debug.Assert(container.Children[0].Bounds.
X
== margin.Left + container.DisplayRectangle.
X
);
326
Debug.Assert(container.Children[0].Bounds.
X
== container.DisplayRectangle.
X
+ container.DisplayRectangle.Width - container.Children[0].Bounds.Width - margin.Right);
331
Debug.Assert(container.Children[0].Bounds.
X
== margin.Left + container.DisplayRectangle.
X
);
344
Debug.Assert(collection[i].Bounds.
X
>= container.DisplayRectangle.
X
);
348
Debug.Assert(collection[i].Bounds.
X
+ collection[i].Bounds.Width <= container.DisplayRectangle.
X
+ container.DisplayRectangle.Width);
352
Debug.Assert(collection[i].Bounds.
X
>= container.DisplayRectangle.
X
);
System\Windows\Forms\Layout\LayoutUtils.cs (8)
226
if (rect1.
X
<= rect2.
X
&& rect1.
X
+ rect1.Width >= rect2.
X
+ rect2.Width)
232
if (rect2.
X
<= rect1.
X
&& rect2.
X
+ rect2.Width >= rect1.
X
+ rect1.Width)
System\Windows\Forms\Layout\TableLayout.cs (1)
1277
elementBounds.X = cellBounds.
X
+ (cellBounds.Right - elementBounds.Right);
System\Windows\Forms\MDI\MDIClient.cs (2)
195
int sx = (int)Math.Round(bounds.
X
* dx);
197
int sw = (int)Math.Round((bounds.
X
+ bounds.Width) * dx - sx);
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutPanel.cs (9)
366
startx = displayRect.
X
+ (cellBorderWidth / 2);
387
outsideCellBounds.
X
+ (cellBorderWidth + 1) / 2,
433
cellBorderWidth / 2 + displayRect.
X
,
451
tableBounds.
X
,
453
tableBounds.
X
+ tableBounds.Width - 1,
460
tableBounds.
X
+ tableBounds.Width - 1,
462
tableBounds.
X
+ tableBounds.Width - 1,
466
tableBounds.
X
,
468
tableBounds.
X
+ tableBounds.Width - 1,
System\Windows\Forms\Rendering\ControlPaint.cs (123)
123
if (bounds.
X
>= 0)
480
partOfImageToDraw.
X
,
491
new Point(imageRect.
X
- imageRectangle.
X
, imageRect.Y - imageRectangle.Y),
497
partOfImageToDraw.
X
,
625
topLineLefts[i] = bounds.
X
+ leftOffset;
626
topLineRights[i] = bounds.
X
+ bounds.Width - rightOffset - 1;
670
bottomLineLefts[i] = bounds.
X
+ leftOffset;
671
bottomLineRights[i] = bounds.
X
+ bounds.Width - rightOffset - 1;
782
hdc.DrawLine(hpen, bounds.
X
+ i, leftLineTops[i], bounds.
X
+ i, leftLineBottoms[i] + 1);
797
graphics.DrawLine(pen, bounds.
X
+ i, leftLineTops[i], bounds.
X
+ i, leftLineBottoms[i]);
818
hdc.DrawLine(hpen, bounds.
X
+ i, leftLineTops[i], bounds.
X
+ i, leftLineBottoms[i] + 1);
917
bounds.
X
+ bounds.Width - 1 - i,
919
bounds.
X
+ bounds.Width - 1 - i,
937
bounds.
X
+ bounds.Width - 1 - i,
939
bounds.
X
+ bounds.Width - 1 - i,
962
bounds.
X
+ bounds.Width - 1 - i,
964
bounds.
X
+ bounds.Width - 1 - i,
979
rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height,
989
rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height,
998
=> DrawBorder3D(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, style, sides);
1066
graphics.DrawLine(darkPen, bounds.
X
, bounds.Y, bounds.
X
+ bounds.Width - 1, bounds.Y);
1067
graphics.DrawLine(darkPen, bounds.
X
, bounds.Y, bounds.
X
, bounds.Y + bounds.Height - 1);
1073
bounds.
X
, bounds.Y + bounds.Height - 1, bounds.
X
+ bounds.Width - 1, bounds.Y + bounds.Height - 1);
1076
bounds.
X
+ bounds.Width - 1, bounds.Y, bounds.
X
+ bounds.Width - 1, bounds.Y + bounds.Height - 1);
1080
graphics.DrawLine(mediumPen, bounds.
X
+ 1, bounds.Y + 1, bounds.
X
+ bounds.Width - 2, bounds.Y + 1);
1081
graphics.DrawLine(mediumPen, bounds.
X
+ 1, bounds.Y + 1, bounds.
X
+ 1, bounds.Y + bounds.Height - 2);
1089
bounds.
X
+ 1, bounds.Y + bounds.Height - 2, bounds.
X
+ bounds.Width - 2, bounds.Y + bounds.Height - 2);
1092
bounds.
X
+ bounds.Width - 2, bounds.Y + 1, bounds.
X
+ bounds.Width - 2, bounds.Y + bounds.Height - 2);
1105
graphics.DrawLine(lightPen, bounds.
X
, bounds.Y, bounds.
X
+ bounds.Width - 1, bounds.Y);
1106
graphics.DrawLine(lightPen, bounds.
X
, bounds.Y, bounds.
X
, bounds.Y + bounds.Height - 1);
1113
bounds.
X
, bounds.Y + bounds.Height - 1, bounds.
X
+ bounds.Width - 1, bounds.Y + bounds.Height - 1);
1116
bounds.
X
+ bounds.Width - 1, bounds.Y, bounds.
X
+ bounds.Width - 1, bounds.Y + bounds.Height - 1);
1125
graphics.DrawLine(topLeftPen, bounds.
X
+ 1, bounds.Y + 1, bounds.
X
+ bounds.Width - 2, bounds.Y + 1);
1126
graphics.DrawLine(topLeftPen, bounds.
X
+ 1, bounds.Y + 1, bounds.
X
+ 1, bounds.Y + bounds.Height - 2);
1133
bounds.
X
+ 1, bounds.Y + bounds.Height - 2, bounds.
X
+ bounds.Width - 2, bounds.Y + bounds.Height - 2);
1136
bounds.
X
+ bounds.Width - 2, bounds.Y + 1, bounds.
X
+ bounds.Width - 2, bounds.Y + bounds.Height - 2);
1151
bounds = new Rectangle(bounds.
X
, bounds.Y, bounds.Width - 1, bounds.Height - 1);
1180
=> DrawButton(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, state);
1205
rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height,
1228
=> DrawCheckBox(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, state);
1256
=> DrawComboButton(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, state);
1283
graphics.DrawLine(pen, bounds.
X
+ 1, bounds.Y, bounds.Right - 2, bounds.Y);
1284
graphics.DrawLine(pen, bounds.
X
+ 1, bounds.Bottom - 1, bounds.Right - 2, bounds.Bottom - 1);
1285
graphics.DrawLine(pen, bounds.
X
, bounds.Y + 1, bounds.
X
, bounds.Bottom - 2);
1288
int midx = bounds.
X
+ bounds.Width / 2;
1295
graphics.DrawLine(pen, bounds.
X
, midy, bounds.Right - 2, midy);
1302
graphics.DrawLine(pen, bounds.
X
+ 2, midy - 1, bounds.
X
+ 2, midy + 1);
1303
graphics.DrawLine(pen, bounds.
X
+ 3, midy - 2, bounds.
X
+ 3, midy + 2);
1349
rectangle.
X
+ 1,
1390
graphics.DrawRectangle(pen, offsetRectangle.
X
, offsetRectangle.Y, offsetRectangle.Width - 1, offsetRectangle.Height - 1);
1421
GetFocusPen(color, (rectangle.
X
+ rectangle.Y) % 2 == 1, highContrast, blackAndWhite),
1496
rectangle.
X
+ 1,
1675
Point start = new(bounds.
X
+ bounds.Width - 1, bounds.Y - 1);
1676
Point end = new(bounds.
X
+ bounds.Width - 1, bounds.Y + bounds.Height);
1689
graphics.DrawRectangle(pen, rectangle.
X
, rectangle.Y, rectangle.Width - 1, rectangle.Height - 1);
1691
graphics.DrawRectangle(pen, rectangle.
X
, rectangle.Y, rectangle.Width - 1, rectangle.Height - 1);
1695
graphics.DrawRectangle(pen, rectangle.
X
, rectangle.Y, rectangle.Width - 1, rectangle.Height - 1);
1702
=> DrawMenuGlyph(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, glyph);
1715
rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height,
1747
=> DrawMixedCheckBox(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, state);
1764
=> DrawRadioButton(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, state);
1818
PInvoke.Rectangle(desktopDC, rectangle.
X
, rectangle.Y, rectangle.Right, rectangle.Bottom);
1846
=> DrawScrollButton(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, button, state);
1888
=> DrawSizeGrip(graphics, backColor, bounds.
X
, bounds.Y, bounds.Width, bounds.Height);
2053
PInvoke.PatBlt(desktopDC, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, rop3);
2324
int x = bound.
X
;
2368
g.DrawLine(SystemPens.Window, bound.
X
, bound.Y, bound.
X
+ bound.Width - 1, bound.Y);
2369
g.DrawLine(SystemPens.Window, bound.
X
, bound.Y, bound.
X
, bound.Y + bound.Height - 1);
2370
g.DrawLine(SystemPens.ControlDark, bound.
X
+ bound.Width - 1, bound.Y, bound.
X
+ bound.Width - 1, bound.Y + bound.Height - 1);
2371
g.DrawLine(SystemPens.ControlDark, bound.
X
, bound.Y + bound.Height - 1, bound.
X
+ bound.Width - 1, bound.Y + bound.Height - 1);
2378
bound = new Rectangle(bound.
X
+ 1, bound.Y + 1, bound.Width - 1, bound.Height - 1);
2379
g.DrawLine(SystemPens.Window, bound.
X
, bound.Y, bound.
X
+ bound.Width - 1, bound.Y);
2380
g.DrawLine(SystemPens.Window, bound.
X
, bound.Y, bound.
X
, bound.Y + bound.Height - 1);
2382
g.DrawLine(SystemPens.ControlDark, bound.
X
+ bound.Width - 1, bound.Y, bound.
X
+ bound.Width - 1, bound.Y + bound.Height - 1);
2383
g.DrawLine(SystemPens.ControlDark, bound.
X
, bound.Y + bound.Height - 1, bound.
X
+ bound.Width - 1, bound.Y + bound.Height - 1);
2387
g.DrawLine(SystemPens.ControlDark, bound.
X
, bound.Y, bound.
X
+ bound.Width - 1, bound.Y);
2388
g.DrawLine(SystemPens.ControlDark, bound.
X
, bound.Y, bound.
X
, bound.Y + bound.Height - 1);
2389
g.DrawLine(SystemPens.Window, bound.
X
+ bound.Width - 1, bound.Y, bound.
X
+ bound.Width - 1, bound.Y + bound.Height - 1);
2390
g.DrawLine(SystemPens.Window, bound.
X
, bound.Y + bound.Height - 1, bound.
X
+ bound.Width - 1, bound.Y + bound.Height - 1);
2398
bound = new Rectangle(bound.
X
+ 1, bound.Y + 1, bound.Width - 1, bound.Height - 1);
2399
g.DrawLine(SystemPens.ControlDark, bound.
X
, bound.Y, bound.
X
+ bound.Width - 1, bound.Y);
2400
g.DrawLine(SystemPens.ControlDark, bound.
X
, bound.Y, bound.
X
, bound.Y + bound.Height - 1);
2401
g.DrawLine(SystemPens.Window, bound.
X
+ bound.Width - 1, bound.Y, bound.
X
+ bound.Width - 1, bound.Y + bound.Height - 1);
2402
g.DrawLine(SystemPens.Window, bound.
X
, bound.Y + bound.Height - 1, bound.
X
+ bound.Width - 1, bound.Y + bound.Height - 1);
System\Windows\Forms\Rendering\TextExtensions.cs (1)
88
bounds.Width -= bounds.
X
;
System\Windows\Forms\Scrolling\ScrollableControl.cs (29)
124
return new Point(rect.
X
, rect.Y);
197
rect.X = _displayRect.
X
;
461
int ctlRight = -display.
X
+ bounds.
X
+ bounds.Width + _scrollMargin.Width;
560
_displayRect = new Rectangle(_displayRect.
X
, _displayRect.Y, HorizontalScroll.Maximum, _displayRect.Height);
565
_displayRect = new Rectangle(_displayRect.
X
, _displayRect.Y, _displayRect.Width, VerticalScroll.Maximum);
623
SetDisplayRectLocation(_displayRect.
X
, -pos);
633
int pos = -_displayRect.
X
;
778
if (displayRectangle.
X
!= x)
780
xDelta = x - displayRectangle.
X
;
855
int xCalc = _displayRect.
X
;
871
if (bounds.
X
< xMargin)
873
xCalc = _displayRect.
X
+ xMargin - bounds.
X
;
875
else if (bounds.
X
+ bounds.Width + xMargin > client.Width)
877
xCalc = client.Width - (bounds.
X
+ bounds.Width + xMargin - _displayRect.
X
);
879
if (bounds.
X
+ xCalc - _displayRect.
X
< xMargin)
881
xCalc = _displayRect.
X
+ xMargin - bounds.
X
;
999
int x = _displayRect.
X
;
1068
int x = _displayRect.
X
;
1176
else if (-displayRect.
X
>= HorizontalScroll._minimum && -displayRect.
X
< HorizontalScroll._maximum)
1178
HorizontalScroll._value = -displayRect.
X
;
1213
HorizontalScroll.Value = -displayRect.
X
;
1340
SetDisplayRectLocation(_displayRect.
X
, -pos);
1362
int pos = -_displayRect.
X
;
System\Windows\Forms\Scrolling\VScrollProperties.cs (1)
19
private protected override int GetHorizontalDisplayPosition(ScrollableControl parent) => parent.DisplayRectangle.
X
;
System.Windows.Forms.Design (133)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (4)
587
Rectangle res = e.Bounds with { X = e.Bounds.
X
+ offset, Width = e.Bounds.Width - offset };
598
Rectangle baseVar = new(e.Bounds.
X
+ offset, e.Bounds.Y + 1, PaintWidth, e.Bounds.Height - 3);
599
g.DrawRectangle(SystemPens.ControlText, baseVar.
X
, baseVar.Y, baseVar.Width - 1, baseVar.Height - 1);
617
e.Bounds with { X = e.Bounds.
X
+ offset, Width = e.Bounds.Width - offset });
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (2)
351
Math.Max(rectScreen.
X
, editorLocation.X + editorBounds.Right - dropDownSize.Width)); // max = left screen edge clip
375
Math.Max(rectScreen.
X
, editorLocation.X - editorBounds.Width)); // max = left screen edge clip
System\Drawing\Design\ColorEditor.ColorPalette.ColorPaletteAccessibleObject.ColorCellAccessibleObject.cs (1)
36
Point pt = new(rect.
X
, rect.Y);
System\Drawing\Design\ColorEditor.ColorUI.cs (3)
275
_editor.PaintValue(value, graphics, new Rectangle(die.Bounds.
X
+ 2, die.Bounds.Y + 2, 22, die.Bounds.Height - 4));
276
graphics.DrawRectangle(SystemPens.WindowText, new Rectangle(die.Bounds.
X
+ 2, die.Bounds.Y + 2, 22 - 1, die.Bounds.Height - 4 - 1));
278
graphics.DrawString(value.Name, font, foreBrush, die.Bounds.
X
+ 26, die.Bounds.Y);
System\Drawing\Design\CursorEditor.CursorUI.cs (4)
69
e.Graphics.FillRectangle(SystemBrushes.Control, new Rectangle(e.Bounds.
X
+ 2, e.Bounds.Y + 2, 32, e.Bounds.Height - 4));
70
e.Graphics.DrawRectangle(SystemPens.WindowText, new Rectangle(e.Bounds.
X
+ 2, e.Bounds.Y + 2, 32 - 1, e.Bounds.Height - 4 - 1));
72
cursor.DrawStretched(e.Graphics, new Rectangle(e.Bounds.
X
+ 2, e.Bounds.Y + 2, 32, e.Bounds.Height - 4));
73
e.Graphics.DrawString(text, font, brushText, e.Bounds.
X
+ 36, e.Bounds.Y + (e.Bounds.Height - font.Height) / 2);
System\Windows\Forms\Design\AnchorEditor.AnchorUI.cs (1)
271
e.Graphics.DrawRectangle(SystemPens.WindowFrame, rc.
X
, rc.Y, rc.Width - 1, rc.Height - 1);
System\Windows\Forms\Design\Behavior\ContainerSelectorGlyph.cs (1)
26
_glyphBounds = new Rectangle(containerBounds.
X
+ glyphOffset, containerBounds.Y - (int)(glyphSize * .5), glyphSize, glyphSize);
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (2)
695
int minRange = directionOffset.X < 0 ? 0 : currentBounds.
X
;
1100
_dragOffset = new Point(dragBounds.
X
- _dragOffset.X, dragBounds.Y - _dragOffset.Y);
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (3)
816
_graphicsTarget.DrawImage(_dragImage, newImageRect.
X
, newImageRect.Y);
1033
Rectangle controlRect = new(_dragComponents[i].draggedLocation.X - _dragImageRect.
X
,
1045
_originalDragImageLocation = new Point(_dragImageRect.
X
, _dragImageRect.Y);
System\Windows\Forms\Design\Behavior\GrabHandleGlyph.cs (5)
33
bounds = new Rectangle(controlBounds.
X
+ DesignerUtils.s_handleOverlap - DesignerUtils.s_handleSize, controlBounds.Y + DesignerUtils.s_handleOverlap - DesignerUtils.s_handleSize, DesignerUtils.s_handleSize, DesignerUtils.s_handleSize);
48
bounds = new Rectangle(controlBounds.
X
+ DesignerUtils.s_handleOverlap - DesignerUtils.s_handleSize, controlBounds.Bottom - DesignerUtils.s_handleOverlap, DesignerUtils.s_handleSize, DesignerUtils.s_handleSize);
58
bounds = new Rectangle(controlBounds.
X
+ (controlBounds.Width / 2) - (DesignerUtils.s_handleSize / 2), controlBounds.Y + DesignerUtils.s_handleOverlap - DesignerUtils.s_handleSize, DesignerUtils.s_handleSize, DesignerUtils.s_handleSize);
70
bounds = new Rectangle(controlBounds.
X
+ (controlBounds.Width / 2) - (DesignerUtils.s_handleSize / 2), controlBounds.Bottom - DesignerUtils.s_handleOverlap, DesignerUtils.s_handleSize, DesignerUtils.s_handleSize);
82
bounds = new Rectangle(controlBounds.
X
+ DesignerUtils.s_handleOverlap - DesignerUtils.s_handleSize, controlBounds.Y + (controlBounds.Height / 2) - (DesignerUtils.s_handleSize / 2), DesignerUtils.s_handleSize, DesignerUtils.s_handleSize);
System\Windows\Forms\Design\Behavior\LockedHandleGlyph.cs (1)
26
bounds = new Rectangle((controlBounds.
X
+ DesignerUtils.s_lockHandleOverlap) - DesignerUtils.s_lockHandleWidth,
System\Windows\Forms\Design\Behavior\NoResizeHandleGlyph.cs (1)
35
controlBounds.
X
- DesignerUtils.s_noResizeHandleSize,
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (5)
618
Rectangle controlBounds = new(_resizeComponents[0].resizeBounds.
X
, _resizeComponents[0].resizeBounds.Y,
739
bounds.X = Math.Min(baseBounds.Right - minWidth, baseBounds.
X
- xOffset);
779
propLeft.SetValue(_resizeComponents[i].resizeControl, bounds.
X
);
793
control.SetBounds(bounds.
X
, bounds.Y, bounds.Width, bounds.Height, specified);
945
if (propLeft is not null && _resizeComponents[i].resizeControl.Left != _resizeComponents[i].resizeBounds.
X
)
System\Windows\Forms\Design\Behavior\ToolboxItemSnapLineBehavior.cs (1)
351
Rectangle statusRect = new(newRectangle.
X
- adornerServiceOrigin.X, newRectangle.Y - adornerServiceOrigin.Y, 0, 0);
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionGlyph.cs (8)
111
_glyphBounds = new Rectangle(bounds.
X
+ x, bounds.Y + bounds.Height, _imageWidth, _imageHeight);
120
_glyphBounds = new Rectangle(bounds.
X
+ x, bounds.Y - _imageHeight, _imageWidth, _imageHeight);
129
_glyphBounds = new Rectangle(bounds.
X
+ bounds.Width, bounds.Y + y, _imageHeight, _imageWidth);
138
_glyphBounds = new Rectangle(bounds.
X
- _imageHeight, bounds.Y + y, _imageHeight, _imageWidth);
160
_glyphBounds = new Rectangle(bounds.
X
+ x, bounds.Y + bounds.Height, _imageWidth, _imageHeight);
169
_glyphBounds = new Rectangle(bounds.
X
+ x, bounds.Y - _imageHeight, _imageWidth, _imageHeight);
178
_glyphBounds = new Rectangle(bounds.
X
+ bounds.Width, bounds.Y + y, _imageHeight, _imageWidth);
187
_glyphBounds = new Rectangle(bounds.
X
- _imageHeight, bounds.Y + y, _imageHeight, _imageWidth);
System\Windows\Forms\Design\ComponentTray.cs (5)
1832
Point newLoc = new(display.
X
+ _whiteSpace.X, display.Y + _whiteSpace.Y);
1860
Point newLoc = new(bounds.
X
+ bounds.Width + _whiteSpace.X, bounds.Y);
2288
int x = rc.
X
+ (rc.Width - _cxIcon) / 2;
2302
e.Graphics.DrawImage(_toolboxBitmap, new Rectangle(rc.
X
, y, _cxIcon, _cyIcon));
2422
if (Math.Abs(bounds.
X
- x) > parentGridSize.Width || Math.Abs(bounds.Y - y) > parentGridSize.Height)
System\Windows\Forms\Design\ControlDesigner.cs (3)
2253
textRect.X = imageRect.
X
+ imageRect.Width + 2 * marginX;
2255
textRect.Width -= (textRect.
X
+ marginX + penThickness);
2285
e.Graphics.DrawIcon(err, imageRect.
X
, imageRect.Y);
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (4)
984
e.Bounds.
X
+ OWNERDRAWITEMIMAGEBUFFER,
1006
Rectangle focusRectangle = new(bounds.
X
, e.Bounds.Y + 1, textWidth + OWNERDRAWHORIZONTALBUFFER, e.Bounds.Height - 2);
1025
e.Graphics.FillRectangle(backBrush, new Rectangle(bounds.
X
, e.Bounds.Y, e.Bounds.Width - bounds.
X
, e.Bounds.Height));
System\Windows\Forms\Design\DesignerFrame.cs (1)
489
intersectionRegion.Translate(-overlayControlScreenBounds.
X
, -overlayControlScreenBounds.Y);
System\Windows\Forms\Design\DesignerUtils.cs (2)
590
newBounds.X = originalBounds.
X
- originalBounds.Width + e.Offset.X;
599
newBounds.X = originalBounds.
X
- originalBounds.Width - e.Offset.X;
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (3)
240
if (flowDirection == FlowDirection.LeftToRight ? marginBounds.
X
< lastOffset : marginBounds.
X
> lastOffset)
255
lastOffset = marginBounds.
X
;
System\Windows\Forms\Design\GroupBoxDesigner.cs (1)
27
return new Point(gb.DisplayRectangle.
X
, gb.DisplayRectangle.Y);
System\Windows\Forms\Design\OleDragDropHandler.CfCodeToolboxItem.cs (2)
113
defaultValues["Offset"] = new Size(childControl.Bounds.
X
- bounds.
X
, childControl.Bounds.Y - bounds.Y);
System\Windows\Forms\Design\OleDragDropHandler.cs (1)
445
PInvoke.Rectangle(dc, rectangle.
X
, rectangle.Y, rectangle.Right, rectangle.Bottom);
System\Windows\Forms\Design\ParentControlDesigner.cs (18)
576
Point pt = new(bounds.
X
, bounds.Y);
812
CreateToolCore(tool, bounds.
X
, bounds.Y, bounds.Width, bounds.Height, true, true);
1104
if (adjustedRect.
X
< minimumLocation.X)
1121
return new Point(r.
X
, r.Y);
1142
updatedRect.X = originalRect.
X
;
1146
if (dragRect.
X
!= originalRect.
X
)
1148
updatedRect.X = (dragRect.
X
/ gridSize.Width) * gridSize.Width;
1151
if (dragRect.
X
- updatedRect.
X
> halfGrid.X)
1172
updatedRect.Width = ((dragRect.
X
+ dragRect.Width) / gridSize.Width) * gridSize.Width - updatedRect.
X
;
1783
Rectangle frameRect = new(offset.
X
- _adornerWindowToScreenOffset.X,
1975
Rectangle frameRect = new(_mouseDragOffset.
X
- _adornerWindowToScreenOffset.X,
2014
Point offset = new(_mouseDragOffset.
X
, _mouseDragOffset.Y);
2032
Rectangle paintRect = new(Math.Min(displayRect.
X
, clientRect.
X
),
2037
float xlateX = paintRect.
X
;
System\Windows\Forms\Design\SelectionUIHandler.cs (7)
239
if (finalMove && offset is {
X
: 0, Y: 0, Width: 0, Height: 0 })
288
ctlBounds.lastRequestedX += offset.
X
;
323
targetX = oldBounds.
X
;
354
newBounds.X = tempNewBounds.
X
;
372
newBounds.X = tempNewBounds.
X
;
382
bool locChanged = (offset.
X
!= 0 || offset.Y != 0);
421
adjustedLoc.X = newBounds.
X
;
System\Windows\Forms\Design\SelectionUIService.ContainerSelectionUIItem.cs (3)
36
Rectangle rect = new(_outerRect.
X
, _outerRect.Y, CONTAINER_WIDTH, CONTAINER_HEIGHT);
59
Rectangle glyphBounds = new(_outerRect.
X
, _outerRect.Y, CONTAINER_WIDTH, CONTAINER_HEIGHT);
72
Rectangle rect = new(_outerRect.
X
, _outerRect.Y, CONTAINER_WIDTH, CONTAINER_HEIGHT);
System\Windows\Forms\Design\SelectionUIService.cs (2)
692
delta.X -= old.
X
;
696
if (delta.
X
!= 0 || delta.Y != 0 || delta.Width != 0 || delta.Height != 0)
System\Windows\Forms\Design\SelectionUIService.SelectionUIItem.cs (26)
134
Rectangle rect = new(_outerRect.
X
, _outerRect.Y, GRABHANDLE_WIDTH, GRABHANDLE_HEIGHT);
157
rect.X = inner.
X
+ inner.Width;
163
rect.X = outer.
X
;
172
rect.X = outer.
X
;
176
rect.X = inner.
X
+ inner.Width;
247
if (pt.X >= _outerRect.
X
&& pt.X <= _innerRect.
X
)
272
Debug.Assert(!(pt.X >= _outerRect.
X
&& pt.X <= _innerRect.
X
), "Should be handled by left top check");
273
if (pt.X >= _innerRect.
X
+ _innerRect.Width && pt.X <= _outerRect.
X
+ _outerRect.Width)
278
if (pt.X >= _outerRect.
X
+ (_outerRect.Width - GRABHANDLE_WIDTH) / 2
279
&& pt.X <= _outerRect.
X
+ (_outerRect.Width + GRABHANDLE_WIDTH) / 2)
287
if (pt.X >= _innerRect.
X
+ _innerRect.Width && pt.X <= _outerRect.
X
+ _outerRect.Width)
308
Debug.Assert(!(pt.X >= _outerRect.
X
&& pt.X <= _innerRect.
X
), "Should be handled by left bottom check");
310
Debug.Assert(!(pt.X >= _innerRect.
X
+ _innerRect.Width && pt.X <= _outerRect.
X
+ _outerRect.Width), "Should be handled by right bottom check");
312
if (pt.X >= _outerRect.
X
+ (_outerRect.Width - GRABHANDLE_WIDTH) / 2 && pt.X <= _outerRect.
X
+ (_outerRect.Width + GRABHANDLE_WIDTH) / 2)
390
if (pt.X < _outerRect.
X
|| pt.X > _outerRect.
X
+ _outerRect.Width)
400
if (pt.X > _innerRect.
X
401
&& pt.X < _innerRect.
X
+ _innerRect.Width
514
Rectangle rcOuterNew = new(_innerRect.
X
- GRABHANDLE_WIDTH, _innerRect.Y - GRABHANDLE_HEIGHT, _innerRect.Width + 2 * GRABHANDLE_WIDTH, _innerRect.Height + 2 * GRABHANDLE_HEIGHT);
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (4)
975
int offset = bounds.
X
;
980
if (pos.X <= bounds.
X
)
1007
else if (pos.X > bounds.
X
)
1086
int startLoc = isRTL ? bounds.Right : bounds.
X
;
System\Windows\Forms\Design\TabOrder.cs (2)
286
graphics.DrawRectangle(pen, convertedRectangle.
X
, convertedRectangle.Y, convertedRectangle.Width - 1, convertedRectangle.Height - 1);
289
graphics.DrawString(str, font, foreBrush, convertedRectangle.
X
+ 1, convertedRectangle.Y + 1);
System\Windows\Forms\Design\ToolStripDesigner.cs (2)
1808
if (offset.X >= parentToolStrip.Items[0].Bounds.
X
)
1813
else if (offset.X <= parentToolStrip.Items[0].Bounds.
X
)
System\Windows\Forms\Design\ToolStripEditorManager.cs (1)
131
Location = new Point(bounds.
X
, bounds.Y);
System\Windows\Forms\Design\ToolStripTemplateNode.cs (4)
1350
_contextMenu.Show(translatedBounds.
X
, translatedBounds.Y + translatedBounds.Height);
1873
Rectangle drawRect = new(bounds.
X
, bounds.Y, bounds.Width - 1, bounds.Height - 1);
1887
Rectangle drawRect = new(bounds.
X
, bounds.Y, bounds.Width - 1, bounds.Height - 1);
2032
Rectangle drawRect = new(bounds.
X
, bounds.Y, bounds.Width - 1, bounds.Height - 1);
System.Windows.Forms.Primitives (2)
System\Windows\Forms\Automation\UiaTextProvider.cs (2)
92
result[scan++] = rectArray[i].
X
;
110
result[0] = bounds.
X
;
System.Windows.Forms.Primitives.Tests (2)
System\Windows\Forms\Automation\UiaTextRangeTests.cs (2)
716
.Returns((Rectangle rect) => new Rectangle(rect.
X
+ 27, rect.Y + 128, rect.Width, rect.Height));
798
.Returns((Rectangle rect) => new Rectangle(rect.
X
+ 27, rect.Y + 128, rect.Width, rect.Height));
System.Windows.Forms.Tests (128)
System\Windows\Forms\AccessibleObjects\ComboBox.ComboBoxItemAccessibleObjectTests.cs (1)
412
Assert.Equal(expectedPosition.X, actual.
X
);
System\Windows\Forms\AccessibleObjects\Control.ControlAccessibleObjectTests.cs (2)
54
Assert.True(accessibleObject.Bounds.
X
>= 0);
89
Assert.True(accessibleObject.Bounds.
X
>= 0);
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObjectTests.cs (3)
656
int expectedWidth = listViewItem1.SubItems[1].Bounds.
X
- subItem.Bounds.
X
;
665
Rectangle expectedBounds = new(subItem.Bounds.
X
, subItem.Bounds.Y, expectedWidth, expectedHeight)
System\Windows\Forms\AccessibleObjects\TreeView.TreeViewAccessibleObjectTests.cs (1)
249
Point point = new(accessibleObject.Bounds.
X
, accessibleObject.Bounds.Bottom - 1);
System\Windows\Forms\CheckBoxRendererTests.cs (1)
152
? Validate.PolyPolygon16(new(new(bounds.
X
, bounds.Y), new Size(-1, -1)))
System\Windows\Forms\ControlPaintTests.cs (26)
767
ControlPaint.DrawBorder3D(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height);
770
ControlPaint.DrawBorder3D(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height);
779
ControlPaint.DrawBorder3D(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, style);
782
ControlPaint.DrawBorder3D(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, style);
791
ControlPaint.DrawBorder3D(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, style, side);
794
ControlPaint.DrawBorder3D(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, style, side);
839
ControlPaint.DrawButton(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, state);
842
ControlPaint.DrawButton(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, state);
923
ControlPaint.DrawCaptionButton(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, button, state);
926
ControlPaint.DrawCaptionButton(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, button, state);
1003
ControlPaint.DrawCheckBox(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, state);
1006
ControlPaint.DrawCheckBox(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, state);
1084
ControlPaint.DrawComboButton(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, state);
1087
ControlPaint.DrawComboButton(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, state);
1446
ControlPaint.DrawMenuGlyph(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, glyph);
1449
ControlPaint.DrawMenuGlyph(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, glyph);
1458
ControlPaint.DrawMenuGlyph(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, glyph, foreColor, backColor);
1461
ControlPaint.DrawMenuGlyph(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, glyph, foreColor, backColor);
1545
ControlPaint.DrawMixedCheckBox(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, state);
1548
ControlPaint.DrawMixedCheckBox(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, state);
1625
ControlPaint.DrawRadioButton(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, state);
1628
ControlPaint.DrawRadioButton(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, state);
1763
ControlPaint.DrawScrollButton(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, button, state);
1766
ControlPaint.DrawScrollButton(graphics, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height, button, state);
1883
ControlPaint.DrawSizeGrip(graphics, backColor, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height);
1886
ControlPaint.DrawSizeGrip(graphics, backColor, rectangle.
X
, rectangle.Y, rectangle.Width, rectangle.Height);
System\Windows\Forms\ControlTests.Methods.cs (6)
10400
Assert.Equal(0, control.ClientRectangle.
X
);
10404
Assert.Equal(0, control.DisplayRectangle.
X
);
10416
Assert.Equal(0, control.Bounds.
X
);
10433
Assert.Equal(0, control.ClientRectangle.
X
);
10437
Assert.Equal(0, control.DisplayRectangle.
X
);
10449
Assert.Equal(0, control.Bounds.
X
);
System\Windows\Forms\CursorTests.cs (4)
202
Assert.True(Cursor.Clip.
X
>= 0);
266
Assert.True(position.X >= virtualScreen.
X
);
284
Cursor.Position = new Point(virtualScreen.
X
- 1, virtualScreen.Y - 1);
286
Assert.True(position.X >= virtualScreen.
X
);
System\Windows\Forms\DataGridViewCellTests.cs (5)
3228
Assert.Equal(new Rectangle(expected.
X
, expected.Y, expected.Width, expected.Height + 10), cell.BorderWidths(advancedBorderStyle));
3241
Assert.Equal(new Rectangle(expected.
X
, expected.Y, expected.Width + 10, expected.Height), cell.BorderWidths(advancedBorderStyle));
3259
Assert.Equal(new Rectangle(expected.
X
, expected.Y, expected.Width + 10, expected.Height + 11), cell.BorderWidths(advancedBorderStyle));
3280
Assert.Equal(new Rectangle(expected.
X
+ 10, expected.Y, expected.Width, expected.Height + 11), cell.BorderWidths(advancedBorderStyle));
3296
Assert.Equal(new Rectangle(expected.
X
, expected.Y, expected.Width + 10, expected.Height), cell.BorderWidths(advancedBorderStyle));
System\Windows\Forms\Design\ComponentEditorFormTests.cs (2)
76
Assert.Equal(new Rectangle(-SystemInformation.WorkingArea.
X
, -SystemInformation.WorkingArea.Y, control.Width, control.Height), control.DesktopBounds);
77
Assert.Equal(new Point(-SystemInformation.WorkingArea.
X
, -SystemInformation.WorkingArea.Y), control.DesktopLocation);
System\Windows\Forms\FormTests.cs (3)
75
Assert.Equal(new Rectangle(-SystemInformation.WorkingArea.
X
, -SystemInformation.WorkingArea.Y, 300, 300), control.DesktopBounds);
76
Assert.Equal(new Point(-SystemInformation.WorkingArea.
X
, -SystemInformation.WorkingArea.Y), control.DesktopLocation);
78
Assert.Equal(0, control.DisplayRectangle.
X
);
System\Windows\Forms\HScrollBarTests.cs (3)
28
Assert.Equal(0, control.Bounds.
X
);
39
Assert.Equal(0, control.ClientRectangle.
X
);
61
Assert.Equal(0, control.DisplayRectangle.
X
);
System\Windows\Forms\HtmlElementTests.cs (1)
1156
Assert.Equal(element.ScrollLeft, result.
X
);
System\Windows\Forms\ListBoxTests.cs (6)
5331
Assert.True(rect1.
X
>= 0);
5339
Assert.Equal(rect2.
X
, rect1.
X
);
5361
Assert.True(rect1.
X
>= 0);
5372
Assert.Equal(rect2.
X
, rect1.
X
);
System\Windows\Forms\ListViewTests.cs (8)
4090
Assert.True(rect1.
X
>= 0);
4098
Assert.True((rect2.
X
>= rect1.Right && rect2.Y == rect1.Y) || (rect2.
X
== rect1.
X
&& rect2.Y >= rect1.Bottom));
4121
Assert.True(rect1.
X
>= 0);
4132
Assert.True((rect2.
X
>= rect1.Right && rect2.Y == rect1.Y) || (rect2.
X
== rect1.
X
&& rect2.Y >= rect1.Bottom));
System\Windows\Forms\MonthCalendarTests.cs (3)
37
Assert.Equal(0, control.Bounds.
X
);
50
Assert.Equal(0, control.ClientRectangle.
X
);
70
Assert.Equal(0, control.DisplayRectangle.
X
);
System\Windows\Forms\RadioButtonRendererTests.cs (1)
141
? Validate.PolyPolygon16(new(new(bounds.
X
, bounds.Y), new Size(-1, -1)))
System\Windows\Forms\ScreenTests.cs (3)
215
Assert.InRange(screen.WorkingArea.
X
, screen.Bounds.
X
, screen.Bounds.
X
+ screen.Bounds.Width);
System\Windows\Forms\StatusStripTests.Rendering.cs (2)
36
Rectangle bitBltBounds = new(bounds.
X
, 0, bounds.Width - 1, bounds.Height - 1);
37
Rectangle polylineBounds = new(bounds.
X
, 0, bounds.Width - 1, 15);
System\Windows\Forms\SystemInformationTests.cs (1)
801
Assert.True(workingArea.
X
>= 0);
System\Windows\Forms\TabControlTests.cs (12)
743
Assert.True(displayRectangle.
X
>= 0);
745
Assert.Equal(200 - displayRectangle.
X
* 2, control.DisplayRectangle.Width);
764
Assert.True(displayRectangle.
X
>= 0);
766
Assert.Equal(200 - displayRectangle.
X
* 2, control.DisplayRectangle.Width);
783
Assert.True(displayRectangle.
X
>= 0);
785
Assert.Equal(200 - displayRectangle.
X
* 2, control.DisplayRectangle.Width);
3660
Assert.True(rect1.
X
>= 0);
3668
Assert.True(rect2.
X
>= rect1.
X
+ rect1.Width);
3692
Assert.True(rect1.
X
>= 0);
3700
Assert.True(rect2.
X
>= rect1.
X
+ rect1.Width);
System\Windows\Forms\TabPageTests.cs (8)
2217
Assert.Equal(expected.
X
, control.Left);
2218
Assert.Equal(expected.
X
+ expected.Width, control.Right);
2247
Assert.Equal(expected.
X
, control.Left);
2248
Assert.Equal(expected.
X
+ expected.Width, control.Right);
4819
Assert.Equal(expected.
X
, control.Left);
4820
Assert.Equal(expected.
X
+ expected.Width, control.Right);
4849
Assert.Equal(expected.
X
, control.Left);
4850
Assert.Equal(expected.
X
+ expected.Width, control.Right);
System\Windows\Forms\ToolStripButtonTests.cs (4)
1302
Assert.True(e.ImageRectangle.
X
>= 0);
1320
Assert.True(e.TextRectangle.
X
>= 0);
1393
Assert.True(e.ImageRectangle.
X
>= 0);
1411
Assert.True(e.TextRectangle.
X
>= 0);
System\Windows\Forms\ToolStripDropDownTests.cs (2)
136
Assert.Equal(SystemInformation.WorkingArea.
X
+ 2, control.Right);
1931
expected.X = Math.Max(expected.X, SystemInformation.WorkingArea.
X
);
System\Windows\Forms\ToolStripItemTests.cs (10)
7737
Assert.NotNull(owner.GetItemAt(item.Bounds.
X
, item.Bounds.Y));
7738
owner.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, item.Bounds.
X
, item.Bounds.Y, 0));
7775
Assert.NotNull(parent.GetItemAt(item.Bounds.
X
, item.Bounds.Y));
7776
parent.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, item.Bounds.
X
, item.Bounds.Y, 0));
7793
Assert.Same(item, parent.GetItemAt(item.Bounds.
X
, item.Bounds.Y));
7794
parent.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, item.Bounds.
X
, item.Bounds.Y, 0));
14431
Assert.NotNull(owner.GetItemAt(item.Bounds.
X
, item.Bounds.Y));
14432
owner.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, item.Bounds.
X
, item.Bounds.Y, 0));
14520
Assert.NotNull(parent.GetItemAt(item.Bounds.
X
, item.Bounds.Y));
14521
parent.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, item.Bounds.
X
, item.Bounds.Y, 0));
System\Windows\Forms\ToolStripTests.cs (3)
100
Assert.Equal(2, control.GripRectangle.
X
);
254
Assert.Equal(2, control.GripRectangle.
X
);
5831
toolStrip.OnMouseMove(new MouseEventArgs(MouseButtons.Left, 1, item.Bounds.
X
, item.Bounds.Y, 0));
System\Windows\Forms\ToolStripTests.Rendering.cs (1)
33
Rectangle bitBltBounds = new(bounds.
X
, bounds.Y, bounds.Width - 1, bounds.Height - 1);
System\Windows\Forms\TreeNodeCollectionTests.cs (1)
20
Assert.True(treeNode.Bounds.
X
> 0);
System\Windows\Forms\TreeNodeTests.cs (2)
457
Assert.True(bounds.
X
> 0);
479
Assert.True(bounds.
X
> 0);
System\Windows\Forms\VScrollBarTests.cs (3)
27
Assert.Equal(0, control.Bounds.
X
);
38
Assert.Equal(0, control.ClientRectangle.
X
);
60
Assert.Equal(0, control.DisplayRectangle.
X
);
System.Windows.Forms.UI.IntegrationTests (8)
AnchorLayoutTests.cs (4)
223
button.SetBounds(bounds.
X
+ 5, bounds.Y + 5, bounds.Width + 10, bounds.Height + 10, BoundsSpecified.None);
226
button.SetBounds(bounds.
X
+ 5, bounds.Y + 5, bounds.Width + 10, bounds.Height + 10, BoundsSpecified.All);
230
button.SetBounds(bounds.
X
+ 5, bounds.Y + 5, bounds.Width + 10, bounds.Height + 10);
250
Assert.Equal(expectedX, newButtonBounds.
X
);
FormTests.cs (3)
67
Assert.True(form.Left <= screenWorkingArea.
X
);
68
Assert.True(form.Left >= screenWorkingArea.
X
- borderSize);
125
int screenMiddleX = screenWorkingArea.
X
+ (screenWorkingArea.Width / 2);
Infra\ScreenshotService.cs (1)
66
sourceX: primaryScreen.Bounds.
X
,
WinFormsControlsTest (1)
CustomComCtl32Button.cs (1)
97
int x = sender.ClientRectangle.
X
+ 1;