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