562 instantiations of Rectangle
Microsoft.Private.Windows.Core (2)
_generated\206\Windows.Win32.RECT.g.cs (1)
74 public static implicit operator global::System.Drawing.Rectangle(RECT value) => new global::System.Drawing.Rectangle(value.left, value.top, value.Width, value.Height);
System\Private\Windows\Nrbf\SerializationRecordExtensions.cs (1)
128value = new Rectangle(
PresentationFramework-SystemDrawing (1)
SystemDrawingExtension.cs (1)
128new Rectangle(0, 0, imageWidth, imageHeight),
PresentationUI (5)
MS\Internal\Documents\SignatureSummaryDialog.cs (5)
667Rectangle iconRect = new Rectangle( 677Rectangle statusRect = new Rectangle( 685Rectangle intentRect = new Rectangle( 712Rectangle signByRect = new Rectangle( 720Rectangle localeRect = new Rectangle(
System.ComponentModel.TypeConverter (2)
System\Drawing\RectangleConverter.cs (2)
52return new Rectangle(x, y, width, height); 110return new Rectangle((int)x, (int)y, (int)width, (int)height);
System.Drawing.Common (16)
System\Drawing\Bitmap.cs (1)
244Rectangle rectangle = new(0, 0, size.Width, size.Height);
System\Drawing\Drawing2D\GraphicsPath.cs (1)
781AddString(s, family, style, emSize, new Rectangle(origin.X, origin.Y, 0, 0), format);
System\Drawing\Icon.cs (6)
355Draw(graphics, new Rectangle(x, y, size.Width, size.Height)); 635BitmapData bmpdata = bitmap.LockBits(new Rectangle(0, 0, Size.Width, Size.Height), 686bmpData = tmpBitmap.LockBits(new Rectangle(0, 0, tmpBitmap.Width, tmpBitmap.Height), ImageLockMode.ReadOnly, tmpBitmap.PixelFormat); 692targetData = bitmap.LockBits(new Rectangle(0, 0, bmpData.Width, bmpData.Height), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb); 745graphics.DrawImage(tmpBitmap, new Rectangle(0, 0, size.Width, size.Height)); 753Draw(graphics, new Rectangle(0, 0, size.Width, size.Height));
System\Drawing\Imaging\MetafileHeader.cs (1)
48public Rectangle Bounds => new(_header.X, _header.Y, _header.Width, _header.Height);
System\Drawing\Printing\PageSettings.cs (2)
363? new Rectangle(0, 0, size.Height, size.Width) 364: new Rectangle(0, 0, size.Width, size.Height);
System\Drawing\Printing\PreviewPrintController.cs (1)
67new Rectangle(0, 0, metafileSize.Width, metafileSize.Height),
System\Drawing\Printing\PrintController.cs (1)
203Rectangle marginBounds = new(
System\Drawing\Printing\PrinterUnitConvert.cs (1)
46public static Rectangle Convert(Rectangle value, PrinterUnit fromUnit, PrinterUnit toUnit) => new(
System\Drawing\Region.cs (2)
324public bool IsVisible(int x, int y, int width, int height) => IsVisible(new Rectangle(x, y, width, height), null); 328public bool IsVisible(int x, int y, int width, int height, Graphics? g) => IsVisible(new Rectangle(x, y, width, height), g);
System.Drawing.Primitives (6)
System\Drawing\Rectangle.cs (6)
51new Rectangle(left, top, unchecked(right - left), unchecked(bottom - top)); 181return new Rectangle( 196return new Rectangle( 211return new Rectangle( 297return new Rectangle(x1, y1, x2 - x1, y2 - y1); 320return new Rectangle(x1, y1, x2 - x1, y2 - y1);
System.Private.Windows.Core (2)
_generated\209\Windows.Win32.RECT.g.cs (1)
74 public static implicit operator global::System.Drawing.Rectangle(RECT value) => new global::System.Drawing.Rectangle(value.left, value.top, value.Width, value.Height);
System\Private\Windows\Nrbf\SerializationRecordExtensions.cs (1)
128value = new Rectangle(
System.Windows.Forms (398)
System\Windows\Forms\Accessibility\AccessibleObjectExtensions.cs (1)
45return new Rectangle(pxLeft, pyTop, pcxWidth, pcyHeight);
System\Windows\Forms\ActiveX\AxHost.cs (4)
1222SetObjectRects(new Rectangle(x, y, width, height)); 1228SetObjectRects(new Rectangle(x, y, width, height)); 3256Bounds = new Rectangle(location.X, location.Y, ocxExtent.Width, ocxExtent.Height); 3263Bounds = new Rectangle(location.X, location.Y, newSize.Width, newSize.Height);
System\Windows\Forms\Control.cs (10)
1104get => new(_x, _y, _width, _height); 1258public Rectangle ClientRectangle => new Rectangle(0, 0, _clientWidth, _clientHeight); 1737=> new(0, 0, _clientWidth, _clientHeight); 5283Rectangle newBounds = new(suggestedX, suggestedY, 0, 0) 5293return new Rectangle(suggestedX, suggestedY, proposedWidth, proposedHeight); 5426return new Rectangle(sx, sy, sw, sh); 8304Rectangle shift = new(-Left, -Top, parent.Width, parent.Height); 8307Rectangle newClipRect = new( 8817PrintToMetaFileRecursive(hDC, lParam, new Rectangle(Point.Empty, Size)); 8834Rectangle clientBounds = new(clientOffset, ClientSize);
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (1)
662return new Rectangle(-1, -1, 1, 1);
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (5)
333Rectangle left = new(bounds.X, bounds.Y, size, bounds.Height); 334Rectangle right = new(bounds.X + bounds.Width - size, bounds.Y, size, bounds.Height); 335Rectangle top = new(bounds.X + size, bounds.Y, bounds.Width - size * 2, size); 336Rectangle bottom = new(bounds.X + size, bounds.Y + bounds.Height - size, bounds.Width - size * 2, size); 382Rectangle bounds = new(
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.LayoutOptions.cs (2)
280Rectangle textAdjusted = new( 358layout.CheckBounds = new Rectangle(Client.X, Client.Y, checkSizeFull, checkSizeFull);
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxBaseAdapter.cs (1)
307RECT rcCheck = new Rectangle(0, 0, fullSize.Width, fullSize.Height);
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\ButtonDarkModeRendererBase.cs (1)
57Rectangle paddedBounds = new(
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\SystemButtonDarkModeRenderer.cs (3)
54Rectangle focusRect = new( 203Rectangle arcRect = new(bounds.Location, new Size(diameter, diameter)); 248Rectangle arcRect = new(bounds.Right - diameter, bounds.Bottom - diameter, diameter, diameter);
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonBaseAdapter.cs (5)
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)); 152Rectangle vCross = new( 160Rectangle hCross = new(
System\Windows\Forms\Controls\Buttons\CheckBox.cs (1)
322return new Rectangle(-1, -1, 1, 1);
System\Windows\Forms\Controls\Buttons\CheckBoxRenderer.cs (4)
58Rectangle glyphBounds = new(glyphLocation, GetGlyphSize(g, state)); 79Rectangle glyphBounds = new(glyphLocation, GetGlyphSize(hdc, state, hwnd)); 123Rectangle glyphBounds = new(glyphLocation, GetGlyphSize(g, state, hwnd)); 192Rectangle glyphBounds = new(glyphLocation, GetGlyphSize(g, state));
System\Windows\Forms\Controls\Buttons\RadioButton.cs (1)
294return new Rectangle(-1, -1, 1, 1);
System\Windows\Forms\Controls\Buttons\RadioButtonRenderer.cs (4)
60Rectangle glyphBounds = new(glyphLocation, GetGlyphSize(hdc, state, hwnd)); 80glyphBounds = new Rectangle(glyphLocation, GetGlyphSize(hdc, state, hwnd)); 130glyphBounds = new Rectangle(glyphLocation, GetGlyphSize(hdc, state, hwnd)); 219glyphBounds = new Rectangle(glyphLocation, GetGlyphSize(hdc, state, hwnd));
System\Windows\Forms\Controls\ComboBox\ComboBox.FlatComboAdapter.cs (8)
33_outerBorder = new Rectangle(_clientRect.Location, new Size(_clientRect.Width - 1, _clientRect.Height - 1)); 34_innerBorder = new Rectangle(_outerBorder.X + 1, _outerBorder.Y + 1, _outerBorder.Width - dropDownButtonWidth - 2, _outerBorder.Height - 2); 35_innerInnerBorder = new Rectangle(_innerBorder.X + 1, _innerBorder.Y + 1, _innerBorder.Width - 2, _innerBorder.Height - 2); 36_dropDownRect = new Rectangle(_innerBorder.Right + 1, _innerBorder.Y, dropDownButtonWidth, _innerBorder.Height + 1); 97new Rectangle(_outerBorder.X, _outerBorder.Y, _dropDownRect.Width + 1, _outerBorder.Height)); 103new Rectangle(_dropDownRect.X, _outerBorder.Y, _outerBorder.Right - _dropDownRect.X, _outerBorder.Height)); 125new Rectangle(_outerBorder.X, _outerBorder.Y, _dropDownRect.Width + 1, _outerBorder.Height)); 131new Rectangle(_dropDownRect.X, _outerBorder.Y, _outerBorder.Right - _dropDownRect.X, _outerBorder.Height));
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (1)
4071Invalidate(new Rectangle(_layout.Inside.X, _layout.Inside.Y, RowHeadersWidth, ColumnHeadersHeight));
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (26)
2975r = new Rectangle( 2985r = new Rectangle( 3000Rectangle r = new( 3021Rectangle r = new( 5632Rectangle rectInsertionBar = new(0, _layout.ColumnHeaders.Top, InsertionBarWidth, _layout.ColumnHeaders.Height); 8302? new Rectangle(cx - displayWidth, data.Y, displayWidth, data.Height) 8303: new Rectangle(cx, data.Y, displayWidth, data.Height); 9088Rectangle rowRect = new(data.X, cy, data.Width, displayHeight); 10015Invalidate(new Rectangle(data.X, top, data.Width, bottom - top)); 10301_layout.ResizeBoxRect = new Rectangle( 10318_horizScrollBar.Bounds = new Rectangle( 10359_vertScrollBar.Bounds = new Rectangle( 17440right = new Rectangle(oldClientRectangle.X + oldClientRectangle.Width - borderWidth, 17444bottom = new Rectangle(oldClientRectangle.X, 17462right = new Rectangle(newClientRectangle.X + newClientRectangle.Width - borderWidth, 17472bottom = new Rectangle(newClientRectangle.X, 17482right = new Rectangle(oldGridFocusRectangle.X + oldGridFocusRectangle.Width - 1, 17488bottom = new Rectangle(oldGridFocusRectangle.X, 18812Invalidate(new Rectangle(new Point(-pt.X, ColumnHeadersHeight), new Size(-step, ClientSize.Height))); 18822Invalidate(new Rectangle(new Point(ClientSize.Width - (pt.X - rect.Right) - step, ColumnHeadersHeight), 18829Invalidate(new Rectangle(new Point(0, -pt.Y), 18836Invalidate(new Rectangle(new Point(0, ColumnHeadersHeight), 19284Rectangle edge = new(0, 0, bounds.Width, borderWidth); 19314g.DrawRectangle(pen, new Rectangle(0, 0, bounds.Width - 1, bounds.Height - 1)); 19324g.DrawRectangle(pen, new Rectangle(0, 0, bounds.Width - 1, bounds.Height - 1)); 19820Rectangle cellBounds = new(leftEdge, GetRowYFromIndex(_ptCurrentCell.Y),
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (2)
27private static Rectangle s_rectThemeMargins = new(-1, -1, 0, 0); 412Rectangle rectCell = new(0, 0, DATAGRIDVIEWBUTTONCELL_themeMargin, DATAGRIDVIEWBUTTONCELL_themeMargin);
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (6)
825Rectangle rect = new Rectangle 1003cellBounds = new Rectangle(new Point(0, 0), GetSize(rowIndex)); 1011Rectangle bmpRect = new(DataGridView!.RightToLeftInternal ? 3589rectPadding = new Rectangle(bounds.X, bounds.Y, cellStyle.Padding.Right, bounds.Height); 3598rectPadding = new Rectangle(bounds.X, bounds.Y, cellStyle.Padding.Left, bounds.Height); 3852return new Rectangle(xEditingControl, yEditingControl, wEditingControl, hEditingControl);
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (7)
1245new Rectangle(checkBoxX, checkBoxY, checkBoxSize.Width, checkBoxSize.Height), 1249resultBounds = new Rectangle(checkBoxX, checkBoxY, checkBoxSize.Width, checkBoxSize.Height); 1279resultBounds = new Rectangle(checkBoxX, checkBoxY, checkBoxSize.Width, checkBoxSize.Height); 1286Rectangle checkBounds = new(checkBoxX, checkBoxY, checkBoxSize.Width, checkBoxSize.Height); 1344Rectangle fullSize = new(checkBoxX - 1, checkBoxY - 1, checkBoxSize.Width + 3, checkBoxSize.Height + 3); 1355RECT rcCheck = new Rectangle(0, 0, fullSize.Width, fullSize.Height); 1389Rectangle checkBounds = new(checkBoxX, checkBoxY, checkBoxSize.Width - 1, checkBoxSize.Height - 1);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (2)
838DataGridViewColumnHeaderCellRenderer.DrawHeader(gFlip, new Rectangle(0, 0, backgroundBounds.Width, backgroundBounds.Height), state); 840g.DrawImage(bmFlipXPThemes, backgroundBounds, new Rectangle(bmFlipXPThemes.Width - backgroundBounds.Width, 0, backgroundBounds.Width, backgroundBounds.Height), GraphicsUnit.Pixel);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.DataGridViewColumnHeaderCellRenderer.cs (2)
32Rectangle cornerClip = new(bounds.Left, bounds.Bottom - 2, 2, 2); 35cornerClip = new Rectangle(bounds.Right - 2, bounds.Bottom - 2, 2, 2);
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (4)
1980g.DrawRectangle(SystemPens.ControlLightLight, new Rectangle(valBounds.X, valBounds.Y, valBounds.Width - 1, valBounds.Height - 1)); 2010dropRect = new Rectangle( 2018dropRect = new Rectangle( 2027dropRect = new Rectangle(
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (4)
19private static Rectangle s_rectThemeMargins = new(-1, -1, 0, 0); 385Rectangle rectCell = new(0, 0, ThemeMargin, ThemeMargin); 396s_rectThemeMargins = new Rectangle(0, 0, 2, 3); 410s_rectThemeMargins = new Rectangle(2, 1, 0, 2);
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (3)
584imageBounds = new Rectangle(bounds.X, bounds.Y, imgWidth, imgHeight); 591imageBounds = new Rectangle( 600imageBounds = new Rectangle(
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (1)
1039new Rectangle(valBounds.X + 1, valBounds.Y, valBounds.Width, valBounds.Height),
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (3)
704DataGridViewRowHeaderCellRenderer.DrawHeader(gFlip, new Rectangle(0, 0, backgroundBounds.Height, backgroundBounds.Width), state); 710new Rectangle(0, 0, backgroundBounds.Width, backgroundBounds.Height), 1033Rectangle bmpRect = new(width, height, s_iconsWidth, s_iconsHeight);
System\Windows\Forms\Controls\DataGridView\DataGridViewUtilities.cs (1)
346return new Rectangle(GetTextLocation(cellBounds, sizeConstraint, flags, cellStyle), sizeConstraint);
System\Windows\Forms\Controls\GroupBox\GroupBox.cs (3)
163return new Rectangle( 434new Rectangle(0, 0, Width, Height), 445new Rectangle(0, 0, Width, Height),
System\Windows\Forms\Controls\ImageList\ImageList.cs (1)
632targetData = result.LockBits(new Rectangle(0, 0, _imageSize.Width, _imageSize.Height), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
System\Windows\Forms\Controls\Labels\Label.cs (3)
900return new Rectangle(xLoc, yLoc, pointImageSize.Width, pointImageSize.Height); 1355ControlPaint.PrintBorder(g, new Rectangle(Point.Empty, Size), BorderStyle, Border3DStyle.SunkenOuter); 1433Rectangle rectInScreen = RectangleToScreen(new Rectangle(0, 0, Width, Height));
System\Windows\Forms\Controls\Labels\LinkLabel.cs (2)
423return new Rectangle(xLoc, yLoc, width, height); 583Rectangle visualRectangle = new(
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (4)
540Rectangle box = new( 569Rectangle textBounds = new( 628Rectangle stringBounds = new( 721Rectangle emptyRectangle = new(
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (1)
2325Rectangle rect = new(0, 0, Size.Width - 1, Size.Height - 1);
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)
6960Rectangle rect = new(0, 0, Size.Width - 1, Size.Height - 1);
System\Windows\Forms\Controls\ListView\ListViewItem.IKeyboardToolTip.cs (3)
103_ => new Rectangle(point, new Size(itemBounds.Width, itemBounds.Height)), 112return new Rectangle( 131return new Rectangle(point, new Size(Math.Min(textWidth, itemBounds.Width), itemBounds.Height));
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemBaseAccessibleObject.cs (1)
42: new Rectangle(
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemListAccessibleObject.cs (1)
20: new Rectangle(
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObject.cs (1)
63return new Rectangle(
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (7)
2612Rectangle toolStripBounds = new(0, 1, toolStripWidth, toolStripHeight); 2828Invalidate(new Rectangle(0, me.Y - s_cyDivider, Size.Width, me.Y + s_cyDivider)); 2831_gridView.Invalidate(new Rectangle(0, _gridView.Size.Height - s_cyDivider, Size.Width, s_cyDivider)); 2890pevent.Graphics.FillRectangle(backgroundBrush, new Rectangle(0, 0, width, psheetLoc.Y)); 2899new Rectangle(0, yLast, width, _commandsPane.Location.Y - yLast)); 2908new Rectangle(0, yLast, width, _helpPane.Location.Y - yLast)); 2913pevent.Graphics.FillRectangle(backgroundBrush, new Rectangle(0, yLast, width, Size.Height - yLast));
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CategoryGridEntry.cs (1)
121Rectangle focusRect = new(indent, rect.Y, labelWidth + 3, rect.Height - 1);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CommandsPane.cs (1)
62return new Rectangle(4, 4, size.Width - 8, size.Height - 8);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\DropDownButton.cs (2)
117new Rectangle(0, 0, Width, Height), 133Rectangle dropDownButtonRect = new(0, 0, Width, Height);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (6)
651_outlineRect = new Rectangle( 1568Rectangle textRect = new(stringX, rect.Y + 1, maxSpace, rect.Height - 1); 1710compatibleDC.HDC.FillRectangle(new Rectangle(0, 0, rectangle.Width, rectangle.Height), brush); 1711explorerTreeRenderer.DrawBackground(compatibleDC, new Rectangle(0, 0, rectangle.Width, rectangle.Height), hwnd); 1836Rectangle rectPaint = new( 1896Rectangle textRectangle = new(
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\HelpPane.cs (1)
124Invalidate(new Rectangle(
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyDescriptorGridEntry.cs (1)
536_uiItemRects[i] = new Rectangle(
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (9)
642return new Rectangle(pt.X, pt.Y, rect.Width, rect.Height); 1904Rectangle rect = new(0, 0, 0, 0); 2144Invalidate(new Rectangle(left, 0, Size.Width - left, Size.Height)); 2236DrawFocusRectangle(g, new Rectangle(_offset2Units, _offset2Units, Size.Width - doubleOffset, Size.Height - doubleOffset)); 2382Rectangle clearRect = new(1, 1, Size.Width - 2, Size.Height - 2); 3388Rectangle clearRect = new(1, yPosition, Size.Width - 2, Size.Height - yPosition - 1); 3621Rectangle rectInvalidate = new(_lastClientRect.Width - 1, 0, newRect.Width - _lastClientRect.Width + 1, _lastClientRect.Height); 3627Rectangle rectInvalidate = new(0, _lastClientRect.Height - 1, _lastClientRect.Width, newRect.Height - _lastClientRect.Height + 1); 4360Rectangle rectTarget = new(
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (3)
364Rectangle bottomGrip = new(0, Height - s_resizeGripSize, s_resizeGripSize, s_resizeGripSize); 365Rectangle topGrip = new(0, 0, s_resizeGripSize, s_resizeGripSize); 510Rectangle lRect = new(0, _resizeUp ? 0 : Height - s_resizeGripSize, s_resizeGripSize, s_resizeGripSize);
System\Windows\Forms\Controls\TabControl\TabPage.cs (1)
620Rectangle rectWithBorder = new(
System\Windows\Forms\Controls\TextBox\MaskedTextBox.cs (1)
2890Rectangle rect = new(0, 0, Size.Width - 1, Size.Height - 1);
System\Windows\Forms\Controls\TextBox\TextBox.cs (1)
807Rectangle rect = new(0, 0, Size.Width - 1, Size.Height - 1);
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (2)
221? new Rectangle( 226: new Rectangle(
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (3)
3873Rectangle comparisonRect = new(point, s_onePixel); 4070item.SetBounds(new Rectangle(location, item.Size)); 4510cursorLocation = WindowsFormsUtils.ConstrainToScreenBounds(new Rectangle(cursorLocation, s_onePixel)).Location;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (4)
992Rectangle suggestedScreenBounds = new(screenPoint, suggestedBounds.Size); 1003dropDownBounds = new Rectangle(parentClientPoint, suggestedBounds.Size); 1020Rectangle dropDownBounds = new(Point.Empty, GetSuggestedSize()); 1522Rectangle bounds = new(x, y, width, height);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownButton.ToolStripDropDownButtonInternalLayout.cs (3)
66_dropDownArrowRect = new Rectangle(_dropDownArrowPadding.Left, 0, s_dropDownArrowSize.Width, _ownerItem.Bounds.Height); 71_dropDownArrowRect = new Rectangle(options.Client.Right, 0, s_dropDownArrowSize.Width, _ownerItem.Bounds.Height); 82_dropDownArrowRect = new Rectangle(0, options.Client.Bottom + _dropDownArrowPadding.Top, _ownerItem.Bounds.Width - 1, s_dropDownArrowSize.Height);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownItem.cs (3)
141Rectangle ownerItemBounds = new(TranslatePoint(Point.Empty, ToolStripPointType.ToolStripItemCoords, ToolStripPointType.ScreenCoords), Size); 379Rectangle dropDownBounds = new(Point.Empty, DropDown.GetSuggestedSize()); 384Rectangle itemScreenBounds = new(TranslatePoint(Point.Empty, ToolStripPointType.ToolStripItemCoords, ToolStripPointType.ScreenCoords), Size);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (10)
364_checkRectangle = LayoutUtils.Align(maxCheckSize, new Rectangle(nextPoint.X, nextPoint.Y, maxCheckSize.Width, _maxItemSize.Height), ContentAlignment.MiddleCenter); 369_imageRectangle = LayoutUtils.Align(maxImageSize, new Rectangle(nextPoint.X, nextPoint.Y, maxImageSize.Width, _maxItemSize.Height), ContentAlignment.MiddleCenter); 380_checkRectangle = LayoutUtils.Align(maxCheckSize, new Rectangle(nextPoint.X, nextPoint.Y, checkAndImageMarginWidth, _maxItemSize.Height), ContentAlignment.MiddleCenter); 399_checkRectangle = LayoutUtils.Align(LayoutUtils.UnionSizes(maxCheckSize, maxImageSize), new Rectangle(nextPoint.X, nextPoint.Y, checkAndImageMarginWidth - 1, _maxItemSize.Height), ContentAlignment.MiddleCenter); 416_imageMarginBounds = new Rectangle(0, 0, checkAndImageMarginWidth, Height); 421_textRectangle = new Rectangle(nextPoint, maxTextSize); 426_arrowRectangle = new Rectangle(nextPoint, maxArrowSize); 456_textRectangle.Y = LayoutUtils.VAlign(_textRectangle.Size, new Rectangle(Point.Empty, _maxItemSize), ContentAlignment.MiddleCenter).Y; 826UpScrollButton.SetBounds(new Rectangle(upLocation, upSize)); 832DownScrollButton.SetBounds(new Rectangle(downLocation, downSize));
System\Windows\Forms\Controls\ToolStrips\ToolStripHighContrastRenderer.cs (15)
74new Rectangle(startX, startY, 2, 2) : 75new Rectangle(startY, startX, 2, 2); 100e.Graphics.DrawRectangle(SystemPens.ButtonHighlight, new Rectangle(0, 0, e.Item.Width - 1, e.Item.Height - 1)); 135Rectangle bounds = new(Point.Empty, e.Item.Size); 187Rectangle bounds = new(Point.Empty, menuItem.Size); 208DrawArrow(new ToolStripArrowRenderEventArgs(g, item, new Rectangle(Point.Empty, item.Size), arrowColor, ArrowDirection.Down)); 258Rectangle bounds = new(Point.Empty, e.ToolStrip.Size); 287Rectangle bounds = new(Point.Empty, e.ToolStrip.Size); 314g.FillRectangle(SystemBrushes.ButtonShadow, new Rectangle(1, 1, 1, 1)); 319g.FillRectangle(SystemBrushes.ButtonShadow, new Rectangle(bounds.Width - 2, 1, 1, 1)); 326g.FillRectangle(SystemBrushes.ButtonShadow, new Rectangle(1, bounds.Height - 2, 1, 1)); 333g.FillRectangle(SystemBrushes.ButtonShadow, new Rectangle(bounds.Width - 2, bounds.Height - 2, 1, 1)); 350Rectangle bounds = new(Point.Empty, e.Item.Size); 410Rectangle bounds = new(Point.Empty, e.Item.Size); 442Rectangle bounds = new(Point.Empty, e.Item.Size);
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (2)
2378ParentInternal?.Invalidate(new Rectangle(rectangleLocation, r.Size), true); 3256=> SetBounds(new Rectangle(x, y, width, height));
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.ToolStripItemAccessibleObject.cs (1)
304return new Rectangle(Owner.ParentInternal.PointToScreen(bounds.Location), bounds.Size);
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.ToolStripItemInternalLayout.cs (1)
99Rectangle bounds = new(Point.Empty, _ownerItem.Size);
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (1)
711ControlPaint.DrawCaptionButton(g, new Rectangle(Point.Empty, image.Size), (CaptionButton)buttonToUse, ButtonState.Flat);
System\Windows\Forms\Controls\ToolStrips\ToolStripProfessionalLowResolutionRenderer.cs (5)
53Rectangle bounds = new(Point.Empty, e.ToolStrip.Size); 79g.FillRectangle(SystemBrushes.ButtonShadow, new Rectangle(1, 1, 1, 1)); 84g.FillRectangle(SystemBrushes.ButtonShadow, new Rectangle(bounds.Width - 2, 1, 1, 1)); 91g.FillRectangle(SystemBrushes.ButtonShadow, new Rectangle(1, bounds.Height - 2, 1, 1)); 98g.FillRectangle(SystemBrushes.ButtonShadow, new Rectangle(bounds.Width - 2, bounds.Height - 2, 1, 1));
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (43)
168overflowArrowRect = new Rectangle(0, item.Height - _overflowArrowOffsetY, _overflowArrowWidth, _overflowArrowHeight); 172overflowArrowRect = new Rectangle(item.Width - _overflowButtonWidth, item.Height - _overflowArrowOffsetY, _overflowArrowWidth, _overflowArrowHeight); 230Rectangle bounds = new(Point.Empty, item.Size); 248RenderSeparatorInternal(e.Graphics, e.Item, new Rectangle(Point.Empty, e.Item.Size), e.Vertical); 266Rectangle bounds = new(Point.Empty, item.Size); 321ControlPaint.DrawBorder3D(e.Graphics, new Rectangle(0, 0, item.Width, item.Height), item.BorderStyle, (Border3DSide)item.BorderSides); 346Rectangle bounds = new(Point.Empty, item?.Size ?? Size.Empty); 416Rectangle bounds = new(Point.Empty, toolStrip.Size); 456edging = new Rectangle(bounds.Width - 1, 3, 1, bounds.Height - 3); 460edging = new Rectangle(3, bounds.Height - 1, bounds.Width - 3, bounds.Height - 1); 504new Rectangle(startX, startY, 2, 2) : 505new Rectangle(startY, startX, 2, 2); 545Rectangle bounds = new(Point.Empty, item.Size); 768e.Graphics.DrawImage(image, imageRect, new Rectangle(Point.Empty, imageRect.Size), GraphicsUnit.Pixel); 845Rectangle bounds = new(Point.Empty, toolStrip.Size); 859Rectangle topLeftParentHorizontalPixels = new(topLeft, s_onePix); 860Rectangle bottomLeftParentHorizontalPixels = new(bottomLeft, new Size(2, 1)); 861Rectangle bottomLeftParentVerticalPixels = new(bottomLeft.X, bottomLeft.Y - 1, 1, 2); 864Rectangle bottomRightHorizontalPixels = new(bottomRight.X - 1, bottomRight.Y, 2, 1); 865Rectangle bottomRightVerticalPixels = new(bottomRight.X, bottomRight.Y - 1, 1, 2); 872topRightHorizontalPixels = new Rectangle(topRight.X - 1, topRight.Y, 1, 1); 873topRightVerticalPixels = new Rectangle(topRight.X, topRight.Y, 1, 2); 877topRightHorizontalPixels = new Rectangle(topRight.X - 2, topRight.Y, 2, 1); 878topRightVerticalPixels = new Rectangle(topRight.X, topRight.Y, 1, 3); 1045? new Rectangle( 1049: new Rectangle(e.ImageRectangle.Left - 2, 1, e.ImageRectangle.Width + 4, e.Item.Height - 2); 1107Rectangle bounds = new(Point.Empty, item.Size); 1133g.FillRectangle(brush, new Rectangle(Point.Empty, control.Size)); 1140Rectangle gradientBounds = new(Point.Empty, parent.Size); 1149g.FillRectangle(b, new Rectangle(Point.Empty, control.Size)); 1154Rectangle gradientBounds = new(Point.Empty, control.Size); 1173Rectangle bounds = new(Point.Empty, e.ToolStrip.Size); 1182Rectangle bounds = new(Point.Empty, e.ToolStrip.Size); 1194Rectangle bounds = new(Point.Empty, toolStripDropDown.Size); 1216Rectangle overflowBoundsFill = new(Point.Empty, e.Item.Size); 1320Rectangle fillRect = new(overflowBoundsFill.X - 1, 0, 1, 1); 1337Rectangle bounds = new(Point.Empty, e.ToolStrip.Size); 1353Rectangle topLeftShadowRect = new(topLeft, s_onePix); 1357Rectangle topLeftShadowRect2 = new(topLeft, s_onePix); 1361Rectangle topRightShadowRect = new(topRight, s_onePix); 1391g.FillRectangle(brush, new Rectangle(gradientCopyPixel, s_onePix)); 1395Rectangle otherBottom = new(bottomLeft.X, bottomLeft.Y - 2, 1, 1); 1566Rectangle bounds = new(Point.Empty, item.Size);
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (14)
827e.Graphics.DrawImage(image, imageRect, new Rectangle(Point.Empty, imageRect.Size), GraphicsUnit.Pixel); 929bounds: new Rectangle(Point.Empty, textSize), 1008new(12, 0, 2, 2), 1009new(8, 4, 2, 2), 1010new(4, 8, 2, 2), 1011new(0, 12, 2, 2), 1012new(8, 0, 2, 2), 1013new(4, 4, 2, 2), 1014new(0, 8, 2, 2), 1015new(4, 0, 2, 2), 1016new(0, 4, 2, 2), 1017new(1, 1, 2, 2), 1096Rectangle dotRect = new( 1176destRect: new Rectangle(0, 0, size.Width, size.Height),
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderEventArgs.cs (3)
16: this(g, toolStrip, new Rectangle(Point.Empty, toolStrip.OrThrowIfNull().Size), Color.Empty) 109Rectangle itemBounds = new(ToolStrip.PointToClient(ownerItem.TranslatePoint(Point.Empty, ToolStripPointType.ToolStripItemCoords, ToolStripPointType.ScreenCoords)), ownerItem.Size); 125return new Rectangle(itemBounds.X + 1, 0, itemBounds.Width - 2, 2);
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.cs (4)
301Rectangle dropDownButtonBounds = new(Point.Empty, new Size(Math.Min(Width, DropDownButtonWidth), Height)); 307Rectangle splitButtonButtonBounds = new(Point.Empty, new Size(splitButtonButtonWidth, splitButtonButtonHeight)); 316_splitterBounds = new Rectangle(splitButtonButtonBounds.Right, splitButtonButtonBounds.Top, _splitterWidth, splitButtonButtonBounds.Height); 322_splitterBounds = new Rectangle(dropDownButtonBounds.Right, dropDownButtonBounds.Top, _splitterWidth, dropDownButtonBounds.Height);
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackDragDropHandler.cs (4)
143insertionRect = new Rectangle(_owner.Margin.Left, item.Bounds.Top, _owner.Width - (_owner.Margin.Horizontal) - 1, ToolStrip.s_insertionBeamWidth); 146insertionRect = new Rectangle(_owner.Margin.Left, item.Bounds.Bottom, _owner.Width - (_owner.Margin.Horizontal) - 1, ToolStrip.s_insertionBeamWidth); 149insertionRect = new Rectangle(item.Bounds.Right, _owner.Margin.Top, ToolStrip.s_insertionBeamWidth, _owner.Height - (_owner.Margin.Vertical) - 1); 152insertionRect = new Rectangle(item.Bounds.Left, _owner.Margin.Top, ToolStrip.s_insertionBeamWidth, _owner.Height - (_owner.Margin.Vertical) - 1);
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackLayout.cs (10)
301alignedRightItems = (alignedRightItems == Rectangle.Empty) ? new Rectangle(x, y, itemSize.Width, itemSize.Height) 302: Rectangle.Union(alignedRightItems, new Rectangle(x, y, itemSize.Width, itemSize.Height)); 314alignedLeftItems = (alignedLeftItems == Rectangle.Empty) ? new Rectangle(x, y, itemSize.Width, itemSize.Height) 315: Rectangle.Union(alignedLeftItems, new Rectangle(x, y, itemSize.Width, itemSize.Height)); 438alignedRightItems = (alignedRightItems == Rectangle.Empty) ? new Rectangle(x, y, itemSize.Width, itemSize.Height) 439: Rectangle.Union(alignedRightItems, new Rectangle(x, y, itemSize.Width, itemSize.Height)); 446alignedLeftItems = (alignedLeftItems == Rectangle.Empty) ? new Rectangle(x, y, itemSize.Width, itemSize.Height) 447: Rectangle.Union(alignedLeftItems, new Rectangle(x, y, itemSize.Width, itemSize.Height)); 495Rectangle itemBounds = new(itemLocation, itemSize); 517item.SetBounds(new Rectangle(itemLocation, itemSize));
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemDarkModeRenderer.cs (4)
228Rectangle bounds = new(Point.Empty, e.Item.Size); 274Rectangle bounds = new(Point.Empty, e.Item.Size); 321Rectangle bounds = new(Point.Empty, e.Item.Size); 429Rectangle bounds = new(Point.Empty, e.Item.Size);
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemRenderer.cs (11)
331Rectangle bounds = new(Point.Empty, e.GripBounds.Size); 441vsRenderer.DrawBackground(g, new Rectangle(Point.Empty, item.Size)); 447DrawArrow(new ToolStripArrowRenderEventArgs(g, item, new Rectangle(Point.Empty, item.Size), arrowColor, ArrowDirection.Down)); 474Rectangle bounds = new(Point.Empty, item.Size); 497Rectangle fillRect = new(Point.Empty, item.Size); 543RenderSeparatorInternal(e.Graphics, e.Item, new Rectangle(Point.Empty, e.Item.Size), e.Vertical); 552ControlPaint.DrawBorder3D(e.Graphics, new Rectangle(0, 0, item.Width - 1, item.Height - 1), item.BorderStyle, (Border3DSide)item.BorderSides); 655Rectangle bounds = new(Point.Empty, splitButton.Size); 715vsRenderer.DrawBackground(g, new Rectangle(Point.Empty, item.Size)); 727RenderSmall3DBorderInternal(g, new Rectangle(Point.Empty, item.Size), state, (item.RightToLeft == RightToLeft.Yes)); 835vsRenderer.DrawBackground(e.Graphics, new Rectangle(0, 0, e.ToolStrip.Width - 1, e.ToolStrip.Height - 1));
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); 130t_visualStyleRenderer.DrawEdge(g, new Rectangle((int)Math.Round(x), bounds.Y, LineWidth, bounds.Height), Edges.Left, edgeStyle, EdgeEffects.None); 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)
2817bounds = new Rectangle(textLoc, new Size(textSize.Width, bounds.Height)); 3138Rectangle rect = new(0, 0, Size.Width - 1, Size.Height - 1);
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (6)
529Rectangle clipLeft = new(bounds.Left, bounds.Top, border, bounds.Height); 530Rectangle clipTop = new(bounds.Left, bounds.Top, bounds.Width, border); 531Rectangle clipRight = new(bounds.Right - border, bounds.Top, border, bounds.Height); 532Rectangle clipBottom = new(bounds.Left, bounds.Bottom - border, bounds.Width, border); 835Rectangle clientArea = new(Point.Empty, ClientSize); 860upDownButtonsBounds = new Rectangle(
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.cs (4)
281new Rectangle(0, 0, _parent._defaultButtonsWidth, half_height), 291new Rectangle(0, half_height, _parent._defaultButtonsWidth, half_height), 321new Rectangle(0, 0, _parent._defaultButtonsWidth, half_height), 341new Rectangle(0, half_height, _parent._defaultButtonsWidth, half_height),
System\Windows\Forms\Controls\WebBrowser\HtmlElement.cs (3)
112return new(clientLeft, clientTop, clientWidth, clientHeight); 317return new(offsetLeft, offsetTop, offsetWidth, offsetHeight); 416return new(scrollLeft, scrollTop, scrollWidth, scrollHeight);
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (2)
201RECT posRect = new Rectangle(0, 0, width, height); 785Bounds = new Rectangle(location.X, location.Y, extent.Width, extent.Height);
System\Windows\Forms\Controls\WebBrowser\WebBrowserHelper.cs (1)
109internal static RECT GetClipRect() => new Rectangle(0, 0, 32000, 32000);
System\Windows\Forms\Design\ComponentEditorForm.cs (4)
235Rectangle pageHostBounds = new(2 * BUTTON_PAD + selectorWidth, 2 * BUTTON_PAD + STRIP_HEIGHT, 238grayStrip.Bounds = new Rectangle(pageHostBounds.X, BUTTON_PAD, 243Rectangle pageBounds = new(0, 0, pageHostBounds.Width, pageHostBounds.Height); 258_selector.Bounds = new Rectangle(BUTTON_PAD, BUTTON_PAD,
System\Windows\Forms\ErrorProvider\ErrorProvider.ControlItem.cs (1)
241return new Rectangle(x, y, size.Width, size.Height);
System\Windows\Forms\ErrorProvider\ErrorProvider.ErrorWindow.cs (1)
310using Region windowRegion = new(new Rectangle(0, 0, 0, 0));
System\Windows\Forms\ErrorProvider\ErrorProvider.IconRegion.cs (3)
40_region = new Region(new Rectangle(0, 0, 0, 0)); 66_region.Union(new Rectangle(x, y, 1, 1)); 72_region.Intersect(new Rectangle(0, 0, size.Width, size.Height));
System\Windows\Forms\Form.cs (5)
151private Rectangle _restoredWindowBounds = new(-1, -1, -1, -1); 158private Rectangle _restoreBounds = new(-1, -1, -1, -1); 4259form.SetBounds(new Rectangle(Left, Top, adjustedSize.Width, adjustedSize.Height), BoundsSpecified.None); 4451new Rectangle(size.Width - SizeGripSize, size.Height - SizeGripSize, SizeGripSize, SizeGripSize)); 5089_restoredWindowBounds = new Rectangle(-1, -1, -1, -1);
System\Windows\Forms\Layout\CommonProperties.cs (1)
336Rectangle bounds = new(x, y, width, height);
System\Windows\Forms\Layout\Containers\ContainerControl.cs (1)
691return new Rectangle(topLeftPoint.X, topLeftPoint.Y, clientRectangle.right, clientRectangle.bottom);
System\Windows\Forms\Layout\Containers\SplitContainer.cs (1)
2285return new Rectangle(containerRectangle.X + splitterRectangle.X, containerRectangle.Y + splitterRectangle.Y, splitterRectangle.Width, splitterRectangle.Height);
System\Windows\Forms\Layout\DefaultLayout.cs (8)
98Rectangle newBounds = new(location, newSize); 233return new Rectangle(anchorInfo.Left, anchorInfo.Top, width, height); 335return new Rectangle(left, top, right - left, bottom - top); 405Rectangle newElementBounds = new(remainingBounds.X, remainingBounds.Y, elementSize.Width, elementSize.Height); 418Rectangle newElementBounds = new(remainingBounds.X, remainingBounds.Bottom - elementSize.Height, elementSize.Width, elementSize.Height); 431Rectangle newElementBounds = new(remainingBounds.X, remainingBounds.Y, elementSize.Width, elementSize.Height); 444Rectangle newElementBounds = new(remainingBounds.Right - elementSize.Width, remainingBounds.Y, elementSize.Width, elementSize.Height); 462Rectangle newElementBounds = new(remainingBounds.X, remainingBounds.Y, elementSize.Width, elementSize.Height);
System\Windows\Forms\Layout\FlowLayout.cs (4)
25Rectangle measureBounds = new(new Point(0, 0), proposedConstraints); 76Rectangle measureBounds = new(displayRect.X, displayRect.Y, displayRect.Width, displayRect.Height - layoutSize.Height); 86Rectangle rowBounds = new(displayRect.X, 226Rectangle cellBounds = new(location, new Size(requiredSize.Width, rowBounds.Height));
System\Windows\Forms\Layout\LayoutUtils.cs (1)
16public static readonly Rectangle s_maxRectangle = new(0, 0, int.MaxValue, int.MaxValue);
System\Windows\Forms\Layout\TableLayout.cs (3)
1250Rectangle cellBounds = new((int)(startX + cellBorderWidth / 2.0f), (int)(top + cellBorderWidth / 2.0f), width - cellBorderWidth, height - cellBorderWidth); 1475Rectangle cellsOccupied1 = new(layoutInfo1.ColumnStart, layoutInfo1.RowStart, layoutInfo1.ColumnSpan, layoutInfo1.RowSpan); 1480Rectangle cellsOccupied2 = new(layoutInfo2.ColumnStart, layoutInfo2.RowStart, layoutInfo2.ColumnSpan, layoutInfo2.RowSpan);
System\Windows\Forms\Panels\Panel.cs (1)
230ControlPaint.PrintBorder(g, new Rectangle(Point.Empty, Size), BorderStyle, Border3DStyle.Sunken);
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutPanel.cs (3)
380Rectangle outsideCellBounds = new( 386Rectangle insideCellBounds = new( 432Rectangle tableBounds = new(
System\Windows\Forms\Printing\PrintPreviewControl.cs (3)
462private Rectangle FocusRectangle => new(0, 0, Width - 1, Height - 1); 464private Rectangle ResizeBoxRectangle => new(_vScrollBar.Left, _hScrollBar.Top, _vScrollBar.Width, _hScrollBar.Height); 672pageRenderArea[imageIndex - StartPage] = new Rectangle(x, y, imagePixels.Width, imagePixels.Height);
System\Windows\Forms\Printing\PrintPreviewDialog.cs (1)
1143Rectangle rect = new(0, 0, item.Bounds.Width - 1, item.Bounds.Height - 1);
System\Windows\Forms\Rendering\ControlPaint.cs (14)
293new Rectangle(0, 0, width, height), 508Rectangle partOfImageToDraw = new(Point.Empty, imageRect.Size); 522Rectangle partOfImageToDraw = new( 1062RECT rc = new Rectangle(x, y, width, height); 1183bounds = new Rectangle(bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 1270DrawFlatCheckBox(graphics, new Rectangle(x, y, width, height), state); 1380Rectangle offsetRectangle = new( 1497new Rectangle(x, y, width, height), 1523Rectangle fillRect = new( 1619=> DrawImageDisabled(graphics, image, new Rectangle(x, y, image.Width, image.Height), unscaledImage: false); 1666new Rectangle(0, 0, imageSize.Width, imageSize.Height), 1892Rectangle bounds = new(x, y, width, height); 2432bound = new Rectangle(bound.X + 1, bound.Y + 1, bound.Width - 1, bound.Height - 1); 2452bound = new Rectangle(bound.X + 1, bound.Y + 1, bound.Width - 1, bound.Height - 1);
System\Windows\Forms\Rendering\TextRenderer.cs (1)
287=> DrawTextInternal(dc, text, font, new Rectangle(pt, MaxSize), foreColor, backColor, flags);
System\Windows\Forms\Scrolling\ScrollableControl.cs (2)
552_displayRect = new Rectangle(_displayRect.X, _displayRect.Y, HorizontalScroll.Maximum, _displayRect.Height); 557_displayRect = new Rectangle(_displayRect.X, _displayRect.Y, _displayRect.Width, VerticalScroll.Maximum);
System\Windows\Forms\SystemInformation.cs (2)
455return new(PInvokeCore.GetSystemMetrics(SM_XVIRTUALSCREEN), 462return new Rectangle(0, 0, size.Width, size.Height);
System\Windows\Forms\ToolTip\ToolTip.cs (4)
1555new Rectangle(centeredX, toolRectangle.Top - height, width, height), 1556new Rectangle(toolRectangle.Right, centeredY, width, height), 1557new Rectangle(centeredX, toolRectangle.Bottom, width, height), 1558new Rectangle(toolRectangle.Left - width, centeredY, width, height),
System.Windows.Forms.Design (127)
System\ComponentModel\Design\ByteViewer.cs (2)
144new Rectangle( 154new Rectangle(
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (1)
612Rectangle baseVar = new(e.Bounds.X + offset, e.Bounds.Y + 1, PaintWidth, e.Bounds.Height - 3);
System\ComponentModel\Design\CollectionEditor.SplitButton.cs (2)
196Rectangle bounds = new(0, 0, Width, Height); 201_dropDownRectangle = new Rectangle(bounds.Right - PushButtonWidth - 1, 4, PushButtonWidth, bounds.Height - 8);
System\ComponentModel\Design\DesignerActionPanel.cs (2)
485e.Graphics.DrawRectangle(borderPen, new Rectangle(0, 0, Width - 1, Height - 1)); 505g.SetClip(new Rectangle(0, yPos, lineWidth, lineHeight));
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (5)
276ActionPanel.Invalidate(new Rectangle(EditRegionLocation, EditRegionSize), false); 291Rectangle rect = new(1, 1, width - 2, height - 2); 294swatchGraphics.DrawRectangle(SystemPens.ControlDark, new Rectangle(0, 0, width - 1, height - 1)); 341Rectangle editorBounds = new(Point.Empty, EditRegionSize); 365Rectangle editorBounds = new(Point.Empty, EditRegionSize);
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.EditorButton.cs (5)
70ButtonRenderer.DrawButton(g, new Rectangle(-1, -1, Width + 2, Height + 2), "…", Font, Focused, buttonState); 93ComboBoxRenderer.DrawDropDownButton(g, new Rectangle(0, 0, Width, Height), state); 116new Rectangle(-1, -1, Width + 2, Height + 2), 137new Rectangle( 155ControlPaint.DrawFocusRectangle(g, new Rectangle(2, 2, Width - 5, Height - 5));
System\ComponentModel\Design\DesignerActionPanel.TextBoxPropertyLine.cs (1)
290Rectangle editRect = new(EditRegionRelativeLocation, EditRegionSize);
System\ComponentModel\Design\DesignerActionUI.cs (2)
616if ((new Rectangle(glyphCoord, new Size(currentGlyph.Bounds.Width, currentGlyph.Bounds.Height))).Contains(point)) 656Rectangle rectGlyph = new(glyphLocationScreenCoord, glyph.Bounds.Size);
System\Drawing\Design\ColorEditor.ColorPalette.ColorPaletteAccessibleObject.ColorCellAccessibleObject.cs (1)
43return new Rectangle(pt.X, pt.Y, rect.Width, rect.Height);
System\Drawing\Design\ColorEditor.ColorPalette.cs (1)
363Rectangle rect = new()
System\Drawing\Design\ColorEditor.ColorUI.cs (2)
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));
System\Drawing\Design\CursorEditor.CursorUI.cs (3)
73e.Graphics.FillRectangle(SystemBrushes.Control, new Rectangle(e.Bounds.X + 2, e.Bounds.Y + 2, cursorWidth, e.Bounds.Height - 4)); 74e.Graphics.DrawRectangle(SystemPens.WindowText, new Rectangle(e.Bounds.X + 2, e.Bounds.Y + 2, cursorWidth - 1, e.Bounds.Height - 4 - 1)); 76cursor.DrawStretched(e.Graphics, new Rectangle(e.Bounds.X + 2, e.Bounds.Y + 2, cursorWidth, e.Bounds.Height - 4));
System\Windows\Forms\Design\Behavior\BehaviorService.cs (1)
302return new Rectangle(loc, c.Size);
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\DesignerActionGlyph.cs (1)
161_bounds = (new Rectangle(topRight.X, topRight.Y, GlyphImageOpened.Width, GlyphImageOpened.Height));
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (6)
372invalidRect = new Rectangle(diffs[k].X1, diffs[k].Y1, diffs[k].X2 - diffs[k].X1, diffs[k].Y2 - diffs[k].Y1); 393invalidRect = new Rectangle(line.X1, line.Y1, line.X2 - line.X1, line.Y2 - line.Y1); 535Rectangle clipBounds = new(0, 0, rootControl.ClientRectangle.Width, rootControl.ClientRectangle.Height); 689Rectangle currentBounds = new(_behaviorService.ControlToAdornerWindow(targetControl), targetControl.Size); 1087Rectangle dragBounds = new(_behaviorService.ControlToAdornerWindow(targetControl), targetControl.Size); 1144Rectangle tempDragRect = new(dragBounds.Left + snapPoint.X, dragBounds.Top + snapPoint.Y, dragBounds.Width, dragBounds.Height);
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (4)
738Rectangle newRect = new(newPosition.X, newPosition.Y, 759_dragAssistanceManager.OnMouseMove(new Rectangle(-100, -100, 0, 0)); /*just an invalid rect - so we won't snap*/// ); 1027Rectangle controlRect = new(_dragComponents[i].draggedLocation.X - _dragImageRect.X, 1034new Rectangle(0, 0, _dragComponents[i].dragImage.Width, _dragComponents[i].dragImage.Height),
System\Windows\Forms\Design\Behavior\GrabHandleGlyph.cs (8)
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); 38bounds = new Rectangle(controlBounds.Right - DesignerUtils.s_handleOverlap, controlBounds.Y + DesignerUtils.s_handleOverlap - DesignerUtils.s_handleSize, DesignerUtils.s_handleSize, DesignerUtils.s_handleSize); 43bounds = new Rectangle(controlBounds.Right - DesignerUtils.s_handleOverlap, controlBounds.Bottom - DesignerUtils.s_handleOverlap, 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); 94bounds = new Rectangle(controlBounds.Right - DesignerUtils.s_handleOverlap, 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)
34bounds = new Rectangle(
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (2)
603_dragManager.OnMouseMove(new Rectangle(-100, -100, 0, 0)); 618Rectangle controlBounds = new(_resizeComponents[0].resizeBounds.X, _resizeComponents[0].resizeBounds.Y,
System\Windows\Forms\Design\Behavior\ToolboxItemSnapLineBehavior.cs (2)
306Rectangle newRectangle = new( 343Rectangle statusRect = new(newRectangle.X - adornerServiceOrigin.X, newRectangle.Y - adornerServiceOrigin.Y, 0, 0);
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionBehavior.cs (1)
119Rectangle translatedBounds = new(loc, parent.Size);
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionGlyph.cs (8)
108_glyphBounds = new Rectangle(bounds.X + x, bounds.Y + bounds.Height, _imageWidth, _imageHeight); 117_glyphBounds = new Rectangle(bounds.X + x, bounds.Y - _imageHeight, _imageWidth, _imageHeight); 126_glyphBounds = new Rectangle(bounds.X + bounds.Width, bounds.Y + y, _imageHeight, _imageWidth); 135_glyphBounds = new Rectangle(bounds.X - _imageHeight, bounds.Y + y, _imageHeight, _imageWidth); 157_glyphBounds = new Rectangle(bounds.X + x, bounds.Y + bounds.Height, _imageWidth, _imageHeight); 166_glyphBounds = new Rectangle(bounds.X + x, bounds.Y - _imageHeight, _imageWidth, _imageHeight); 175_glyphBounds = new Rectangle(bounds.X + bounds.Width, bounds.Y + y, _imageHeight, _imageWidth); 184_glyphBounds = new Rectangle(bounds.X - _imageHeight, bounds.Y + y, _imageHeight, _imageWidth);
System\Windows\Forms\Design\ComponentTray.cs (3)
1323Rectangle rect = new Rectangle 2272e.Graphics.DrawImage(_toolboxBitmap, new Rectangle(x, y, _cxIcon, _cyIcon)); 2284e.Graphics.DrawImage(_toolboxBitmap, new Rectangle(rc.X, y, _cxIcon, _cyIcon));
System\Windows\Forms\Design\ControlCommandSet.cs (1)
714Rectangle dragRect = new(primaryControl.Location.X, primaryControl.Location.Y,
System\Windows\Forms\Design\ControlDesigner.cs (3)
2133Rectangle controlScreenBounds = new(parent.PointToScreen(Control.Location), Control.Size); 2134Rectangle clientAreaScreenBounds = new(Control.PointToScreen(Point.Empty), Control.ClientSize); 2266Rectangle imageRect = new(marginX, marginY, glyphSize.Width, glyphSize.Height);
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (4)
902Rectangle bounds = new(0, selectedIndex * _selectedColumns.ItemHeight, _selectedColumns.Width, _selectedColumns.ItemHeight); 1003Rectangle focusRectangle = new(bounds.X, e.Bounds.Y + 1, textWidth + OWNERDRAWHORIZONTALBUFFER, e.Bounds.Height - 2); 1018e.Graphics.FillRectangle(backBrush, new Rectangle(focusRectangle.Right + 1, e.Bounds.Y, e.Bounds.Width - focusRectangle.Right - 1, e.Bounds.Height)); 1022e.Graphics.FillRectangle(backBrush, new Rectangle(bounds.X, e.Bounds.Y, e.Bounds.Width - bounds.X, e.Bounds.Height));
System\Windows\Forms\Design\DesignBindingPicker.cs (1)
1857Rectangle rect = new(ClientRectangle.Location, ClientRectangle.Size);
System\Windows\Forms\Design\DesignerFrame.cs (1)
463Rectangle invalidateRect = new(overlayControl.PointToClient(screenRectangle.Location), screenRectangle.Size);
System\Windows\Forms\Design\DesignerUtils.cs (5)
462SelectionBorderGlyphType.Top => new Rectangle(originalBounds.Left - borderSize, originalBounds.Top - borderSize, originalBounds.Width + 2 * borderSize, borderSize), 463SelectionBorderGlyphType.Bottom => new Rectangle(originalBounds.Left - borderSize, originalBounds.Bottom, originalBounds.Width + 2 * borderSize, borderSize), 464SelectionBorderGlyphType.Left => new Rectangle(originalBounds.Left - borderSize, originalBounds.Top - borderSize, borderSize, originalBounds.Height + 2 * borderSize), 465SelectionBorderGlyphType.Right => new Rectangle(originalBounds.Right, originalBounds.Top - borderSize, borderSize, originalBounds.Height + 2 * borderSize), 671BitmapData data = b.LockBits(new Rectangle(0, 0, b.Width, b.Height), ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb);
System\Windows\Forms\Design\DocumentDesigner.cs (1)
471Rectangle translatedBounds = new(loc, ((Control)Component).Size);
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (2)
152return new Rectangle( 458Rectangle invalidRect = new(
System\Windows\Forms\Design\InheritanceUI.cs (1)
37s_inheritanceGlyphRect = new Rectangle(0, 0, size.Width, size.Height);
System\Windows\Forms\Design\OleDragDropHandler.cs (1)
845Rectangle offset = new(de.X - _dragBase.X, de.Y - _dragBase.Y, 0, 0);
System\Windows\Forms\Design\ParentControlDesigner.cs (9)
1042Rectangle translatedBounds = new(loc, ((Control)Component).Size); 1120Rectangle r = GetUpdatedRect(Rectangle.Empty, new Rectangle(pt.X, pt.Y, 0, 0), false); 1238Rectangle bounds = new((Point)defaultValues["Location"], (Size)defaultValues["Size"]); 1783Rectangle frameRect = new(offset.X - _adornerWindowToScreenOffset.X, 1819_statusCommandUI?.SetStatusInformation(new Rectangle(location.X, location.Y, offset.Width, offset.Height)); 1932Rectangle r = new(_mouseDragBase.X - _adornerWindowToScreenOffset.X, 1969Rectangle frameRect = new(_mouseDragOffset.X - _adornerWindowToScreenOffset.X, 2010_statusCommandUI?.SetStatusInformation(new Rectangle(offset.X, offset.Y, _mouseDragOffset.Width, _mouseDragOffset.Height)); 2026Rectangle paintRect = new(Math.Min(displayRect.X, clientRect.X),
System\Windows\Forms\Design\SelectionUIHandler.cs (1)
316Rectangle tempNewBounds = GetUpdatedRect(oldBounds, new Rectangle(targetX, targetY, targetWidth, targetHeight), true);
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 (1)
824Region region = new(new Rectangle(0, 0, 0, 0));
System\Windows\Forms\Design\SelectionUIService.SelectionUIItem.cs (2)
131Rectangle rect = new(_outerRect.X, _outerRect.Y, GRABHANDLE_WIDTH, GRABHANDLE_HEIGHT); 508Rectangle 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 (5)
964Rectangle bounds = new(startingPoint, Table.DisplayRectangle.Size); 1070Rectangle bounds = new(loc, Table.DisplayRectangle.Size); 1073Rectangle checkBounds = new(controlLoc, Control.ClientSize); // Can't use Control.Size since that will include any scrollbar 1103Rectangle gBounds = new(startLoc - halfSize, checkBounds.Top, DesignerUtils.s_resizeGlyphSize, checkBounds.Height); 1130Rectangle gBounds = new(checkBounds.Left, startLoc - halfSize, checkBounds.Width, DesignerUtils.s_resizeGlyphSize);
System\Windows\Forms\Design\TabOrder.cs (1)
194_region = new Region(new Rectangle(0, 0, 0, 0));
System\Windows\Forms\Design\ToolStripCollectionEditor.ToolStripItemEditorForm.cs (3)
894Rectangle textRect = new(classWidth + GdiPlusExtraSpace, 0, bounds.Width - (classWidth + GdiPlusExtraSpace), bounds.Height); 979? new(4 + SystemInformation.HorizontalScrollBarThumbWidth, 3, s_iconWidth, s_iconHeight) 980: new(3, 3, s_iconWidth, s_iconHeight);
System\Windows\Forms\Design\ToolStripDesigner.cs (1)
1352Rectangle translatedBounds = new(loc, ((Control)Component).Size);
System\Windows\Forms\Design\ToolStripItemBehavior.cs (2)
979parentDesigner.DragBoxFromMouseDown = _dragBoxFromMouseDown = new Rectangle(new Point(mouseLoc.X - (dragSize.Width / 2), mouseLoc.Y - (dragSize.Height / 2)), dragSize); 1002ownerItemDesigner._dragBoxFromMouseDown = _dragBoxFromMouseDown = new Rectangle(new Point(mouseLoc.X - (dragSize.Width / 2), mouseLoc.Y - (dragSize.Height / 2)), dragSize);
System\Windows\Forms\Design\ToolStripTemplateNode.cs (13)
1259Rectangle translatedBounds = new(loc, _miniToolStrip.Size); 1823Rectangle bounds = new(Point.Empty, e.ToolStrip.Size); 1825Rectangle drawRect = new(bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 1838Rectangle bounds = new(Point.Empty, item.Size); 1839Rectangle drawRect = new(bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 1850_hotRegion = new Rectangle(bounds.Left + 2, bounds.Top + 2, s_templateHotRegionWidth, bounds.Bottom - 4); 1854_hotRegion = new Rectangle(bounds.Right - s_templateHotRegionWidth - 2, bounds.Top + 2, s_templateHotRegionWidth, bounds.Bottom - 4); 1871_hotRegion = new Rectangle(bounds.Left + 2, bounds.Top + 2, s_templateHotRegionWidth, bounds.Bottom - 4); 1875_hotRegion = new Rectangle(bounds.Right - s_templateHotRegionWidth - 2, bounds.Top + 2, s_templateHotRegionWidth, bounds.Bottom - 4); 1934Rectangle bounds = new(Point.Empty, splitButton.Size); 1940Rectangle fillRect = new(buttonBounds.Left + 1, buttonBounds.Top, buttonBounds.Right, buttonBounds.Bottom); 1959Rectangle fillRect = new(buttonBounds.Left + 1, buttonBounds.Top, buttonBounds.Right, buttonBounds.Bottom); 1984Rectangle drawRect = new(bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1);
System.Windows.Forms.Primitives (3)
System\Windows\Forms\Automation\UiaTextRange.cs (3)
364Rectangle endlineRectangle = new(endlinePoint.X, endlinePoint.Y + 2, UiaTextProvider.EndOfLineWidth, Math.Abs(_provider.Logfont.lfHeight) + 1); 400Rectangle rectangle = new(startPoint.X, startPoint.Y + 2, endPoint.X - startPoint.X, clippingRectangle.Height); 866Rectangle rect = new(startPoint.X, startPoint.Y + 2, endPoint.X - startPoint.X, lineHeight);
2903 references to Rectangle
Microsoft.Private.Windows.Core (14)
_generated\206\Windows.Win32.RECT.g.cs (3)
39 internal RECT(global::System.Drawing.Rectangle value) : 74 public static implicit operator global::System.Drawing.Rectangle(RECT value) => new global::System.Drawing.Rectangle(value.left, value.top, value.Width, value.Height); 78 public static implicit operator RECT(global::System.Drawing.Rectangle value) => new RECT(value);
System\Private\Windows\BinaryFormat\BinaryFormatWriter.cs (4)
150/// Writes a <see cref="Rectangle"/> in binary format. 152public static void WriteRectangle(Stream stream, Rectangle value) 157new ClassInfo(1, typeof(Rectangle).FullName!, s_rectangleMemberNames), 743case Rectangle rectangle:
System\Private\Windows\Nrbf\CoreNrbfSerializer.cs (2)
92{ Types.ToTypeName($"{Types.RectangleType}"), typeof(Rectangle) }, 159|| type == typeof(Rectangle)
System\Private\Windows\Nrbf\SerializationRecordExtensions.cs (2)
108/// Tries to get this object as a <see cref="Rectangle"/>. 119|| !classInfo.TypeNameMatches(typeof(Rectangle))
Windows\Win32\Foundation\RECT.cs (1)
16public override readonly string ToString() => ((Rectangle)this).ToString();
Windows\Win32\Graphics\Gdi\BeginPaintScope.cs (1)
27public Rectangle PaintRectangle => _paintStruct.rcPaint;
Windows\Win32\Graphics\Gdi\RegionScope.cs (1)
28public RegionScope(Rectangle rectangle) =>
netstandard (1)
netstandard.cs (1)
751[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.Rectangle))]
PresentationUI (8)
MS\Internal\Documents\RMPublishingDialog.RightsTable.cs (2)
1000Rectangle clipBounds, Rectangle cellBounds, int rowIndex,
MS\Internal\Documents\SignatureSummaryDialog.cs (6)
620Rectangle bounds, 667Rectangle iconRect = new Rectangle( 677Rectangle statusRect = new Rectangle( 685Rectangle intentRect = new Rectangle( 712Rectangle signByRect = new Rectangle( 720Rectangle localeRect = new Rectangle(
System.ComponentModel.TypeConverter (3)
System\Drawing\RectangleConverter.cs (3)
62if (value is Rectangle rect) 81ConstructorInfo? ctor = typeof(Rectangle).GetConstructor( 120PropertyDescriptorCollection props = TypeDescriptor.GetProperties(typeof(Rectangle), attributes);
System.Data.Common (1)
System\Data\TypeLimiter.cs (1)
177typeof(Rectangle),
System.Drawing (1)
System.Drawing.cs (1)
138[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.Rectangle))]
System.Drawing.Common (131)
Special\Forwards.cs (1)
10[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.Rectangle))]
System\Drawing\Bitmap.cs (6)
244Rectangle rectangle = new(0, 0, size.Width, size.Height); 265public BitmapData LockBits(Rectangle rect, ImageLockMode flags, PixelFormat format) => 268public BitmapData LockBits(Rectangle rect, ImageLockMode flags, PixelFormat format, BitmapData bitmapData) 342public Bitmap Clone(Rectangle rect, PixelFormat format) 370/// <param name="area">The area to apply to, or <see cref="Rectangle.Empty"/> for the entire image.</param> 371public void ApplyEffect(Effect effect, Rectangle area = default)
System\Drawing\BufferedGraphicsContext.cs (5)
73public BufferedGraphics Allocate(Graphics targetGraphics, Rectangle targetRectangle) 86public BufferedGraphics Allocate(IntPtr targetDC, Rectangle targetRectangle) 99private BufferedGraphics AllocBuffer(Graphics? targetGraphics, HDC targetDC, Rectangle targetRectangle) 148private static BufferedGraphics AllocBufferInTempManager(Graphics? targetGraphics, HDC targetDC, Rectangle targetRectangle) 183private bool ShouldUseTempManager(Rectangle targetBounds)
System\Drawing\Drawing2D\GraphicsPath.cs (9)
382public void AddArc(Rectangle rect, float startAngle, float sweepAngle) => 639public void AddRectangle(Rectangle rect) => AddRectangle((RectangleF)rect); 642public void AddRectangles(params Rectangle[] rects) => AddRectangles(rects.OrThrowIfNull().AsSpan()); 650void AddRectangles(params ReadOnlySpan<Rectangle> rects) 652fixed (Rectangle* r = rects) 661public void AddRoundedRectangle(Rectangle rect, Size radius) => 709public void AddEllipse(Rectangle rect) => AddEllipse(rect.X, rect.Y, rect.Width, rect.Height); 713public void AddPie(Rectangle rect, float startAngle, float sweepAngle) => 805public void AddString(string s, FontFamily family, int style, float emSize, Rectangle layoutRect, StringFormat? format)
System\Drawing\Drawing2D\LinearGradientBrush.cs (3)
49public LinearGradientBrush(Rectangle rect, Color color1, Color color2, LinearGradientMode linearGradientMode) 77public LinearGradientBrush(Rectangle rect, Color color1, Color color2, float angle) 82public LinearGradientBrush(Rectangle rect, Color color1, Color color2, float angle, bool isAngleScaleable)
System\Drawing\Drawing2D\Matrix.cs (1)
65public Matrix(Rectangle rect, params Point[] plgpts)
System\Drawing\Graphics.cs (61)
526public void SetClip(Rectangle rect) => SetClip(rect, Drawing2D.CombineMode.Replace); 528public void SetClip(Rectangle rect, Drawing2D.CombineMode combineMode) => SetClip((RectangleF)rect, combineMode); 551public void IntersectClip(Rectangle rect) => IntersectClip((RectangleF)rect); 566public void ExcludeClip(Rectangle rect) => 600public bool IsVisible(Rectangle rect) => IsVisible((float)rect.X, rect.Y, rect.Width, rect.Height); 678public void DrawArc(Pen pen, Rectangle rect, float startAngle, float sweepAngle) => 718public void DrawRectangle(Pen pen, Rectangle rect) => DrawRectangle(pen, rect.X, rect.Y, rect.Width, rect.Height); 722public void DrawRoundedRectangle(Pen pen, Rectangle rect, Size radius) => 755/// <inheritdoc cref="DrawRectangles(Pen, Rectangle[])"/> 758/// <inheritdoc cref="DrawRectangles(Pen, Rectangle[])"/> 780/// <param name="rects">An array of <see cref="Rectangle"/> structures that represents the rectangles to draw.</param> 781public void DrawRectangles(Pen pen, params Rectangle[] rects) => DrawRectangles(pen, rects.OrThrowIfNull().AsSpan()); 783/// <inheritdoc cref="DrawRectangles(Pen, Rectangle[])"/> 789void DrawRectangles(Pen pen, params ReadOnlySpan<Rectangle> rects) 793fixed (Rectangle* r = rects) 819public void DrawEllipse(Pen pen, Rectangle rect) => DrawEllipse(pen, (float)rect.X, rect.Y, rect.Width, rect.Height); 845public void DrawPie(Pen pen, Rectangle rect, float startAngle, float sweepAngle) => 1196public void FillRoundedRectangle(Brush brush, Rectangle rect, Size radius) => 1236public void FillRectangle(Brush brush, Rectangle rect) => FillRectangle(brush, (float)rect.X, rect.Y, rect.Width, rect.Height); 1273public void FillRectangles(Brush brush, params Rectangle[] rects) => 1282void FillRectangles(Brush brush, params ReadOnlySpan<Rectangle> rects) 1286fixed (Rectangle* r = rects) 1390public void FillEllipse(Brush brush, Rectangle rect) => FillEllipse(brush, (float)rect.X, rect.Y, rect.Width, rect.Height); 1400public void FillPie(Brush brush, Rectangle rect, float startAngle, float sweepAngle) => 2020public void DrawImage(Image image, Rectangle rect) => DrawImage(image, (float)rect.X, rect.Y, rect.Width, rect.Height); 2028public void DrawImageUnscaled(Image image, Rectangle rect) => DrawImage(image, rect.X, rect.Y); 2032public void DrawImageUnscaledAndClipped(Image image, Rectangle rect) 2104public void DrawImage(Image image, int x, int y, Rectangle srcRect, GraphicsUnit srcUnit) 2125public void DrawImage(Image image, Rectangle destRect, Rectangle srcRect, GraphicsUnit srcUnit) 2201public void DrawImage(Image image, Point[] destPoints, Rectangle srcRect, GraphicsUnit srcUnit) => 2207Rectangle srcRect, 2214Rectangle srcRect, 2222Rectangle srcRect, 2257Rectangle destRect, 2266Rectangle destRect, 2276Rectangle destRect, 2287Rectangle destRect, 2317Rectangle destRect, 2326Rectangle destRect, 2336Rectangle destRect, 2347Rectangle destRect, 2467public void EnumerateMetafile(Metafile metafile, Rectangle destRect, EnumerateMetafileProc callback) => 2470public void EnumerateMetafile(Metafile metafile, Rectangle destRect, EnumerateMetafileProc callback, IntPtr callbackData) => 2506Rectangle srcRect, 2513Rectangle srcRect, 2535Rectangle destRect, 2536Rectangle srcRect, 2542Rectangle destRect, 2543Rectangle srcRect, 2566Rectangle srcRect, 2573Rectangle srcRect, 2902public void DrawIcon(Icon icon, Rectangle targetRect) 2925public void DrawIconUnstretched(Icon icon, Rectangle targetRect) 2991Rectangle destRect, 3082Rectangle srcRect, 3122Rectangle destRect, 3123Rectangle srcRect, 3165Rectangle srcRect, 3510public GraphicsContainer BeginContainer(Rectangle dstrect, Rectangle srcrect, GraphicsUnit unit)
System\Drawing\Icon.cs (8)
272private void DrawIcon(HDC hdc, Rectangle imageRect, Rectangle targetRect, bool stretch) 362internal void Draw(Graphics graphics, Rectangle targetRect) 364Rectangle copy = targetRect; 372DrawIcon(hdc, Rectangle.Empty, copy, true); 379internal void DrawUnstretched(Graphics graphics, Rectangle targetRect) 381Rectangle copy = targetRect; 388DrawIcon(hdc, Rectangle.Empty, copy, false);
System\Drawing\Imaging\Metafile.cs (13)
75public Metafile(IntPtr referenceHdc, Rectangle frameRect) : 142public Metafile(IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit) : 151public Metafile(IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit, EmfType type) : 237public Metafile(string fileName, IntPtr referenceHdc, Rectangle frameRect) : 245public Metafile(string fileName, IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit) : 253public Metafile(string fileName, IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit, EmfType type) : 261public Metafile(string fileName, IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit, string? description) : 309public Metafile(Stream stream, IntPtr referenceHdc, Rectangle frameRect) : 317public Metafile(Stream stream, IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit) : 325public Metafile(Stream stream, IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit, EmfType type) : 376public Metafile(IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit, EmfType type, string? desc) 424public Metafile(string fileName, IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit, EmfType type, string? description) 499public unsafe Metafile(Stream stream, IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit, EmfType type, string? description)
System\Drawing\Imaging\MetafileHeader.cs (2)
46/// Gets a <see cref='Rectangle'/> that bounds the associated <see cref='Metafile'/>. 48public Rectangle Bounds => new(_header.X, _header.Y, _header.Width, _header.Height);
System\Drawing\Printing\PageSettings.cs (3)
38public Rectangle Bounds 43Rectangle pageBounds = GetBounds(modeHandle); 359internal Rectangle GetBounds(HGLOBAL modeHandle)
System\Drawing\Printing\PrintController.cs (2)
202Rectangle pageBounds = pageSettings.GetBounds(_modeHandle); 203Rectangle marginBounds = new(
System\Drawing\Printing\PrinterUnitConvert.cs (2)
46public static Rectangle Convert(Rectangle value, PrinterUnit fromUnit, PrinterUnit toUnit) => new(
System\Drawing\Printing\PrintPageEventArgs.cs (4)
14public PrintPageEventArgs(Graphics? graphics, Rectangle marginBounds, Rectangle pageBounds, PageSettings pageSettings) 40public Rectangle MarginBounds { get; } 45public Rectangle PageBounds { get; }
System\Drawing\Region.cs (8)
29public Region(Rectangle rect) : this((RectangleF)rect) 112public void Intersect(Rectangle rect) => Intersect((RectangleF)rect); 131public void Union(Rectangle rect) => Union((RectangleF)rect); 150public void Xor(Rectangle rect) => Xor((RectangleF)rect); 169public void Exclude(Rectangle rect) => Exclude((RectangleF)rect); 188public void Complement(Rectangle rect) => Complement((RectangleF)rect); 326public bool IsVisible(Rectangle rect) => IsVisible(rect, null); 330public bool IsVisible(Rectangle rect, Graphics? g) => IsVisible((RectangleF)rect, g);
System\Drawing\TextureBrush.cs (3)
55public TextureBrush(Image image, Drawing2D.WrapMode wrapMode, Rectangle dstRect) 81public TextureBrush(Image image, Rectangle dstRect) : this(image, dstRect, null) { } 83public TextureBrush(Image image, Rectangle dstRect, ImageAttributes? imageAttr)
System.Drawing.Primitives (59)
System\Drawing\Rectangle.cs (51)
15public struct Rectangle : IEquatable<Rectangle> 17public static readonly Rectangle Empty; 25/// Initializes a new instance of the <see cref='System.Drawing.Rectangle'/> class with the specified location 48/// Creates a new <see cref='System.Drawing.Rectangle'/> with the specified location and size. 50public static Rectangle FromLTRB(int left, int top, int right, int bottom) => 55/// <see cref='System.Drawing.Rectangle'/>. 69/// Gets or sets the size of this <see cref='System.Drawing.Rectangle'/>. 84/// <see cref='System.Drawing.Rectangle'/>. 94/// <see cref='System.Drawing.Rectangle'/>. 103/// Gets or sets the width of the rectangular region defined by this <see cref='System.Drawing.Rectangle'/>. 112/// Gets or sets the width of the rectangular region defined by this <see cref='System.Drawing.Rectangle'/>. 122/// <see cref='System.Drawing.Rectangle'/> . 129/// <see cref='System.Drawing.Rectangle'/>. 136/// <see cref='System.Drawing.Rectangle'/>. 143/// <see cref='System.Drawing.Rectangle'/>. 149/// Tests whether this <see cref='System.Drawing.Rectangle'/> has a <see cref='System.Drawing.Rectangle.Width'/> 150/// or a <see cref='System.Drawing.Rectangle.Height'/> of 0. 156/// Tests whether <paramref name="obj"/> is a <see cref='System.Drawing.Rectangle'/> with the same location 159public override readonly bool Equals([NotNullWhen(true)] object? obj) => obj is Rectangle && Equals((Rectangle)obj); 161public readonly bool Equals(Rectangle other) => this == other; 164/// Tests whether two <see cref='System.Drawing.Rectangle'/> objects have equal location and size. 166public static bool operator ==(Rectangle left, Rectangle right) => 170/// Tests whether two <see cref='System.Drawing.Rectangle'/> objects differ in location or size. 172public static bool operator !=(Rectangle left, Rectangle right) => !(left == right); 177public static Rectangle Ceiling(RectangleF value) 192public static Rectangle Truncate(RectangleF value) 207public static Rectangle Round(RectangleF value) 221/// <see cref='System.Drawing.Rectangle'/> . 227/// <see cref='System.Drawing.Rectangle'/> . 233/// rectangular region represented by this <see cref='System.Drawing.Rectangle'/> . 235public readonly bool Contains(Rectangle rect) => 242/// Inflates this <see cref='System.Drawing.Rectangle'/> by the specified amount. 257/// Inflates this <see cref='System.Drawing.Rectangle'/> by the specified amount. 262/// Creates a <see cref='System.Drawing.Rectangle'/> that is inflated by the specified amount. 264public static Rectangle Inflate(Rectangle rect, int x, int y) 266Rectangle r = rect; 274public void Intersect(Rectangle rect) 276Rectangle result = Intersect(rect, this); 288public static Rectangle Intersect(Rectangle a, Rectangle b) 306public readonly bool IntersectsWith(Rectangle rect) => 313public static Rectangle Union(Rectangle a, Rectangle b) 341/// Converts the attributes of this <see cref='System.Drawing.Rectangle'/> to a human readable string.
System\Drawing\RectangleF.cs (8)
206/// <see cref='System.Drawing.Rectangle'/> . 212/// <see cref='System.Drawing.Rectangle'/> . 218/// the rectangular region represented by this <see cref='System.Drawing.Rectangle'/> . 229/// Inflates this <see cref='System.Drawing.Rectangle'/> by the specified amount. 240/// Inflates this <see cref='System.Drawing.Rectangle'/> by the specified amount. 245/// Creates a <see cref='System.Drawing.Rectangle'/> that is inflated by the specified amount. 320/// Converts the specified <see cref='System.Drawing.Rectangle'/> to a 323public static implicit operator RectangleF(Rectangle r) => new RectangleF(r.X, r.Y, r.Width, r.Height);
System.Private.Windows.Core (14)
_generated\209\Windows.Win32.RECT.g.cs (3)
39 internal RECT(global::System.Drawing.Rectangle value) : 74 public static implicit operator global::System.Drawing.Rectangle(RECT value) => new global::System.Drawing.Rectangle(value.left, value.top, value.Width, value.Height); 78 public static implicit operator RECT(global::System.Drawing.Rectangle value) => new RECT(value);
System\Private\Windows\BinaryFormat\BinaryFormatWriter.cs (4)
150/// Writes a <see cref="Rectangle"/> in binary format. 152public static void WriteRectangle(Stream stream, Rectangle value) 157new ClassInfo(1, typeof(Rectangle).FullName!, s_rectangleMemberNames), 743case Rectangle rectangle:
System\Private\Windows\Nrbf\CoreNrbfSerializer.cs (2)
92{ Types.ToTypeName($"{Types.RectangleType}"), typeof(Rectangle) }, 159|| type == typeof(Rectangle)
System\Private\Windows\Nrbf\SerializationRecordExtensions.cs (2)
108/// Tries to get this object as a <see cref="Rectangle"/>. 119|| !classInfo.TypeNameMatches(typeof(Rectangle))
Windows\Win32\Foundation\RECT.cs (1)
16public override readonly string ToString() => ((Rectangle)this).ToString();
Windows\Win32\Graphics\Gdi\BeginPaintScope.cs (1)
27public Rectangle PaintRectangle => _paintStruct.rcPaint;
Windows\Win32\Graphics\Gdi\RegionScope.cs (1)
28public RegionScope(Rectangle rectangle) =>
System.Private.Windows.Core.TestUtilities (4)
FluentAssertions\FluentAssertExtensions.cs (4)
111/// Asserts a <see cref="Rectangle"/> is empty. 116.ForCondition(assertions.Subject is Rectangle rect && rect.IsEmpty) 124/// Asserts a <see cref="Rectangle"/> is not empty. 129.ForCondition(assertions.Subject is Rectangle rect && !rect.IsEmpty)
System.Private.Windows.GdiPlus (5)
Windows\Win32\Graphics\GdiPlus\GpBitmapExtensions.cs (1)
15Rectangle rect,
Windows\Win32\Graphics\GdiPlus\Rect.cs (4)
11public static implicit operator Rectangle(Rect rect) => Unsafe.As<Rect, Rectangle>(ref rect); 12public static implicit operator Rect(Rectangle rectangle) => Unsafe.As<Rectangle, Rect>(ref rectangle);
System.Windows.Forms (2121)
System\Drawing\Design\PaintValueEventArgs.cs (4)
20/// <param name="bounds">The <see cref="Rectangle"/> that indicates the area in which the drawing should be done.</param> 21public PaintValueEventArgs(ITypeDescriptorContext? context, object? value, Graphics graphics, Rectangle bounds) 30/// <see cref="Rectangle"/> outlining the area in which the painting should be done. 32public Rectangle Bounds { get; }
System\Drawing\Design\UITypeEditor.cs (2)
127/// <param name="rectangle">A <see cref="Rectangle" /> within whose boundaries to paint the value. </param> 128public void PaintValue(object? value, Graphics canvas, Rectangle rectangle)
System\Windows\Forms\Accessibility\AccessibleObject.cs (4)
143public virtual Rectangle Bounds => SystemIAccessible.TryGetLocation(CHILDID_SELF); 718internal virtual Rectangle BoundingRectangle => Bounds; 1697Rectangle bounds = Bounds; 1710Rectangle bounds = child.Bounds;
System\Windows\Forms\Accessibility\AccessibleObjectExtensions.cs (2)
23public static Rectangle TryGetLocation(this AgileComPointer<IAccessible>? agile, int child) 26public static Rectangle TryGetLocation(this AgileComPointer<IAccessible>? agile, VARIANT child)
System\Windows\Forms\Accessibility\LabelEditUiaTextProvider.cs (6)
37public override Rectangle BoundingRectangle => GetFormattingRectangle(); 179if (IsDegenerate(_owningControl.TryGetTarget(out Control? target) ? target.ClientRectangle : Rectangle.Empty)) 184Rectangle rectangle = GetFormattingRectangle(); 200static bool IsDegenerate(Rectangle rect) 305public override Rectangle RectangleToScreen(Rectangle rect)
System\Windows\Forms\ActiveX\AxHost.cs (6)
1007public new void DrawToBitmap(Bitmap bitmap, Rectangle targetBounds) 1152protected override Rectangle GetScaledBounds(Rectangle bounds, SizeF factor, BoundsSpecified specified) => bounds; 1154private unsafe void SetObjectRects(Rectangle bounds) 1196Rectangle oldBounds = Bounds; 1408Rectangle b = Bounds;
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (6)
126private Rectangle? _lastClipRect; 1701Rectangle bounds = _control.Bounds; 1759Rectangle posRect = *lprcPosRect; 1801Rectangle clipRect = *lprcClipRect; 1804Rectangle intersect = !clipRect.IsEmpty ? Rectangle.Intersect(posRect, clipRect) : posRect;
System\Windows\Forms\ContextMenuStrip.cs (2)
97Rectangle bounds = CalculateDropDownLocation(new Point(x, y), ToolStripDropDownDirection.AboveLeft); 98Rectangle screenBounds = Screen.FromRectangle(bounds).Bounds;
System\Windows\Forms\Control.cs (42)
1102public Rectangle Bounds 1258public Rectangle ClientRectangle => new Rectangle(0, 0, _clientWidth, _clientHeight); 1736public virtual Rectangle DisplayRectangle 4563Rectangle originalBounds; 4581Rectangle parentClient = _parent.ClientRectangle; 4988public void DrawToBitmap(Bitmap bitmap, Rectangle targetBounds) 5275internal virtual Rectangle ApplyBoundsConstraints(int suggestedX, int suggestedY, int proposedWidth, int proposedHeight) 5283Rectangle newBounds = new(suggestedX, suggestedY, 0, 0) 5363protected virtual Rectangle GetScaledBounds(Rectangle bounds, SizeF factor, BoundsSpecified specified) 5593private protected virtual IList<Rectangle> GetNeighboringToolsRectangles() 5927OnInvalidated(new InvalidateEventArgs(Rectangle.Ceiling(region.GetBounds(graphics)))); 5978public void Invalidate(Rectangle rc) 5989public unsafe void Invalidate(Rectangle rc, bool invalidateChildren) 6606protected virtual void NotifyInvalidate(Rectangle invalidatedArea) 8004Rectangle cliprect = e.InvalidRect; 8007cliprect = Rectangle.Intersect(ClientRectangle, cliprect); 8151internal void PaintBackground(PaintEventArgs e, Rectangle rectangle) => 8154internal void PaintBackground(PaintEventArgs e, Rectangle rectangle, Color backColor, Point scrollOffset = default) 8205private static void PaintBackColor(PaintEventArgs e, Rectangle rectangle, Color backColor) 8235Rectangle clientRectangle = ClientRectangle; 8236Rectangle rectangle = clientRectangle; 8264internal unsafe void PaintTransparentBackground(PaintEventArgs e, Rectangle rectangle, Region? transparentRegion = null) 8304Rectangle shift = new(-Left, -Top, parent.Width, parent.Height); 8307Rectangle newClipRect = new( 8820private protected virtual void PrintToMetaFileRecursive(HDC hDC, IntPtr lParam, Rectangle bounds) 8834Rectangle clientBounds = new(clientOffset, ClientSize); 9389public Rectangle RectangleToClient(Rectangle r) 9399public Rectangle RectangleToScreen(Rectangle r) 9810Rectangle rawScaledBounds = GetScaledBounds(Bounds, factor, specified); 10165Rectangle adjustedBounds = ApplyBoundsConstraints(x, y, width, height); 11839Rectangle clip; 11880Rectangle band = ClientRectangle; 12723void IArrangedElement.SetBounds(Rectangle bounds, BoundsSpecified specified) 12827Rectangle IKeyboardToolTip.GetNativeScreenRectangle() => GetToolNativeScreenRectangle(); 12829IList<Rectangle> IKeyboardToolTip.GetNeighboringToolsRectangles() => GetNeighboringToolsRectangles(); 12856private IList<Rectangle> GetOwnNeighboringToolsRectangles() 12861return Array.Empty<Rectangle>(); 12864List<Rectangle> neighboringControlsRectangles = new(4); 12894internal virtual Rectangle GetToolNativeScreenRectangle()
System\Windows\Forms\Control.PrintPaintEventArgs.cs (1)
14internal PrintPaintEventArgs(Message m, HDC dc, Rectangle clipRect)
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (3)
655internal virtual Rectangle OverChangeRectangle 693internal virtual Rectangle DownChangeRectangle => ClientRectangle; 925Rectangle r = ClientRectangle;
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (21)
99internal static void DrawDitheredFill(Graphics g, Color color1, Color color2, Rectangle bounds) 105protected void Draw3DBorder(IDeviceContext deviceContext, Rectangle bounds, ColorData colors, bool raised) 131private void Draw3DBorderHighContrastRaised(IDeviceContext deviceContext, ref Rectangle bounds, ColorData colors) 189private static void Draw3DBorderNormal(IDeviceContext deviceContext, ref Rectangle bounds, ColorData colors) 234private void Draw3DBorderRaised(IDeviceContext deviceContext, ref Rectangle bounds, ColorData colors) 295protected internal static void Draw3DLiteBorder(IDeviceContext deviceContext, Rectangle r, ColorData colors, bool up) 325Rectangle bounds, 333Rectangle left = new(bounds.X, bounds.Y, size, bounds.Height); 334Rectangle right = new(bounds.X + bounds.Width - size, bounds.Y, size, bounds.Height); 335Rectangle top = new(bounds.X + size, bounds.Y, bounds.Width - size * 2, size); 336Rectangle bottom = new(bounds.X + size, bounds.Y + bounds.Height - size, bounds.Width - size * 2, size); 358internal static void DrawFlatFocus(IDeviceContext deviceContext, Rectangle r, Color color) 368private void DrawFocus(Graphics g, Rectangle r) 376internal virtual void DrawImageCore(Graphics graphics, Image image, Rectangle imageBounds, Point imageStart, LayoutData layout) 382Rectangle bounds = new( 425internal static void DrawDefaultBorder(IDeviceContext deviceContext, Rectangle r, Color color, bool isDefault) 455Rectangle r = layout.TextBounds; 516internal void PaintButtonBackground(PaintEventArgs e, Rectangle bounds, Brush? background) 535Rectangle maxFocus = layout.Focus; 552Rectangle bounds = Control.ClientRectangle; 573Rectangle clientRectangle,
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.LayoutData.cs (8)
12public Rectangle Client; 13public Rectangle Face; 14public Rectangle CheckArea; 15public Rectangle CheckBounds; 16public Rectangle TextBounds; 17public Rectangle Field; 18public Rectangle Focus; 19public Rectangle ImageBounds;
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.LayoutOptions.cs (12)
22public Rectangle Client; 261layout.Face = Rectangle.Inflate(layout.Client, -fullBorderSize, -fullBorderSize); 280Rectangle textAdjusted = new( 287? Rectangle.Union(textAdjusted, layout.ImageBounds) 363Rectangle field = Rectangle.Inflate(layout.Face, -PaddingSize, -PaddingSize); 483Rectangle maxBounds = Rectangle.Inflate(layout.Field, -TextImageInset, -TextImageInset); 510Rectangle maxCombinedBounds = maxBounds; 515Rectangle combinedBounds = LayoutUtils.Align(combinedSize, maxCombinedBounds, ContentAlignment.MiddleCenter); 614layout.TextBounds = Rectangle.Intersect(layout.TextBounds, layout.Field); 629layout.ImageBounds = Rectangle.Intersect(layout.ImageBounds, layout.Field);
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonFlatAdapter.cs (6)
14private void PaintBackground(PaintEventArgs e, Rectangle r, Color backColor) 16Rectangle rect = r; 38Rectangle r = Control.ClientRectangle; 131Rectangle r = Control.ClientRectangle; 224Rectangle r = Control.ClientRectangle; 294Rectangle clientRectangle,
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonPopupAdapter.cs (4)
18Rectangle r = Control.ClientRectangle; 64Rectangle r = Control.ClientRectangle; 122Rectangle r = Control.ClientRectangle; 151Rectangle clientRectangle,
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonStandardAdapter.cs (3)
46private void PaintThemedButtonBackground(PaintEventArgs e, Rectangle bounds, bool up) 137Rectangle bounds = Control.ClientRectangle; 187Rectangle r = Control.ClientRectangle;
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxBaseAdapter.cs (12)
36Rectangle bounds = layout.CheckBounds; 86Rectangle bounds, 119Rectangle bounds, 171Rectangle fullSize = layout.CheckBounds; 201internal static Rectangle DrawPopupBorder(Graphics g, Rectangle r, ColorData colors) 207internal static Rectangle DrawPopupBorder(PaintEventArgs e, Rectangle r, ColorData colors) 213internal static Rectangle DrawPopupBorder(HDC hdc, Rectangle r, ColorData colors) 294private static Bitmap GetCheckBoxImage(Color checkColor, Rectangle fullSize, ref Color cacheCheckColor, ref Bitmap? cacheCheckImage) 336layout.Focus = Control.AutoSize ? Rectangle.Inflate(layout.CheckBounds, -2, -2) : layout.Field;
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxPopupAdapter.cs (1)
132Rectangle clientRectangle,
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\ButtonDarkModeRendererBase.cs (7)
33Rectangle bounds, 41Action<Rectangle> paintImage, 57Rectangle paddedBounds = new( 64Rectangle contentBounds = DrawButtonBackground(graphics, paddedBounds, state, isDefault, backColor); 79public abstract Rectangle DrawButtonBackground(Graphics graphics, Rectangle bounds, PushButtonState state, bool isDefault, Color backColor); 81public abstract void DrawFocusIndicator(Graphics graphics, Rectangle contentBounds, bool isDefault);
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\FlatButtonDarkModeRenderer.cs (12)
25public override Rectangle DrawButtonBackground( 26Graphics graphics, Rectangle bounds, PushButtonState state, bool isDefault, Color backColor) 36return Rectangle.Inflate(bounds, -3, -3); 39public override void DrawFocusIndicator(Graphics g, Rectangle contentBounds, bool isDefault) 41Rectangle focus = Rectangle.Inflate(contentBounds, FocusIndicatorInflate, FocusIndicatorInflate); 80private static void DrawButtonBorder(Graphics g, Rectangle bounds, PushButtonState state, bool isDefault) 85Rectangle outer = Rectangle.Inflate(bounds, -1, -1); 92Rectangle inner = Rectangle.Inflate(outer, -1, -1); 97private static void DrawSingleBorder(Graphics g, Rectangle rect, Color color)
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\IButtonRenderer.cs (5)
44Rectangle bounds, 52Action<Rectangle> paintImage, 63Rectangle DrawButtonBackground(Graphics graphics, Rectangle bounds, PushButtonState state, bool isDefault, Color backColor); 71void DrawFocusIndicator(Graphics graphics, Rectangle contentBounds, bool isDefault);
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\PopupButtonDarkModeRenderer.cs (12)
33public override Rectangle DrawButtonBackground(Graphics graphics, Rectangle bounds, PushButtonState state, bool isDefault, Color backColor) 37Rectangle paddedBounds = Rectangle.Inflate(bounds, -padding.Left, -padding.Top); 40Rectangle contentBounds = Rectangle.Inflate(paddedBounds, -padding.Left, -padding.Top); 66public override void DrawFocusIndicator(Graphics graphics, Rectangle contentBounds, bool isDefault) 69Rectangle focusRect = Rectangle.Inflate(contentBounds, -FocusPadding, -FocusPadding); 123private static void DrawButtonBorder(Graphics graphics, Rectangle bounds, PushButtonState state, bool isDefault) 137Rectangle borderRect = bounds; 224private static GraphicsPath CreateRoundedRectanglePath(Rectangle bounds, int radius)
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\SystemButtonDarkModeRenderer.cs (14)
33public override Rectangle DrawButtonBackground(Graphics graphics, Rectangle bounds, PushButtonState state, bool isDefault, Color backColor) 36Rectangle fillBounds = Rectangle.Inflate(bounds, -SystemStylePadding, -SystemStylePadding); 51public override void DrawFocusIndicator(Graphics graphics, Rectangle contentBounds, bool isDefault) 54Rectangle focusRect = new( 116Rectangle bounds, 134Rectangle borderRect = Rectangle.Inflate(bounds, -SystemStylePadding, -SystemStylePadding); 196private static GraphicsPath GetTopLeftSegmentPath(Rectangle bounds, int radius) 203Rectangle arcRect = new(bounds.Location, new Size(diameter, diameter)); 235private static GraphicsPath GetBottomRightSegmentPath(Rectangle bounds, int radius) 248Rectangle arcRect = new(bounds.Right - diameter, bounds.Bottom - diameter, diameter, diameter); 274private static GraphicsPath CreateRoundedRectanglePath(Rectangle bounds, int radius)
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonBaseAdapter.cs (6)
27Rectangle bounds, 58protected void DrawCheckBackgroundFlat(PaintEventArgs e, Rectangle bounds, Color borderColor, Color checkBackground) 97private static void DrawAndFillEllipse(HDC hdc, HPEN borderPen, HBRUSH fieldBrush, Rectangle bounds) 152Rectangle vCross = new( 160Rectangle hCross = new( 196Rectangle check = layout.CheckBounds;
System\Windows\Forms\Controls\Buttons\ButtonRenderer.cs (36)
53public static void DrawParentBackground(Graphics g, Rectangle bounds, Control childControl) 56internal static void DrawParentBackground(IDeviceContext dc, Rectangle bounds, Control childControl) 65/// <inheritdoc cref="DrawButton(Graphics, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, PushButtonState)"/> 66public static void DrawButton(Graphics g, Rectangle bounds, PushButtonState state) => 69internal static void DrawButton(IDeviceContext deviceContext, Rectangle bounds, PushButtonState state) 88Rectangle bounds, 93Rectangle contentBounds; 111contentBounds = Rectangle.Inflate(bounds, -3, -3); 124/// <inheritdoc cref="DrawButton(Graphics, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, PushButtonState)"/> 125public static void DrawButton(Graphics g, Rectangle bounds, bool focused, PushButtonState state) => 128/// <inheritdoc cref="DrawButton(Graphics, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, PushButtonState)"/> 129public static void DrawButton(Graphics g, Rectangle bounds, string? buttonText, Font? font, bool focused, PushButtonState state) 141/// <inheritdoc cref="DrawButton(Graphics, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, PushButtonState)"/> 142public static void DrawButton(Graphics g, Rectangle bounds, string? buttonText, Font? font, TextFormatFlags flags, bool focused, PushButtonState state) 144Rectangle contentBounds; 158contentBounds = Rectangle.Inflate(bounds, -3, -3); 170/// <inheritdoc cref="DrawButton(Graphics, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, PushButtonState)"/> 172public static void DrawButton(Graphics g, Rectangle bounds, Image image, Rectangle imageBounds, bool focused, PushButtonState state) 174Rectangle contentBounds; 188contentBounds = Rectangle.Inflate(bounds, -3, -3); 197/// <inheritdoc cref="DrawButton(Graphics, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, PushButtonState)"/> 200Rectangle bounds, 204Rectangle imageBounds, 222Rectangle bounds, 227Rectangle imageBounds, 234Rectangle bounds, 239Rectangle imageBounds, 243Rectangle contentBounds; 269contentBounds = Rectangle.Inflate(bounds, -3, -3);
System\Windows\Forms\Controls\Buttons\CheckBox.cs (2)
311internal override Rectangle OverChangeRectangle 332internal override Rectangle DownChangeRectangle
System\Windows\Forms\Controls\Buttons\CheckBoxRenderer.cs (21)
38/// <inheritdoc cref="ButtonRenderer.DrawParentBackground(Graphics, Rectangle, Control)"/> 39public static void DrawParentBackground(Graphics g, Rectangle bounds, Control childControl) 49/// <inheritdoc cref="DrawCheckBox(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, CheckBoxState)"/> 58Rectangle glyphBounds = new(glyphLocation, GetGlyphSize(g, state)); 79Rectangle glyphBounds = new(glyphLocation, GetGlyphSize(hdc, state, hwnd)); 83/// <inheritdoc cref="DrawCheckBox(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, CheckBoxState)"/> 87Rectangle textBounds, 101/// <inheritdoc cref="DrawCheckBox(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, CheckBoxState)"/> 105Rectangle textBounds, 115Rectangle textBounds, 123Rectangle glyphBounds = new(glyphLocation, GetGlyphSize(g, state, hwnd)); 155/// <inheritdoc cref="DrawCheckBox(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, CheckBoxState)"/> 159Rectangle textBounds, 163Rectangle imageBounds, 183Rectangle textBounds, 188Rectangle imageBounds, 192Rectangle glyphBounds = new(glyphLocation, GetGlyphSize(g, state));
System\Windows\Forms\Controls\Buttons\RadioButton.cs (2)
283internal override Rectangle OverChangeRectangle 303internal override Rectangle DownChangeRectangle =>
System\Windows\Forms\Controls\Buttons\RadioButtonRenderer.cs (23)
39/// <inheritdoc cref="ButtonRenderer.DrawParentBackground(Graphics, Rectangle, Control)"/> 40public static void DrawParentBackground(Graphics g, Rectangle bounds, Control childControl) 49/// <inheritdoc cref="DrawRadioButton(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, RadioButtonState)" /> 60Rectangle glyphBounds = new(glyphLocation, GetGlyphSize(hdc, state, hwnd)); 70Rectangle glyphBounds; 87/// <inheritdoc cref="DrawRadioButton(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, RadioButtonState)" /> 91Rectangle textBounds, 102/// <inheritdoc cref="DrawRadioButton(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, RadioButtonState)" /> 106Rectangle textBounds, 119Rectangle textBounds, 127Rectangle glyphBounds; 155/// <inheritdoc cref="DrawRadioButton(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, RadioButtonState)" /> 159Rectangle textBounds, 163Rectangle imageBounds, 183Rectangle textBounds, 188Rectangle imageBounds, 206Rectangle textBounds, 211Rectangle imageBounds, 216Rectangle glyphBounds;
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxChildDropDownButtonUiaProvider.cs (1)
44public override unsafe Rectangle Bounds => SystemIAccessible.TryGetLocation(GetChildId());
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxChildListUiaProvider.cs (1)
32internal override Rectangle BoundingRectangle
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxChildTextUiaProvider.cs (1)
34public override Rectangle Bounds
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxItemAccessibleObject.cs (3)
33public override Rectangle Bounds 49return Rectangle.Empty; 178Rectangle listBounds = _owningComboBox.ChildListAccessibleObject.Bounds;
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxUiaTextProvider.cs (6)
40public override Rectangle BoundingRectangle 43: Rectangle.Empty; 245Rectangle rectangle = GetFormattingRectangle(); 261static bool IsDegenerate(Rectangle rect) 378public override Rectangle RectangleToScreen(Rectangle rect) => _owningComboBox.RectangleToScreen(rect);
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (5)
1658Rectangle clientRect = rect; 1806Rectangle rectangle = rect; 1924internal override Rectangle ApplyBoundsConstraints(int suggestedX, int suggestedY, int proposedWidth, int proposedHeight) 3726Rectangle clientRect = rect; 3800Rectangle textBounds = ClientRectangle;
System\Windows\Forms\Controls\ComboBox\ComboBox.FlatComboAdapter.cs (7)
13private Rectangle _outerBorder; 14private Rectangle _innerBorder; 15private Rectangle _innerInnerBorder; 16internal Rectangle _dropDownRect; 17private Rectangle _whiteFillRect; 18private Rectangle _clientRect; 142protected virtual void DrawFlatComboDropDown(ComboBox comboBox, Graphics g, Rectangle dropDownRect)
System\Windows\Forms\Controls\ComboBox\ComboBoxRenderer.cs (12)
30private static void DrawBackground(Graphics g, Rectangle bounds, ComboBoxState state) 41Rectangle fillRect = t_visualStyleRenderer.GetBackgroundContentRectangle(g, bounds); 52public static void DrawTextBox(Graphics g, Rectangle bounds, ComboBoxState state) 62public static void DrawTextBox(Graphics g, Rectangle bounds, string? comboBoxText, Font? font, ComboBoxState state) 70public static void DrawTextBox(Graphics g, Rectangle bounds, string? comboBoxText, Font? font, Rectangle textBounds, ComboBoxState state) 78public static void DrawTextBox(Graphics g, Rectangle bounds, string? comboBoxText, Font? font, TextFormatFlags flags, ComboBoxState state) 82Rectangle textBounds = t_visualStyleRenderer.GetBackgroundContentRectangle(g, bounds); 90public static void DrawTextBox(Graphics g, Rectangle bounds, string? comboBoxText, Font? font, Rectangle textBounds, TextFormatFlags flags, ComboBoxState state) 102public static void DrawDropDownButton(Graphics g, Rectangle bounds, ComboBoxState state) 115internal static void DrawDropDownButtonForHandle(HDC hdc, Rectangle bounds, ComboBoxState state, HWND hwnd)
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (10)
296private Rectangle _normalClientRectangle; 350private Rectangle _resizeClipRectangle; 446TopLeftHeader = Rectangle.Empty, 447ColumnHeaders = Rectangle.Empty, 448RowHeaders = Rectangle.Empty, 2125public override Rectangle DisplayRectangle 2129Rectangle rectDisplay = ClientRectangle; 2705Rectangle rectTmp = _layout.Data; 2709rectTmp = Rectangle.Union(rectTmp, _layout.ColumnHeaders); 3816Invalidate(Rectangle.Union(_layout.Data, _layout.ColumnHeaders));
System\Windows\Forms\Controls\DataGridView\DataGridView.DataGridViewEditingPanelAccessibleObject.cs (1)
23internal override Rectangle BoundingRectangle
System\Windows\Forms\Controls\DataGridView\DataGridView.LayoutData.cs (14)
15public Rectangle ClientRectangle = Rectangle.Empty; 18public Rectangle Inside = Rectangle.Empty; 21public Rectangle RowHeaders = Rectangle.Empty; 24public Rectangle ColumnHeaders = Rectangle.Empty; 27public Rectangle TopLeftHeader = Rectangle.Empty; 30public Rectangle Data = Rectangle.Empty; 33public Rectangle ResizeBoxRect = Rectangle.Empty;
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (130)
2431Rectangle clip = Rectangle.Union(_layout.ColumnHeaders, _layout.Data); 2434clip = Rectangle.Union(_layout.TopLeftHeader, clip); 2455Rectangle cursorClip = _layout.ColumnHeaders; 2535private Rectangle GetResizeClipRectangle(int columnIndex) 2537Rectangle clip = Rectangle.Union(_layout.ColumnHeaders, _layout.Data); 2736Rectangle clip = Rectangle.Union(_layout.RowHeaders, _layout.Data); 2739clip = Rectangle.Union(_layout.TopLeftHeader, clip); 2771Rectangle clip = Rectangle.Union(_layout.RowHeaders, _layout.Data); 2965private Rectangle CalcColRelocationFeedbackRect(int mouseX) 2967Rectangle r, inside = _layout.ColumnHeaders; 2970inside = Rectangle.Union(_layout.TopLeftHeader, inside); 2997private Rectangle CalcColResizeFeedbackRect(int mouseX) 2999Rectangle inside = _layout.Data; 3000Rectangle r = new( 3018private Rectangle CalcRowResizeFeedbackRect(int mouseY) 3020Rectangle inside = _layout.Data; 3021Rectangle r = new( 3374private void CaptureMouse(Rectangle cursorClip) 4359Rectangle oldResizeRect = _layout.ResizeBoxRect; 4366Rectangle inside = newLayout.Inside; 4379Rectangle insideLeft = inside; 4384Rectangle colHeaders = insideLeft; 4393newLayout.ColumnHeaders = Rectangle.Empty; 4398Rectangle rowHeaders = insideLeft; 4415Rectangle topLeft; 4416Rectangle colHeaders = newLayout.ColumnHeaders; 4435newLayout.TopLeftHeader = Rectangle.Empty; 4440newLayout.RowHeaders = Rectangle.Empty; 4441newLayout.TopLeftHeader = Rectangle.Empty; 5422private RECT[]? CreateScrollableRegion(Rectangle scroll) 5482ref Rectangle rectScrollingArea, 5628Rectangle r = CalcColRelocationFeedbackRect(mouseX); 5632Rectangle rectInsertionBar = new(0, _layout.ColumnHeaders.Top, InsertionBarWidth, _layout.ColumnHeaders.Height); 5685Rectangle r = CalcColResizeFeedbackRect(mouseX); 5695Rectangle r = CalcRowResizeFeedbackRect(mouseY); 5699private void DrawShadowRect(Rectangle r) 5720private void DrawSplitBar(Rectangle r) 6068Invalidate(Rectangle.Union(_layout.TopLeftHeader, _layout.ColumnHeaders)); 6421Rectangle rectScreen = Screen.FromControl(this).WorkingArea; 6814internal Rectangle GetCellAdjustedDisplayRectangle(int columnIndex, int rowIndex, bool cutOverflow) 6816Rectangle rect = GetCellDisplayRectangle(columnIndex, rowIndex, cutOverflow); 7040public Rectangle GetCellDisplayRectangle(int columnIndex, int rowIndex, bool cutOverflow) 7042Rectangle rowRect; 7043Rectangle columnRect; 8190public Rectangle GetColumnDisplayRectangle(int columnIndex, bool cutOverflow) 8198private Rectangle GetColumnDisplayRectanglePrivate(int columnIndex, bool cutOverflow) 8204return Rectangle.Empty; 8207Rectangle data = _layout.Data; 8301Rectangle columnRect = RightToLeftInternal 8314return Rectangle.Empty; 8321Rectangle data = _layout.Data; 8561Rectangle rectScrollingArea = _layout.Data; 8578rectScrollingArea = Rectangle.Union(rectScrollingArea, _layout.RowHeaders); 8670rectScrollingArea = Rectangle.Union(rectScrollingArea, _layout.ColumnHeaders); 9020public Rectangle GetRowDisplayRectangle(int rowIndex, bool cutOverflow) 9028private Rectangle GetRowDisplayRectanglePrivate(int rowIndex, bool cutOverflow) 9034return Rectangle.Empty; 9037Rectangle data = _layout.Data; 9088Rectangle rowRect = new(data.X, cy, data.Width, displayHeight); 9102return Rectangle.Empty; 9107Rectangle data = _layout.Data; 9791Rectangle cellDisplayRect = GetCellAdjustedDisplayRectangle(columnIndex, rowIndex, true); 9816Rectangle columnDisplayRect = GetColumnDisplayRectanglePrivate(columnIndex, true); 9860Rectangle rowDisplayRect = GetRowDisplayRectanglePrivate(rowIndex, true); 9893Rectangle rowDisplayRect, data; 10428Rectangle lastSplitBarRect = CalcRowResizeFeedbackRect(_lastRowSplitBar); 10489Invalidate(Rectangle.Union(_layout.TopLeftHeader, _layout.ColumnHeaders)); 10496Rectangle lastSplitBarRect = CalcColResizeFeedbackRect(_lastColSplitBar); 13447Invalidate(Rectangle.Union(_layout.ColumnHeaders, _layout.Data)); 13910Invalidate(Rectangle.Union(_layout.TopLeftHeader, _layout.ColumnHeaders)); 14487Rectangle rightArea = _layout.Data; 14490rightArea = Rectangle.Union(rightArea, _layout.ColumnHeaders); 16678Rectangle clipRect = e.ClipRectangle; 16679Rectangle gridRect = GetGridRectangle(); 16683clipRect = Rectangle.Union(clipRect, CalcRowResizeFeedbackRect(_currentRowSplitBar)); 16687clipRect = Rectangle.Union(clipRect, CalcColResizeFeedbackRect(_currentColSplitBar)); 16735private Rectangle GetGridRectangle() 16737Rectangle gridRect = _layout.Data; 16740gridRect = Rectangle.Union(gridRect, _layout.RowHeaders); 16754gridRect = Rectangle.Union(gridRect, _layout.ColumnHeaders); 16769private Rectangle GetGridFocusRectangle() 16771Rectangle focusRect = GetGridRectangle(); 16783Rectangle focusRect = GetGridFocusRectangle(); 16819private void InvalidateRectangleEdges(Rectangle rect) 16822Rectangle edge = rect; 17435Rectangle right; 17436Rectangle bottom; 17437Rectangle oldClientRectangle = _layout.ClientRectangle; 17438Rectangle oldGridFocusRectangle = GetGridFocusRectangle(); 17455Rectangle newClientRectangle = _normalClientRectangle; 17456Rectangle newGridFocusRectangle = DisplayRectangle; 18184Invalidate(Rectangle.Union(_layout.TopLeftHeader, _layout.RowHeaders)); 18817Rectangle rect = Screen.GetBounds(pt); 19201protected virtual void PaintBackground(Graphics graphics, Rectangle clipBounds, Rectangle gridBounds) 19204Rectangle rcBelowRows = gridBounds; 19230Rectangle rcNextRows = gridBounds; 19272private void PaintBorder(Graphics g, Rectangle clipRect, Rectangle bounds) 19284Rectangle edge = new(0, 0, bounds.Width, borderWidth); 19333private void PaintColumnHeaders(Graphics g, Rectangle clipBounds, bool singleBorderAdded) 19337Rectangle bandBounds, cellBounds; 19402Rectangle scrollingBounds = bandBounds; 19416Rectangle rowRect = bandBounds; 19487Rectangle gridBounds, 19488Rectangle clipRect, 19492Rectangle rc = gridBounds; 19507Rectangle columnHeadersClip = _layout.ColumnHeaders; 19551Rectangle boundingRect, 19552Rectangle clipRect, 19557Rectangle rowBounds; 19679Rectangle cellBounds = _layout.TopLeftHeader; 19804Rectangle editingZone = _layout.Data; 19820Rectangle cellBounds = new(leftEdge, GetRowYFromIndex(_ptCurrentCell.Y), 19822Rectangle cellClip = cellBounds; 25592Cursor.Clip = Rectangle.Empty; 25863Invalidate(Rectangle.Union(_layout.TopLeftHeader, _layout.ColumnHeaders)); 26328Rectangle rowsRect = _layout.Data; 26331rowsRect = Rectangle.Union(rowsRect, _layout.RowHeaders); 28949Rectangle rectUpper = GetCellAdjustedDisplayRectangle(-1, rowIndexStart, true); 28950Rectangle rectLower = GetCellAdjustedDisplayRectangle(-1, rowIndexEnd, true); 28960Invalidate(Rectangle.Union(rectUpper, rectLower)); 28999Rectangle bottomArea = _layout.Data; 29002bottomArea = Rectangle.Union(bottomArea, _layout.RowHeaders); 29074Rectangle bottomArea = _layout.Data; 29077bottomArea = Rectangle.Union(bottomArea, _layout.RowHeaders);
System\Windows\Forms\Controls\DataGridView\DataGridView.TopRowAccessibleObject.cs (4)
26public override Rectangle Bounds 37Rectangle rect = Rectangle.Union(_ownerDataGridView._layout.ColumnHeaders, _ownerDataGridView._layout.TopLeftHeader); 41return Rectangle.Empty;
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (29)
27private static Rectangle s_rectThemeMargins = new(-1, -1, 0, 0); 149protected override Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 155return Rectangle.Empty; 162out Rectangle cellBounds); 164Rectangle contentBounds = PaintPrivate( 181Rectangle contentBoundsDebug = PaintPrivate( 214protected override Rectangle GetErrorIconBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 224return Rectangle.Empty; 231out Rectangle cellBounds); 233Rectangle errorIconBounds = PaintPrivate( 250Rectangle errorIconBoundsDebug = PaintPrivate( 290Rectangle borderWidthsRect = StdBorderWidths; 306Rectangle rectThemeMargins = GetThemeMargins(graphics); 408private static Rectangle GetThemeMargins(Graphics g) 412Rectangle rectCell = new(0, 0, DATAGRIDVIEWBUTTONCELL_themeMargin, DATAGRIDVIEWBUTTONCELL_themeMargin); 413Rectangle rectContent = DataGridViewButtonCellRenderer.DataGridViewButtonRenderer.GetBackgroundContentRectangle(g, rectCell); 598Rectangle clipBounds, 599Rectangle cellBounds, 635private Rectangle PaintPrivate( 637Rectangle clipBounds, 638Rectangle cellBounds, 662Rectangle resultBounds; 675Rectangle valBounds = cellBounds; 676Rectangle borderWidths = BorderWidths(advancedBorderStyle); 684return Rectangle.Empty; 708Rectangle errorBounds = valBounds; 867resultBounds = Rectangle.Empty; 873resultBounds = Rectangle.Empty; 887ControlPaint.DrawFocusRectangle(g, Rectangle.Inflate(valBounds, -1, -1), Color.Empty, cellStyle.ForeColor);
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.DataGridViewButtonCellRenderer.cs (2)
25public static void DrawButton(Graphics g, Rectangle bounds, int buttonState) 28DataGridViewButtonRenderer.DrawBackground(g, bounds, Rectangle.Truncate(g.ClipBounds));
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (45)
53private readonly List<Rectangle> _nonEmptyNeighbors; 105public Rectangle ContentBounds => GetContentBounds(RowIndex); 187public Rectangle ErrorIconBounds => GetErrorIconBounds(RowIndex); 283Rectangle IKeyboardToolTip.GetNativeScreenRectangle() => AccessibilityObject.Bounds; 294IList<Rectangle> IKeyboardToolTip.GetNeighboringToolsRectangles() 585private protected Rectangle StdBorderWidths 603return Rectangle.Empty; 821protected virtual Rectangle BorderWidths(DataGridViewAdvancedBorderStyle advancedBorderStyle) 825Rectangle rect = new Rectangle 948out Rectangle cellBounds) 1006internal Rectangle ComputeErrorIconBounds(Rectangle cellValueBounds) 1011Rectangle bmpRect = new(DataGridView!.RightToLeftInternal ? 1021return Rectangle.Empty; 1452public Rectangle GetContentBounds(int rowIndex) 1456return Rectangle.Empty; 1465protected virtual Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) => Rectangle.Empty; 1519internal Rectangle GetErrorIconBounds(int rowIndex) 1526protected virtual Rectangle GetErrorIconBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) => Rectangle.Empty; 2744Rectangle contentBounds = GetContentBounds(screen, dataGridViewCellStyle, rowIndex); 3059Rectangle clipBounds, 3060Rectangle cellBounds, 3074Rectangle clipBounds, 3075Rectangle cellBounds, 3111Rectangle clipBounds, 3112Rectangle bounds, 3516Rectangle clipBounds, 3517Rectangle cellValueBounds, 3535private static void PaintErrorIcon(Graphics graphics, Rectangle iconBounds) 3551Rectangle cellBounds, 3552Rectangle cellValueBounds, 3559Rectangle iconBounds = GetErrorIconBounds(graphics, cellStyle, rowIndex); 3581Rectangle bounds, 3586Rectangle rectPadding; 3621Rectangle clipBounds, 3622Rectangle cellBounds, 3739Rectangle cellBounds, 3740Rectangle cellClip, 3747Rectangle editingControlBounds = PositionEditingPanel( 3772public virtual Rectangle PositionEditingPanel( 3773Rectangle cellBounds, 3774Rectangle cellClip, 3796Rectangle borderAndPaddingWidths = BorderWidths(dgvabsEffective);
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.DataGridViewCellAccessibleObject.cs (7)
29public override Rectangle Bounds => GetAccessibleObjectBounds(GetAccessibleObjectParent()); 154Rectangle cellBounds; 310internal Rectangle GetAccessibleObjectBounds(AccessibleObject? parentAccObject) 322return Rectangle.Empty; 325Rectangle rowRect = parentAccObject.Bounds; 326Rectangle cellRect = rowRect; 327Rectangle columnRect = _owner.DataGridView.RectangleToScreen(
System\Windows\Forms\Controls\DataGridView\DataGridViewCellPaintingEventArgs.cs (9)
16Rectangle clipBounds, 17Rectangle cellBounds, 58public Rectangle CellBounds { get; private set; } 60public Rectangle ClipBounds { get; private set; } 78public void Paint(Rectangle clipBounds, DataGridViewPaintParts paintParts) 107public void PaintBackground(Rectangle clipBounds, bool cellsPaintSelectionBackground) 142public void PaintContent(Rectangle clipBounds) 173Rectangle clipBounds, 174Rectangle cellBounds,
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (26)
444protected override Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 450return Rectangle.Empty; 457out Rectangle cellBounds); 459Rectangle checkBoxBounds = PaintPrivate( 476Rectangle checkBoxBoundsDebug = PaintPrivate( 506protected override Rectangle GetErrorIconBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 516return Rectangle.Empty; 525return Rectangle.Empty; 532out Rectangle cellBounds); 534Rectangle errorIconBounds = PaintPrivate( 649Rectangle borderWidthsRect = StdBorderWidths; 734Rectangle borderWidths = BorderWidths(dgvabsEffective); 997Rectangle clipBounds, 998Rectangle cellBounds, 1039private Rectangle PaintPrivate( 1041Rectangle clipBounds, 1042Rectangle cellBounds, 1063Rectangle resultBounds; 1070Rectangle valBounds = cellBounds; 1071Rectangle borderWidths = BorderWidths(advancedBorderStyle); 1154Rectangle errorBounds = valBounds; 1286Rectangle checkBounds = new(checkBoxX, checkBoxY, checkBoxSize.Width, checkBoxSize.Height); 1344Rectangle fullSize = new(checkBoxX - 1, checkBoxY - 1, checkBoxSize.Width + 3, checkBoxSize.Height + 3); 1389Rectangle checkBounds = new(checkBoxX, checkBoxY, checkBoxSize.Width - 1, checkBoxSize.Height - 1); 1548resultBounds = Rectangle.Empty; 1554resultBounds = Rectangle.Empty;
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.DataGridViewCheckBoxCellRenderer.cs (2)
25public static void DrawCheckBox(Graphics g, Rectangle bounds, int state) 28CheckBoxRenderer.DrawBackground(g, bounds, Rectangle.Truncate(g.ClipBounds));
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (18)
211protected override Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 219return Rectangle.Empty; 234out Rectangle cellBounds); 236Rectangle contentBounds = PaintPrivate( 249Rectangle contentBoundsDebug = PaintPrivate( 497Rectangle borderWidthsRect = BorderWidths(dgvabsEffective); 690Rectangle rectThemeMargins = GetThemeMargins(graphics); 713Rectangle clipBounds, 714Rectangle cellBounds, 743private Rectangle PaintPrivate( 745Rectangle clipBounds, 746Rectangle cellBounds, 756Rectangle contentBounds = Rectangle.Empty; 763Rectangle valBounds = cellBounds; 764Rectangle borderWidths = BorderWidths(advancedBorderStyle); 769Rectangle backgroundBounds = valBounds; 849Rectangle rectThemeMargins = GetThemeMargins(g);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.DataGridViewColumnHeaderCellAccessibleObject.cs (2)
30public override Rectangle Bounds => Owner is null 32: (Owner.DataGridView?.IsHandleCreated == true) ? GetAccessibleObjectBounds(Parent) : Rectangle.Empty;
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.DataGridViewColumnHeaderCellRenderer.cs (4)
25public static void DrawHeader(Graphics g, Rectangle bounds, int headerState) 27Rectangle rectClip = Rectangle.Truncate(g.ClipBounds); 32Rectangle cornerClip = new(bounds.Left, bounds.Bottom - 2, 2, 2);
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (35)
531Rectangle borderAndPaddingWidths = BorderWidths(dgvabsEffective); 728protected override Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 734return Rectangle.Empty; 748out Rectangle cellBounds); 750Rectangle contentBounds = PaintPrivate( 768Rectangle contentBoundsDebug = PaintPrivate( 831protected override Rectangle GetErrorIconBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 841return Rectangle.Empty; 851ComputeBorderStyleCellStateAndCellBounds(rowIndex, out DataGridViewAdvancedBorderStyle dgvabsEffective, out DataGridViewElementStates cellState, out Rectangle cellBounds); 853Rectangle errorIconBounds = PaintPrivate( 863out Rectangle dropDownButtonRect, // not used 871Rectangle errorIconBoundsDebug = PaintPrivate( 1173Rectangle borderWidthsRect = StdBorderWidths; 1328Rectangle rectBottomSection = DataGridView.GetCellDisplayRectangle(ColumnIndex, rowIndex, true); 1760Rectangle cellBounds = DataGridView.GetCellDisplayRectangle(OwningColumn.Index, rowIndex, cutOverflow: false); 1771Rectangle dropDownButtonRect; 1811Rectangle clipBounds, 1812Rectangle cellBounds, 1852private Rectangle PaintPrivate( 1854Rectangle clipBounds, 1855Rectangle cellBounds, 1862out Rectangle dropDownButtonRect, 1880Rectangle resultBounds = Rectangle.Empty; 1881dropDownButtonRect = Rectangle.Empty; 1909Rectangle borderWidths = BorderWidths(advancedBorderStyle); 1910Rectangle valBounds = cellBounds; 2005Rectangle dropRect; 2205Rectangle errorBounds = valBounds; 2206Rectangle textBounds = Rectangle.Inflate(valBounds, -2, -2); 2254Rectangle focusBounds = textBounds; 2267Rectangle focusBounds = textBounds; 2353return Rectangle.Empty; 2366resultBounds = Rectangle.Empty;
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.DataGridViewComboBoxCellRenderer.cs (5)
30public static void DrawTextBox(Graphics g, Rectangle bounds, ComboBoxState state) 35public static void DrawDropDownButton(Graphics g, Rectangle bounds, ComboBoxState state) 41public static void DrawBorder(Graphics g, Rectangle bounds) 55public static void DrawDropDownButton(Graphics g, Rectangle bounds, ComboBoxState state, bool rightToLeft) 69public static void DrawReadOnlyButton(Graphics g, Rectangle bounds, ComboBoxState state)
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (10)
19private static Rectangle s_rectThemeMargins = new(-1, -1, 0, 0); 74return DataGridView.LayoutInfo.TopLeftHeader != Rectangle.Empty; 294if (DataGridView.LayoutInfo.TopLeftHeader != Rectangle.Empty) 381internal static Rectangle GetThemeMargins(Graphics g) 385Rectangle rectCell = new(0, 0, ThemeMargin, ThemeMargin); 386Rectangle rectContent = DataGridViewHeaderCellRenderer.VisualStyleRenderer.GetBackgroundContentRectangle(g, rectCell); 516Rectangle clipBounds, 517Rectangle cellBounds, 536Rectangle bounds = cellBounds; 537Rectangle borderWidths = BorderWidths(advancedBorderStyle);
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (32)
225protected override Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 231return Rectangle.Empty; 247out Rectangle cellBounds); 249Rectangle imgBounds = PaintPrivate( 265Rectangle imgBoundsDebug = PaintPrivate( 287protected override Rectangle GetErrorIconBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 297return Rectangle.Empty; 313out Rectangle cellBounds); 315Rectangle errBounds = PaintPrivate( 331Rectangle errBoundsDebug = PaintPrivate(graphics, 409Rectangle borderWidthsRect = StdBorderWidths; 568private Rectangle ImageBounds( 569Rectangle bounds, 578Rectangle imageBounds = Rectangle.Empty; 679Rectangle clipBounds, 680Rectangle cellBounds, 716private Rectangle PaintPrivate( 718Rectangle clipBounds, 719Rectangle cellBounds, 743Rectangle resultBounds = Rectangle.Empty; 744Rectangle valBounds = cellBounds; 745Rectangle borderWidths = BorderWidths(advancedBorderStyle); 755? Rectangle.Empty 761return Rectangle.Empty; 765Rectangle imageBounds = valBounds; 794return Rectangle.Empty; 842Rectangle imageBounds2 = ImageBounds( 867g.SetClip(Rectangle.Intersect( 868Rectangle.Intersect(imageBounds2, imageBounds), 869Rectangle.Truncate(g.VisibleClipBounds)));
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (21)
420protected override Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 426return Rectangle.Empty; 442out Rectangle cellBounds); 444Rectangle linkBounds = PaintPrivate( 460Rectangle linkBoundsDebug = PaintPrivate( 487protected override Rectangle GetErrorIconBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 497return Rectangle.Empty; 513out Rectangle cellBounds); 515Rectangle errorIconBounds = PaintPrivate( 547Rectangle borderWidthsRect = StdBorderWidths; 834Rectangle clipBounds, 835Rectangle cellBounds, 871private Rectangle PaintPrivate( 873Rectangle clipBounds, 874Rectangle cellBounds, 899Rectangle resultBounds = Rectangle.Empty; 901Rectangle borderWidths = BorderWidths(advancedBorderStyle); 902Rectangle valBounds = cellBounds; 935Rectangle errorBounds = valBounds; 981Rectangle focusBounds = DataGridViewUtilities.GetTextBounds(
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (13)
1176Rectangle clipBounds, 1177Rectangle bounds, 1411Rectangle clipBounds, 1412Rectangle rowBounds, 1446Rectangle updatedClipBounds = dgvrprepe.ClipBounds; 1486Rectangle clipBounds, 1487Rectangle rowBounds, 1507Rectangle cellBounds = rowBounds; 1578Rectangle dataBounds = rowBounds; 1595Rectangle rowRect = rowBounds; 1679Rectangle clipBounds, 1680Rectangle rowBounds, 1702Rectangle cellBounds = rowBounds;
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.DataGridViewRowAccessibleObject.cs (5)
39public override Rectangle Bounds 50return Rectangle.Empty; 53Rectangle rowRect = _owningDataGridViewRow.DataGridView.RectangleToScreen(_owningDataGridViewRow.DataGridView.GetRowDisplayRectangle(_owningDataGridViewRow.Index, cutOverflow: false)); 61Rectangle dataGridViewRect = ParentPrivate!.Bounds; 197Rectangle rowBounds = _owningDataGridViewRow.DataGridView.GetRowDisplayRectangle(_owningDataGridViewRow.Index, cutOverflow: true);
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (26)
183protected override Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 189return Rectangle.Empty; 204out Rectangle cellBounds); 206Rectangle contentBounds = PaintPrivate( 222Rectangle contentBoundsDebug = PaintPrivate( 242protected override Rectangle GetErrorIconBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 251return Rectangle.Empty; 258out Rectangle cellBounds); 269Rectangle errorBounds = PaintPrivate( 529Rectangle borderWidthsRect = BorderWidths(dgvabsEffective); 538Rectangle rectThemeMargins = GetThemeMargins(graphics); 575Rectangle clipBounds, 576Rectangle cellBounds, 612private Rectangle PaintPrivate( 614Rectangle clipBounds, 615Rectangle cellBounds, 638Rectangle resultBounds = Rectangle.Empty; 645Rectangle valBounds = cellBounds; 646Rectangle borderWidths = BorderWidths(advancedBorderStyle); 651Rectangle backgroundBounds = valBounds; 657return Rectangle.Empty; 715Rectangle rectThemeMargins = GetThemeMargins(graphics); 766Rectangle errorBounds = valBounds; 1024Rectangle bounds, 1033Rectangle bmpRect = new(width, height, s_iconsWidth, s_iconsHeight);
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.DataGridViewRowHeaderCellAccessibleObject.cs (4)
18public override Rectangle Bounds 29return Rectangle.Empty; 33Rectangle rowRect = ParentPrivate.Bounds; 34Rectangle cellRect = rowRect;
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.DataGridViewRowHeaderCellRenderer.cs (2)
25public static void DrawHeader(Graphics g, Rectangle bounds, int headerState) 28VisualStyleRenderer.DrawBackground(g, bounds, Rectangle.Truncate(g.ClipBounds));
System\Windows\Forms\Controls\DataGridView\DataGridViewRowPostPaintEventArgs.cs (10)
15Rectangle clipBounds, 16Rectangle rowBounds, 46public Rectangle ClipBounds { get; set; } 48public Rectangle RowBounds { get; private set; } 62public void DrawFocus(Rectangle bounds, bool cellsPaintSelectionBackground) 79public void PaintCells(Rectangle clipBounds, DataGridViewPaintParts paintParts) 97public void PaintCellsBackground(Rectangle clipBounds, bool cellsPaintSelectionBackground) 121public void PaintCellsContent(Rectangle clipBounds) 170Rectangle clipBounds, 171Rectangle rowBounds,
System\Windows\Forms\Controls\DataGridView\DataGridViewRowPrePaintEventArgs.cs (10)
17Rectangle clipBounds, 18Rectangle rowBounds, 49public Rectangle ClipBounds { get; set; } 51public Rectangle RowBounds { get; private set; } 79public void DrawFocus(Rectangle bounds, bool cellsPaintSelectionBackground) 96public void PaintCells(Rectangle clipBounds, DataGridViewPaintParts paintParts) 114public void PaintCellsBackground(Rectangle clipBounds, bool cellsPaintSelectionBackground) 138public void PaintCellsContent(Rectangle clipBounds) 187Rectangle clipBounds, 188Rectangle rowBounds,
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (26)
137private Rectangle GetAdjustedEditingControlBounds(Rectangle editingControlBounds, DataGridViewCellStyle cellStyle) 256protected override Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 262return Rectangle.Empty; 278out Rectangle cellBounds); 280Rectangle textBounds = PaintPrivate( 296Rectangle textBoundsDebug = PaintPrivate( 323protected override Rectangle GetErrorIconBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 333return Rectangle.Empty; 340out Rectangle cellBounds); 342Rectangle errorBounds = PaintPrivate(graphics, 366Rectangle errorBoundsDebug = PaintPrivate(graphics, 399Rectangle borderWidthsRect = StdBorderWidths; 597Rectangle clipBounds, 598Rectangle cellBounds, 639private Rectangle PaintPrivate( 641Rectangle clipBounds, 642Rectangle cellBounds, 664Rectangle resultBounds = Rectangle.Empty; 671Rectangle borderWidths = BorderWidths(advancedBorderStyle); 672Rectangle valBounds = cellBounds; 717Rectangle errorBounds = valBounds; 783Rectangle cellBounds, 784Rectangle cellClip, 791Rectangle editingControlBounds = PositionEditingPanel(
System\Windows\Forms\Controls\DataGridView\DataGridViewTopLeftHeaderCell.cs (23)
26protected override Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 34return Rectangle.Empty; 45ComputeBorderStyleCellStateAndCellBounds(rowIndex, out DataGridViewAdvancedBorderStyle dgvabsEffective, out DataGridViewElementStates cellState, out Rectangle cellBounds); 47Rectangle contentBounds = PaintPrivate( 63Rectangle contentBoundsDebug = PaintPrivate( 83protected override Rectangle GetErrorIconBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 89return Rectangle.Empty; 94ComputeBorderStyleCellStateAndCellBounds(rowIndex, out DataGridViewAdvancedBorderStyle dgvabsEffective, out DataGridViewElementStates cellState, out Rectangle cellBounds); 96Rectangle errorBounds = PaintPrivate( 114Rectangle errorBoundsDebug = PaintPrivate( 145Rectangle borderWidthsRect = BorderWidths(DataGridView.AdjustedTopLeftHeaderBorderStyle); 167Rectangle clipBounds, 168Rectangle cellBounds, 204private Rectangle PaintPrivate( 206Rectangle clipBounds, 207Rectangle cellBounds, 230Rectangle resultBounds = Rectangle.Empty; 232Rectangle valBounds = cellBounds; 233Rectangle borderWidths = BorderWidths(advancedBorderStyle); 296Rectangle errorBounds = valBounds; 358Rectangle clipBounds, 359Rectangle bounds,
System\Windows\Forms\Controls\DataGridView\DataGridViewTopLeftHeaderCell.DataGridViewTopLeftHeaderCellAccessibleObject.cs (3)
18public override Rectangle Bounds 29return Rectangle.Empty; 32Rectangle cellRect = Owner.DataGridView.GetCellDisplayRectangle(-1, -1, cutOverflow: false);
System\Windows\Forms\Controls\DataGridView\DataGridViewTopLeftHeaderCell.DataGridViewTopLeftHeaderCellRenderer.cs (2)
25public static void DrawHeader(Graphics g, Rectangle bounds, int headerState) 28VisualStyleRenderer.DrawBackground(g, bounds, Rectangle.Truncate(g.ClipBounds));
System\Windows\Forms\Controls\DataGridView\DataGridViewUtilities.cs (5)
304internal static Rectangle GetTextBounds( 305Rectangle cellBounds, 313internal static Rectangle GetTextBounds( 314Rectangle cellBounds, 350Rectangle cellBounds,
System\Windows\Forms\Controls\DateTimePicker\DateTimePicker.cs (1)
1012internal override Rectangle ApplyBoundsConstraints(int suggestedX, int suggestedY, int proposedWidth, int proposedHeight)
System\Windows\Forms\Controls\GroupBox\GroupBox.cs (2)
142public override Rectangle DisplayRectangle 462Rectangle textRectangle = ClientRectangle;
System\Windows\Forms\Controls\GroupBox\GroupBoxRenderer.cs (18)
50public static void DrawParentBackground(Graphics g, Rectangle bounds, Control childControl) 62public static void DrawGroupBox(Graphics g, Rectangle bounds, GroupBoxState state) 77public static void DrawGroupBox(Graphics g, Rectangle bounds, string? groupBoxText, Font? font, GroupBoxState state) 85Rectangle bounds, 97Rectangle bounds, 106Rectangle bounds, 127Rectangle bounds, 137Rectangle bounds, 157private static void DrawThemedGroupBoxNoText(Graphics g, Rectangle bounds, GroupBoxState state) 168Rectangle bounds, 178Rectangle textBounds = bounds; 205Rectangle boxBounds = bounds; 213Rectangle clipLeft = boxBounds; 214Rectangle clipMiddle = boxBounds; 215Rectangle clipRight = boxBounds; 246private static void DrawUnthemedGroupBoxNoText(Graphics g, Rectangle bounds) 274Rectangle bounds, 281Rectangle textBounds = bounds;
System\Windows\Forms\Controls\Labels\Label.cs (10)
871protected Rectangle CalcImageRenderBounds(Image image, Rectangle r, ContentAlignment align) 964private void DrawImage(PaintEventArgs e, Image image, Rectangle r, ContentAlignment align) 980protected void DrawImage(Graphics g, Image image, Rectangle r, ContentAlignment align) 983private void DrawImageInternal(Graphics g, Image image, Rectangle r, ContentAlignment align) 985Rectangle loc = CalcImageRenderBounds(image, r, align); 1252Rectangle face = LayoutUtils.DeflateRect(ClientRectangle, Padding); 1269Rectangle clientRect = ClientRectangle; 1349private protected override void PrintToMetaFileRecursive(HDC hDC, IntPtr lParam, Rectangle bounds) 1433Rectangle rectInScreen = RectangleToScreen(new Rectangle(0, 0, Width, Height));
System\Windows\Forms\Controls\Labels\LinkLabel.cs (14)
145private Rectangle ClientRectWithPadding => LayoutUtils.DeflateRect(ClientRectangle, Padding); 372internal static Rectangle CalcTextRenderBounds(Rectangle textRect, Rectangle clientRect, ContentAlignment align) 559Rectangle clientRectWithPadding = ClientRectWithPadding; 583Rectangle visualRectangle = new( 984Rectangle clientRect = ClientRectWithPadding; 1078focusRectangle = CalcTextRenderBounds(Rectangle.Round(focusRectangle), ClientRectWithPadding, RtlTranslateContent(TextAlign)); 1133Rectangle clientRectWidthPadding = ClientRectWithPadding; 1154Rectangle imageBounds = CalcImageRenderBounds(image, ClientRectangle, RtlTranslateAlignment(ImageAlign)); 1298Rectangle clientAreaMinusPadding = ClientRectWithPadding; 1324ControlPaint.DrawFocusRectangle(g, Rectangle.Ceiling(focusRectangle), ForeColor, BackColor); 1330ControlPaint.DrawFocusRectangle(g, Rectangle.Ceiling(rect), ForeColor, BackColor); 1362Rectangle clientRectWithPadding = ClientRectWithPadding;
System\Windows\Forms\Controls\Labels\LinkLabel.Link.LinkAccessibleObject.cs (5)
27public override Rectangle Bounds 33return Rectangle.Empty; 46return Rectangle.Empty; 50Rectangle rect; 51rect = Rectangle.Ceiling(region.GetBounds(graphics));
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (6)
496Rectangle bounds = e.Bounds; 540Rectangle box = new( 569Rectangle textBounds = new( 628Rectangle stringBounds = new( 720Rectangle bounds = e.Bounds; 721Rectangle emptyRectangle = new(
System\Windows\Forms\Controls\ListBoxes\ListBox.AccessibleObject.cs (2)
31internal override Rectangle BoundingRectangle => this.IsOwnerHandleCreated(out ListBox? owner) ? 32owner.GetToolNativeScreenRectangle() : Rectangle.Empty;
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (6)
1440public Rectangle GetItemRectangle(int index) 1446return Rectangle.Empty; 1457protected override Rectangle GetScaledBounds(Rectangle bounds, SizeF factor, BoundsSpecified specified) 2325Rectangle rect = new(0, 0, Size.Width - 1, Size.Height - 1); 2352Rectangle bounds = dis->rcItem;
System\Windows\Forms\Controls\ListBoxes\ListBox.ItemAccessibleObject.cs (4)
53public override Rectangle Bounds 59return Rectangle.Empty; 62Rectangle bounds = _owningListBox.GetItemRectangle(CurrentIndex); 70Rectangle visibleArea = _owningListBox.RectangleToScreen(_owningListBox.ClientRectangle);
System\Windows\Forms\Controls\ListView\DrawListViewColumnHeaderEventArgs.cs (5)
20Rectangle bounds, 46public Rectangle Bounds { get; } 101Rectangle r = Bounds; 143Rectangle newBounds = Rectangle.Inflate(Bounds, -padding, 0);
System\Windows\Forms\Controls\ListView\DrawListViewItemEventArgs.cs (5)
19Rectangle bounds, 43public Rectangle Bounds { get; } 94private Rectangle UpdateBounds(Rectangle originalBounds, bool drawText) 96Rectangle resultBounds = originalBounds;
System\Windows\Forms\Controls\ListView\DrawListViewSubItemEventArgs.cs (6)
18Rectangle bounds, 54public Rectangle Bounds { get; } 104public void DrawFocusRectangle(Rectangle bounds) 113ControlPaint.DrawFocusRectangle(Graphics, Rectangle.Inflate(bounds, -1, -1), Item.ForeColor, Item.BackColor); 141Rectangle newBounds = Rectangle.Inflate(Bounds, -padding, 0);
System\Windows\Forms\Controls\ListView\ListView.cs (23)
2637Rectangle itemBounds = GetItemRectOrEmpty(itemIndex); 2723Rectangle subItemBounds = GetSubItemRect(itemIndex, nmcd->iSubItem); 3239Rectangle itemBounds = lvi.Bounds; 3245Rectangle iconBounds = GetItemRect(lvi.Index, ItemBoundsPortion.Icon); 3574public Rectangle GetItemRect(int index) => GetItemRect(index, 0); 3579public Rectangle GetItemRect(int index, ItemBoundsPortion portion) 3589return Rectangle.Empty; 3602: (Rectangle)itemrect; 3609private Rectangle GetItemRectOrEmpty(int index) 3613return Rectangle.Empty; 3618return Rectangle.Empty; 3627? Rectangle.Empty 3628: (Rectangle)itemrect; 3634internal Rectangle GetSubItemRect(int itemIndex, int subItemIndex) 3639internal Rectangle GetSubItemRect(int itemIndex, int subItemIndex, ItemBoundsPortion portion) 3643return Rectangle.Empty; 3665return Rectangle.Empty; 3679: (Rectangle)itemrect; 5045Rectangle rectInvalid = Items[startIndex].Bounds; 5048rectInvalid = Rectangle.Union(rectInvalid, Items[index].Bounds); 5053rectInvalid = Rectangle.Union(rectInvalid, Items[startIndex - 1].Bounds); 5064rectInvalid = Rectangle.Union(rectInvalid, Items[endIndex + 1].Bounds); 6960Rectangle rect = new(0, 0, Size.Width - 1, Size.Height - 1);
System\Windows\Forms\Controls\ListView\ListView.ListViewAccessibleObject.cs (2)
22internal override Rectangle BoundingRectangle 32return Rectangle.Empty;
System\Windows\Forms\Controls\ListView\ListViewGroup.ListViewGroupAccessibleObject.cs (4)
34public override Rectangle Bounds 40return Rectangle.Empty; 46return Rectangle.Empty; 63Rectangle listViewBounds = _owningListView.AccessibilityObject.Bounds;
System\Windows\Forms\Controls\ListView\ListViewInsertionMark.cs (1)
52public Rectangle Bounds
System\Windows\Forms\Controls\ListView\ListViewItem.cs (3)
306public Rectangle Bounds 955Rectangle r = Bounds; 966public Rectangle GetBounds(ItemBoundsPortion portion)
System\Windows\Forms\Controls\ListView\ListViewItem.IKeyboardToolTip.cs (12)
20Rectangle IKeyboardToolTip.GetNativeScreenRectangle() => GetNativeRectangle(Index); 22IList<Rectangle> IKeyboardToolTip.GetNeighboringToolsRectangles() 24List<Rectangle> neighboringRectangles = []; 82private Rectangle GetNativeRectangle(int index) 86return Rectangle.Empty; 92return Rectangle.Empty; 95Rectangle itemBounds = _listView.GetItemRect(index, ItemBoundsPortion.Label); 96Rectangle listviewBounds = _listView.AccessibilityObject.Bounds; 107private static Rectangle GetDetailsListRectangle(Point point, ListViewItem item, Rectangle itemBounds) 118private Rectangle GetTileRectangle(Point point, ListViewItem item, Rectangle itemBounds)
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemBaseAccessibleObject.cs (4)
39public override Rectangle Bounds 41? Rectangle.Empty 200internal virtual Rectangle GetSubItemBounds(int index) => Rectangle.Empty;
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemDetailsAccessibleObject.cs (2)
177internal override Rectangle GetSubItemBounds(int accessibleChildIndex) 180: Rectangle.Empty;
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemImageAccessibleObject.cs (3)
21public override Rectangle Bounds 25Rectangle imageRectangle = GetImageRectangle(); 54internal Rectangle GetImageRectangle() => _owningItem.ListView!.GetItemRect(_owningItem.Index, ItemBoundsPortion.Icon);
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemListAccessibleObject.cs (2)
17public override Rectangle Bounds 19? Rectangle.Empty
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemTileAccessibleObject.cs (2)
124internal override Rectangle GetSubItemBounds(int subItemIndex) 127: Rectangle.Empty;
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemWithImageAccessibleObject.cs (2)
98internal override Rectangle GetSubItemBounds(int accessibleChildIndex) 101: Rectangle.Empty;
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItem.cs (2)
95public Rectangle Bounds 105return Rectangle.Empty;
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObject.cs (4)
32public override Rectangle Bounds 39return Rectangle.Empty; 42Rectangle bounds = ParentInternal.GetSubItemBounds(index); 60return Rectangle.Empty;
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.CalendarAccessibleObject.cs (1)
53public override Rectangle Bounds
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.CalendarBodyAccessibleObject.cs (1)
45public override Rectangle Bounds
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.CalendarCellAccessibleObject.cs (1)
52public override Rectangle Bounds
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.CalendarHeaderAccessibleObject.cs (1)
43public override Rectangle Bounds
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.CalendarNextButtonAccessibleObject.cs (1)
28public override Rectangle Bounds
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.CalendarPreviousButtonAccessibleObject.cs (1)
28public override Rectangle Bounds
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.CalendarRowAccessibleObject.cs (1)
48public override Rectangle Bounds
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.CalendarTodayLinkAccessibleObject.cs (1)
29public override Rectangle Bounds
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (1)
1650Rectangle oldBounds = Bounds;
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (4)
337private Rectangle ImageRectangle => ImageRectangleFromSizeMode(_sizeMode); 339private Rectangle ImageRectangleFromSizeMode(PictureBoxSizeMode mode) 341Rectangle result = LayoutUtils.DeflateRect(ClientRectangle, Padding); 1127Rectangle drawingRect = _imageInstallationType == ImageInstallationType.ErrorOrInitial
System\Windows\Forms\Controls\ProgressBar\ProgressBarRenderer.cs (4)
27public static void DrawHorizontalBar(Graphics g, Rectangle bounds) 37public static void DrawVerticalBar(Graphics g, Rectangle bounds) 47public static void DrawHorizontalChunks(Graphics g, Rectangle bounds) 57public static void DrawVerticalChunks(Graphics g, Rectangle bounds)
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (6)
1877Rectangle rectangle = _gridView.Bounds; 1949Rectangle rectTarget = target.Bounds; 1958private static void DrawXorBar(Control targetControl, Rectangle rcFrame) 1960Rectangle rc = targetControl.RectangleToScreen(rcFrame); 2612Rectangle toolStripBounds = new(0, 1, toolStripWidth, toolStripHeight); 2816Rectangle rectDoc = _targetMove!.Bounds;
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.SnappableControl.cs (1)
40Rectangle r = ClientRectangle;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CategoryGridEntry.cs (5)
106Rectangle rect, 107Rectangle clipRect, 121Rectangle focusRect = new(indent, rect.Y, labelWidth + 3, rect.Height - 1); 143Rectangle rect, 144Rectangle clipRect,
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CommandsPane.cs (1)
57public override Rectangle DisplayRectangle
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\DropDownButton.cs (1)
133Rectangle dropDownButtonRect = new(0, 0, Width, Height);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\DropDownButton.DropDownButtonAdapter.cs (4)
16private void DDB_Draw3DBorder(PaintEventArgs e, Rectangle r, bool raised) 47Rectangle inside = r; 77Rectangle rect = Control.ClientRectangle; 88internal override void DrawImageCore(Graphics graphics, Image image, Rectangle imageBounds, Point imageStart, LayoutData layout)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (25)
46private Rectangle _outlineRect = Rectangle.Empty; 640public Rectangle OutlineRectangle 666_outlineRect = Rectangle.Empty; 1503Rectangle rect, 1504Rectangle clipRect, 1568Rectangle textRect = new(stringX, rect.Y + 1, maxSpace, rect.Height - 1); 1570if (!Rectangle.Intersect(textRect, clipRect).IsEmpty) 1621private void PaintOutlineGlyph(Graphics g, Rectangle r) 1632_outlineRect = Rectangle.Empty; 1647_outlineRect = Rectangle.Empty; 1655void PaintOutlineWithExplorerTreeStyle(Graphics g, Rectangle r, HWND hwnd) 1658Rectangle outline = Rectangle.Intersect(r, OutlineRectangle); 1698Rectangle rectangle, 1720void PaintOutlineWithClassicStyle(Graphics g, Rectangle r) 1723Rectangle outline = Rectangle.Intersect(r, OutlineRectangle); 1781Rectangle rect, 1782Rectangle clipRect, 1836Rectangle rectPaint = new( 1842if (!Rectangle.Intersect(rectPaint, clipRect).IsEmpty) 1879if (Rectangle.Intersect(rect, clipRect).IsEmpty) 1896Rectangle textRectangle = new( 1993Rectangle outlineRect = OutlineRectangle;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.GridEntryAccessibleObject.cs (4)
28public override Rectangle Bounds 31: Rectangle.Empty; 129Rectangle entryBounds = BoundingRectangle; 130Rectangle propertyGridViewBounds = PropertyGridView.GetToolNativeScreenRectangle();
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\HelpPane.cs (3)
31private Rectangle _lastClientRectangle = Rectangle.Empty; 121Rectangle currentClientRectangle = ClientRectangle;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyDescriptorGridEntry.cs (4)
21private Rectangle[]? _uiItemRects; 502Rectangle rect, 503Rectangle clipRect, 525_uiItemRects = new Rectangle[_propertyValueUIItems.Length];
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (44)
83private Rectangle _lastClientRect = Rectangle.Empty; 478Rectangle rect = GetRectangle(_selectedRow, RowLabel); 614internal Rectangle AccessibilityGetGridEntryBounds(GridEntry gridEntry) 619return Rectangle.Empty; 622Rectangle rect = GetRectangle(row, RowValue | RowLabel); 628Rectangle parent = gridEntry.OwnerGrid.GridViewAccessibleObject.Bounds; 634return Rectangle.Empty; 698private static void AdjustOrigin(Graphics g, Point newOrigin, ref Rectangle r) 899private void CommonEditorUse(Control control, Rectangle targetRectangle) 903Rectangle rectCur = control.Bounds; 906Rectangle clientRect = ClientRectangle; 912targetRectangle = Rectangle.Intersect(clientRect, targetRectangle); 926targetRectangle = Rectangle.Empty; 1113Rectangle rect, 1116Rectangle clipRect) 1126clipRect = Rectangle.Intersect(rect, clipRect); 1171private void DrawValue(Graphics g, int row, Rectangle clipRect) 1179Rectangle rect = GetRectangle(row, RowValue); 1181clipRect = Rectangle.Intersect(clipRect, rect); 1386Rectangle r = GetRectangle(row, rowValue ? RowValue : RowLabel); 1440Rectangle rect = GetRectangle(_selectedRow, RowValue); 1443Rectangle rectScreen = Screen.FromControl(EditTextBox).WorkingArea; 1902public Rectangle GetRectangle(int row, int flRow) 1904Rectangle rect = new(0, 0, 0, 0); 1990Rectangle rect = ClientRectangle; 1995Rectangle boundsScroll = ScrollBar.Bounds; 2023Rectangle rect; 2138Rectangle r = ClientRectangle; 2318Rectangle drawBounds = e.Bounds; 2382Rectangle clearRect = new(1, 1, Size.Width - 2, Size.Height - 2); 3019Rectangle r = GetRectangle(pos.Y, RowLabel); 3093Rectangle itemRect = GetRectangle(point.Y, point.X); 3299Rectangle clipRect = e.ClipRectangle; 3365Rectangle rect = GetRectangle(i, RowLabel); 3388Rectangle clearRect = new(1, yPosition, Size.Width - 2, Size.Height - yPosition - 1); 3614Rectangle newRect = ClientRectangle; 3615int yDelta = _lastClientRect == Rectangle.Empty ? 0 : newRect.Height - _lastClientRect.Height; 3621Rectangle rectInvalidate = new(_lastClientRect.Width - 1, 0, newRect.Width - _lastClientRect.Width + 1, _lastClientRect.Height); 3627Rectangle rectInvalidate = new(0, _lastClientRect.Height - 1, _lastClientRect.Width, newRect.Height - _lastClientRect.Height + 1); 3815internal static void PositionTooltip(Control parent, GridToolTip toolTip, Rectangle itemRect) 4341Rectangle rect = GetRectangle(row, RowValue); 4360Rectangle rectTarget = new( 5295Rectangle itemRect = GetRectangle(mouseLoc.Y, mouseLoc.X);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (7)
27private Rectangle _dragBaseRect = Rectangle.Empty; // the original bounds of our control. 364Rectangle bottomGrip = new(0, Height - s_resizeGripSize, s_resizeGripSize, s_resizeGripSize); 365Rectangle topGrip = new(0, 0, s_resizeGripSize, s_resizeGripSize); 430Rectangle newBounds = Bounds; 499_dragBaseRect = Rectangle.Empty; 510Rectangle lRect = new(0, _resizeUp ? 0 : Height - s_resizeGripSize, s_resizeGripSize, s_resizeGripSize);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridToolStripButton.cs (2)
26var bounds = ClientBounds; 45Rectangle bounds = ClientBounds;
System\Windows\Forms\Controls\RichTextBox\ContentsResizedEventArgs.cs (2)
17public ContentsResizedEventArgs(Rectangle newRectangle) 25public Rectangle NewRectangle { get; }
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (1)
1603public new void DrawToBitmap(Bitmap bitmap, Rectangle targetBounds)
System\Windows\Forms\Controls\Splitter\Splitter.cs (7)
398Rectangle bounds = spd._target.Bounds; 555private Rectangle CalcSplitLine(Control splitTarget, int splitSize, int minWeight) 557Rectangle r = Bounds; 558Rectangle bounds = splitTarget.Bounds; 609Rectangle r = target.Bounds; 696Rectangle r = CalcSplitLine(_splitTarget, splitSize, 3); 825Rectangle r = CalcSplitLine(_splitTarget, GetSplitSize(_splitTarget, e.X, e.Y), 0);
System\Windows\Forms\Controls\TabControl\TabControl.cs (15)
36private Rectangle _cachedDisplayRect; 357public override Rectangle DisplayRectangle 388Rectangle r = rect; 945_cachedDisplayRect = Rectangle.Empty; 1103public Rectangle GetTabRect(int index) 1150_cachedDisplayRect = Rectangle.Empty; 1245_cachedDisplayRect = Rectangle.Empty; 1427_cachedDisplayRect = Rectangle.Empty; 1460_cachedDisplayRect = Rectangle.Empty; 1543_cachedDisplayRect = Rectangle.Empty; 1614_cachedDisplayRect = Rectangle.Empty; 1629Rectangle rect = DisplayRectangle; 1912_cachedDisplayRect = Rectangle.Empty; 1925_cachedDisplayRect = Rectangle.Empty; 2035_cachedDisplayRect = Rectangle.Empty;
System\Windows\Forms\Controls\TabControl\TabControl.TabControlAccessibleObject.cs (2)
18public override Rectangle Bounds 24return Rectangle.Empty;
System\Windows\Forms\Controls\TabControl\TabPage.cs (9)
164private protected override IList<Rectangle> GetNeighboringToolsRectangles() 166List<Rectangle> neighbors = []; 519internal Rectangle GetPageRectangle() => base.GetToolNativeScreenRectangle(); 521internal override Rectangle GetToolNativeScreenRectangle() 529Rectangle rect = tabControl.GetTabRect(tabControl.SelectedIndex); 533return Rectangle.Empty; 615Rectangle inflateRect = LayoutUtils.InflateRect(DisplayRectangle, Padding); 620Rectangle rectWithBorder = new( 736Rectangle r = parent.DisplayRectangle;
System\Windows\Forms\Controls\TabControl\TabPage.TabAccessibleObject.cs (3)
23public override Rectangle Bounds 29return Rectangle.Empty; 36return Rectangle.Empty;
System\Windows\Forms\Controls\TabControl\TabPage.TabPageAccessibleObject.cs (2)
16internal override Rectangle BoundingRectangle => this.IsOwnerHandleCreated(out TabPage? owner) ? 17owner.GetPageRectangle() : Rectangle.Empty;
System\Windows\Forms\Controls\TabControl\TabRenderer.cs (21)
27public static void DrawTabItem(Graphics g, Rectangle bounds, TabItemState state) 37public static void DrawTabItem(Graphics g, Rectangle bounds, bool focused, TabItemState state) 44Rectangle contentBounds = Rectangle.Inflate(bounds, -3, -3); 54public static void DrawTabItem(Graphics g, Rectangle bounds, string? tabItemText, Font? font, TabItemState state) 62public static void DrawTabItem(Graphics g, Rectangle bounds, string? tabItemText, Font? font, bool focused, TabItemState state) 72public static void DrawTabItem(Graphics g, Rectangle bounds, string? tabItemText, Font? font, TextFormatFlags flags, bool focused, TabItemState state) 78Rectangle contentBounds = Rectangle.Inflate(bounds, -3, -3); 91public static void DrawTabItem(Graphics g, Rectangle bounds, Image image, Rectangle imageRectangle, bool focused, TabItemState state) 98Rectangle contentBounds = Rectangle.Inflate(bounds, -3, -3); 111public static void DrawTabItem(Graphics g, Rectangle bounds, string? tabItemText, Font? font, Image image, Rectangle imageRectangle, bool focused, TabItemState state) 121public static void DrawTabItem(Graphics g, Rectangle bounds, string? tabItemText, Font? font, TextFormatFlags flags, Image image, Rectangle imageRectangle, bool focused, TabItemState state) 128Rectangle contentBounds = Rectangle.Inflate(bounds, -3, -3); 142public static void DrawTabPage(Graphics g, Rectangle bounds) 145internal static void DrawTabPage(IDeviceContext deviceContext, Rectangle bounds)
System\Windows\Forms\Controls\TextBox\MaskedTextBox.cs (1)
2890Rectangle rect = new(0, 0, Size.Width - 1, Size.Height - 1);
System\Windows\Forms\Controls\TextBox\TextBox.cs (2)
807Rectangle rect = new(0, 0, Size.Width - 1, Size.Height - 1); 850Rectangle rectangle = ClientRectangle;
System\Windows\Forms\Controls\TextBox\TextBoxBase.TextBoxBaseAccessibleObject.cs (2)
25internal override Rectangle BoundingRectangle => this.IsOwnerHandleCreated(out TextBoxBase? owner) ? 26owner.GetToolNativeScreenRectangle() : Rectangle.Empty;
System\Windows\Forms\Controls\TextBox\TextBoxBase.TextBoxBaseUiaTextProvider.cs (8)
143public override Rectangle RectangleToScreen(Rectangle rect) => Owner is not null ? Owner.RectangleToScreen(rect) : Rectangle.Empty; 203public override Rectangle BoundingRectangle 206: Rectangle.Empty; 247Rectangle rect = Owner.ClientRectangle; 363Rectangle rectangle = GetFormattingRectangle(); 395static bool IsDegenerate(Rectangle rect)
System\Windows\Forms\Controls\TextBox\TextBoxRenderer.cs (10)
25private static void DrawBackground(Graphics g, Rectangle bounds, TextBoxState state) 33Rectangle fillRect = t_visualStyleRenderer.GetBackgroundContentRectangle(g, bounds); 42public static void DrawTextBox(Graphics g, Rectangle bounds, TextBoxState state) 51public static void DrawTextBox(Graphics g, Rectangle bounds, string? textBoxText, Font? font, TextBoxState state) 59public static void DrawTextBox(Graphics g, Rectangle bounds, string? textBoxText, Font? font, Rectangle textBounds, TextBoxState state) 67public static void DrawTextBox(Graphics g, Rectangle bounds, string? textBoxText, Font? font, TextFormatFlags flags, TextBoxState state) 70Rectangle textBounds = t_visualStyleRenderer.GetBackgroundContentRectangle(g, bounds); 78public static void DrawTextBox(Graphics g, Rectangle bounds, string? textBoxText, Font? font, Rectangle textBounds, TextFormatFlags flags, TextBoxState state)
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (7)
203public Rectangle SizeGripBounds 209return Rectangle.Empty; 213Rectangle clientRect = ClientRectangle; 382Rectangle displayRect = DisplayRectangle; 387Rectangle lastItemBounds = Rectangle.Empty; 573Rectangle sizeGripBounds = SizeGripBounds;
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (26)
40private Rectangle _lastInsertionMarkRect = Rectangle.Empty; 199Rectangle bounds = CommonProperties.GetSpecifiedBounds(this); 725public override Rectangle DisplayRectangle 729Rectangle rect = base.DisplayRectangle; 850public Rectangle GripRectangle 854return (GripStyle == ToolStripGripStyle.Visible) ? Grip.Bounds : Rectangle.Empty; 1776Rectangle regionRect = (item is null) ? Rectangle.Empty : item.Bounds; 1821else if (regionRect != Rectangle.Empty) 1842if (_lastInsertionMarkRect != Rectangle.Empty) 1848Rectangle invalidate = _lastInsertionMarkRect; 1849_lastInsertionMarkRect = Rectangle.Empty; 2643private protected override void PrintToMetaFileRecursive(HDC hDC, IntPtr lParam, Rectangle bounds) 3446Rectangle viewableArea = DisplayRectangle; 3498Rectangle clippingRect = e.ClipRectangle; 3499Rectangle bounds = item.Bounds; 3778if (_lastInsertionMarkRect != Rectangle.Empty) 3840internal void PaintInsertionMark(Rectangle insertionRect) 3873Rectangle comparisonRect = new(point, s_onePixel); 3874Rectangle bounds; 4170Rectangle gripRectangle = Rectangle.Empty; 4171Rectangle displayRect = DisplayRectangle; 4328Rectangle clientBounds = ClientRectangle; 4683void IArrangedElement.SetBounds(Rectangle bounds, BoundsSpecified specified)
System\Windows\Forms\Controls\ToolStrips\ToolStripArrowRenderEventArgs.cs (2)
16Rectangle arrowRectangle, 27public Rectangle ArrowRectangle { get; set; }
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.ToolStripComboBoxControl.ToolStripComboBoxFlatComboAdapter.cs (1)
68protected override void DrawFlatComboDropDown(ComboBox comboBox, Graphics g, Rectangle dropDownRect)
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.cs (5)
42Rectangle bounds = Bounds; 357Rectangle specifiedBounds = Rectangle.Empty; 372Rectangle bounds = _control.Bounds; 651Rectangle bounds = LayoutUtils.Align(size, Bounds, ControlAlign);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (10)
403public new Rectangle GripRectangle 983internal Rectangle GetDropDownBounds(Rectangle suggestedBounds) 985Rectangle dropDownBounds; 992Rectangle suggestedScreenBounds = new(screenPoint, suggestedBounds.Size); 1009internal Rectangle CalculateDropDownLocation(Point start, ToolStripDropDownDirection dropDownDirection) 1020Rectangle dropDownBounds = new(Point.Empty, GetSuggestedSize()); 1198Rectangle bounds = Bounds; 1522Rectangle bounds = new(x, y, width, height); 1706Rectangle bounds = Bounds;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownButton.cs (2)
198Rectangle dropDownArrowRect = (InternalLayout is ToolStripDropDownButtonInternalLayout layout) ? layout.DropDownArrowRect : Rectangle.Empty;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownButton.ToolStripDropDownButtonInternalLayout.cs (3)
16private Rectangle _dropDownArrowRect = Rectangle.Empty; 89public Rectangle DropDownArrowRect
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownItem.cs (14)
116internal virtual Rectangle DropDownButtonArea => Bounds; 140Rectangle bounds = GetDropDownBounds(dropDownDirection); 141Rectangle ownerItemBounds = new(TranslatePoint(Point.Empty, ToolStripPointType.ToolStripItemCoords, ToolStripPointType.ScreenCoords), Size); 142Rectangle intersectionBetweenChildAndParent = Rectangle.Intersect(bounds, ownerItemBounds); 151int newIntersectionWidth = Rectangle.Intersect(GetDropDownBounds(newDropDownDirection), ownerItemBounds).Width; 300private Rectangle DropDownDirectionToDropDownBounds(ToolStripDropDownDirection dropDownDirection, Rectangle dropDownBounds) 377private Rectangle GetDropDownBounds(ToolStripDropDownDirection dropDownDirection) 379Rectangle dropDownBounds = new(Point.Empty, DropDown.GetSuggestedSize()); 384Rectangle itemScreenBounds = new(TranslatePoint(Point.Empty, ToolStripPointType.ToolStripItemCoords, ToolStripPointType.ScreenCoords), Size); 386if (Rectangle.Intersect(dropDownBounds, itemScreenBounds).Height > 1) 391if (Rectangle.Intersect(dropDownBounds, itemScreenBounds).Width > 1) 397if (Rectangle.Intersect(dropDownBounds, itemScreenBounds).Width > 1)
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (29)
15private Rectangle _checkRectangle = Rectangle.Empty; 16private Rectangle _imageRectangle = Rectangle.Empty; 17private Rectangle _arrowRectangle = Rectangle.Empty; 18private Rectangle _textRectangle = Rectangle.Empty; 19private Rectangle _imageMarginBounds = Rectangle.Empty; 66internal Rectangle ArrowRectangle => _arrowRectangle; 68internal Rectangle CheckRectangle => _checkRectangle; 89public override Rectangle DisplayRectangle 93Rectangle rect = base.DisplayRectangle; 112internal Rectangle ImageRectangle => _imageRectangle; 132internal Rectangle ImageMargin 197internal Rectangle TextRectangle 382_imageRectangle = Rectangle.Empty; 466Rectangle displayRect = DisplayRectangle; 488Rectangle adjustedItemBounds = Items[index].Bounds; 507Rectangle adjustedItemBounds = Items[index].Bounds; 665Rectangle displayRectangle = DisplayRectangle; 677Rectangle adjustedLastItemBounds = Items[Items.Count - 1].Bounds; 706Rectangle adjustedLastItemBounds = Items[0].Bounds; 839Rectangle displayRectangle = DisplayRectangle; 902private static bool IsItemFullyVisible(Rectangle displayRectangle, Rectangle itemBounds) 909private static bool IsItemIntersectingDisplayRectangle(Rectangle displayRectangle, Rectangle itemBounds)
System\Windows\Forms\Controls\ToolStrips\ToolStripGripRenderEventArgs.cs (1)
21public Rectangle GripBounds => ToolStrip.GripRectangle;
System\Windows\Forms\Controls\ToolStrips\ToolStripHighContrastRenderer.cs (13)
57Rectangle bounds = e.GripBounds; 67Rectangle[] shadowRects = new Rectangle[numRectangles]; 135Rectangle bounds = new(Point.Empty, e.Item.Size); 140Rectangle dropDownRect = item.DropDownButtonBounds; 187Rectangle bounds = new(Point.Empty, menuItem.Size); 258Rectangle bounds = new(Point.Empty, e.ToolStrip.Size); 287Rectangle bounds = new(Point.Empty, e.ToolStrip.Size); 350Rectangle bounds = new(Point.Empty, e.Item.Size); 410Rectangle bounds = new(Point.Empty, e.Item.Size); 442Rectangle bounds = new(Point.Empty, e.Item.Size); 464Rectangle bounds = item.ClientBounds; 508Rectangle imageRect = e.ImageRectangle;
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (19)
29private Rectangle _bounds = Rectangle.Empty; 551public virtual Rectangle Bounds => _bounds; 556internal Rectangle ClientBounds 560Rectangle client = _bounds; 567public Rectangle ContentRectangle 571Rectangle content = LayoutUtils.InflateRect(InternalLayout.ContentRectangle, Padding); 957Rectangle currentBounds = Bounds; 973Rectangle IArrangedElement.DisplayRectangle => Bounds; 987void IArrangedElement.SetBounds(Rectangle bounds, BoundsSpecified specified) 1812Rectangle currentBounds = Bounds; 2014Rectangle currentBounds = Bounds; 2372public void Invalidate(Rectangle r) 3230protected internal virtual void SetBounds(Rectangle bounds) 3232Rectangle oldBounds = _bounds; 3494internal static bool GetIsOffscreenPropertyValue(ToolStripItemPlacement? toolStripItemPlacement, Rectangle bounds) 3544Rectangle IKeyboardToolTip.GetNativeScreenRectangle() => AccessibilityObject.Bounds; 3546IList<Rectangle> IKeyboardToolTip.GetNeighboringToolsRectangles() 3548List<Rectangle> neighbors = new(3);
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.ToolStripItemAccessibleObject.cs (3)
296public override Rectangle Bounds 300Rectangle bounds = Owner.Bounds; 307return Rectangle.Empty;
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.ToolStripItemInternalLayout.cs (6)
32public virtual Rectangle ImageRectangle 37Rectangle imageRect = layoutData.ImageBounds; 56public virtual Rectangle TextRectangle 61Rectangle textRect = layoutData.TextBounds; 67public virtual Rectangle ContentRectangle => LayoutData.Field; 99Rectangle bounds = new(Point.Empty, _ownerItem.Size);
System\Windows\Forms\Controls\ToolStrips\ToolStripItemImageRenderEventArgs.cs (3)
11public ToolStripItemImageRenderEventArgs(Graphics g, ToolStripItem item, Rectangle imageRectangle) 25Rectangle imageRectangle) 40public Rectangle ImageRectangle { get; }
System\Windows\Forms\Controls\ToolStrips\ToolStripItemTextRenderEventArgs.cs (3)
23Rectangle textRectangle, 46Rectangle textRectangle, 91public Rectangle TextRectangle { get; set; }
System\Windows\Forms\Controls\ToolStrips\ToolStripLabel.cs (1)
375Rectangle textRect = InternalLayout.TextRectangle;
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (2)
976Rectangle checkRectangle = menuItemInternalLayout.CheckRectangle; 1062protected internal override void SetBounds(Rectangle rect)
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.ToolStripMenuItemInternalLayout.cs (9)
63public Rectangle ArrowRectangle 73Rectangle arrowRect = menu.ArrowRectangle; 79return Rectangle.Empty; 83public Rectangle CheckRectangle 91Rectangle checkRectangle = menu.CheckRectangle; 103return Rectangle.Empty; 107public override Rectangle ImageRectangle 117Rectangle imageRect = menu.ImageRectangle; 139public override Rectangle TextRectangle
System\Windows\Forms\Controls\ToolStrips\ToolStripOverflow.cs (1)
75void IArrangedElement.SetBounds(Rectangle bounds, BoundsSpecified specified)
System\Windows\Forms\Controls\ToolStrips\ToolStripOverflowButton.cs (1)
89protected internal override void SetBounds(Rectangle bounds)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.cs (4)
153internal Rectangle DragBounds 718Rectangle dragRect; 1019Rectangle bounds = LayoutUtils.InflateRect(row.Bounds, row.Margin); 1088Rectangle intersection = c1.Bounds;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.FeedbackRectangle.cs (1)
17public FeedbackRectangle(Rectangle bounds)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.FeedbackRectangle.FeedbackDropDown.cs (1)
18public FeedbackDropDown(Rectangle bounds) : base()
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelCell.cs (6)
25private Rectangle _cachedBounds = Rectangle.Empty; 62public Rectangle CachedBounds 294protected override void SetBoundsCore(Rectangle bounds, BoundsSpecified specified) 311Rectangle displayRectangle = ToolStripPanelRow.DisplayRectangle; 368if (ToolStripPanelRow.Bounds == Rectangle.Empty)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.cs (18)
17private Rectangle _bounds = Rectangle.Empty; 61public Rectangle Bounds 161public Rectangle DisplayRectangle 309protected void OnBoundsChanged(Rectangle oldBounds, Rectangle newBounds) 442Rectangle cachedBounds = c.CachedBounds; 461Rectangle cachedBounds = currentCell.CachedBounds; 494Rectangle cachedBounds = c.CachedBounds; 539Rectangle cachedBounds = c.CachedBounds; 558Rectangle cachedBounds = currentCell.CachedBounds; 591Rectangle cachedBounds = c.CachedBounds; 600private void SetBounds(Rectangle bounds) 604Rectangle oldBounds = _bounds; 644Rectangle IArrangedElement.DisplayRectangle 648Rectangle displayRectangle = Bounds; 687void IArrangedElement.SetBounds(Rectangle bounds, BoundsSpecified specified) 701internal Rectangle DragBounds => RowManager.DragBounds;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.HorizontalRowManager.cs (9)
22public override Rectangle DisplayRectangle 26Rectangle displayRect = ((IArrangedElement)Row).DisplayRectangle; 30Rectangle raftingDisplayRectangle = ToolStripPanel.DisplayRectangle; 47public override Rectangle DragBounds 51Rectangle dragBounds = Row.Bounds; 56Rectangle previousRowBounds = ToolStripPanel.RowsInternal[index - 1].Bounds; 65Rectangle nextRowBounds = ToolStripPanel.RowsInternal[index + 1].Bounds; 556protected internal override void OnBoundsChanged(Rectangle oldBounds, Rectangle newBounds)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.ToolStripPanelRowManager.cs (6)
37public virtual Rectangle DragBounds 39get { return Rectangle.Empty; } 42public virtual Rectangle DisplayRectangle 44get { return Rectangle.Empty; } 192protected internal virtual void OnBoundsChanged(Rectangle oldBounds, Rectangle newBounds)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.VerticalRowManager.cs (9)
23public override Rectangle DisplayRectangle 27Rectangle displayRect = ((IArrangedElement)Row).DisplayRectangle; 31Rectangle raftingDisplayRectangle = ToolStripPanel.DisplayRectangle; 48public override Rectangle DragBounds 52Rectangle dragBounds = Row.Bounds; 57Rectangle previousRowBounds = ToolStripPanel.RowsInternal[index - 1].Bounds; 66Rectangle nextRowBounds = ToolStripPanel.RowsInternal[index + 1].Bounds; 346protected internal override void OnBoundsChanged(Rectangle oldBounds, Rectangle newBounds)
System\Windows\Forms\Controls\ToolStrips\ToolStripProfessionalLowResolutionRenderer.cs (1)
53Rectangle bounds = new(Point.Empty, e.ToolStrip.Size);
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (57)
165Rectangle overflowArrowRect; 230Rectangle bounds = new(Point.Empty, item.Size); 266Rectangle bounds = new(Point.Empty, item.Size); 269Rectangle fillRect = item.Selected ? item.ContentRectangle : bounds; 282Rectangle buttonBounds = item.ButtonBounds; 296Rectangle dropDownRect = item.DropDownButtonBounds; 346Rectangle bounds = new(Point.Empty, item?.Size ?? Size.Empty); 354Rectangle fillRect = item is not null && item.Selected ? item.ContentRectangle : bounds; 416Rectangle bounds = new(Point.Empty, toolStrip.Size); 453Rectangle edging; 482Rectangle bounds = e.GripBounds; 497Rectangle[] shadowRects = new Rectangle[numRectangles]; 545Rectangle bounds = new(Point.Empty, item.Size); 591Rectangle fillRect = bounds; 648Rectangle fillRect = bounds; 696Rectangle bounds = e.AffectedBounds; 742Rectangle imageRect = e.ImageRectangle; 757if (imageRect != Rectangle.Empty && image is not null) 845Rectangle bounds = new(Point.Empty, toolStrip.Size); 859Rectangle topLeftParentHorizontalPixels = new(topLeft, s_onePix); 860Rectangle bottomLeftParentHorizontalPixels = new(bottomLeft, new Size(2, 1)); 861Rectangle bottomLeftParentVerticalPixels = new(bottomLeft.X, bottomLeft.Y - 1, 1, 2); 864Rectangle bottomRightHorizontalPixels = new(bottomRight.X - 1, bottomRight.Y, 2, 1); 865Rectangle bottomRightVerticalPixels = new(bottomRight.X, bottomRight.Y - 1, 1, 2); 868Rectangle topRightHorizontalPixels, topRightVerticalPixels; 952private static void FillWithDoubleGradient(Color beginColor, Color middleColor, Color endColor, Graphics g, Rectangle bounds, int firstGradientWidth, int secondGradientWidth, LinearGradientMode mode, bool flipHorizontal) 959Rectangle endGradient = bounds; 960Rectangle beginGradient = bounds; 1044Rectangle bounds = ScaleHelper.IsScalingRequired 1078private void RenderPressedGradient(Graphics g, Rectangle bounds) 1107Rectangle bounds = new(Point.Empty, item.Size); 1109Rectangle fillRect = item.Selected ? item.ContentRectangle : bounds; 1140Rectangle gradientBounds = new(Point.Empty, parent.Size); 1154Rectangle gradientBounds = new(Point.Empty, control.Size); 1173Rectangle bounds = new(Point.Empty, e.ToolStrip.Size); 1182Rectangle bounds = new(Point.Empty, e.ToolStrip.Size); 1194Rectangle bounds = new(Point.Empty, toolStripDropDown.Size); 1216Rectangle overflowBoundsFill = new(Point.Empty, e.Item.Size); 1217Rectangle bounds = overflowBoundsFill; 1320Rectangle fillRect = new(overflowBoundsFill.X - 1, 0, 1, 1); 1337Rectangle bounds = new(Point.Empty, e.ToolStrip.Size); 1339Rectangle displayRect = toolStrip.DisplayRectangle; 1353Rectangle topLeftShadowRect = new(topLeft, s_onePix); 1357Rectangle topLeftShadowRect2 = new(topLeft, s_onePix); 1361Rectangle topRightShadowRect = new(topRight, s_onePix); 1365Rectangle topRightShadowRect2 = topRightShadowRect; 1369Rectangle[] paintRects = [topLeftShadowRect, topLeftShadowRect2, topRightShadowRect, topRightShadowRect2]; 1376paintRects[i] = Rectangle.Empty; 1395Rectangle otherBottom = new(bottomLeft.X, bottomLeft.Y - 2, 1, 1); 1403private void RenderSelectedButtonFill(Graphics g, Rectangle bounds) 1427private void RenderCheckedButtonFill(Graphics g, Rectangle bounds) 1451private void RenderSeparatorInternal(Graphics g, ToolStripItem item, Rectangle bounds, bool vertical) 1539private void RenderPressedButtonFill(Graphics g, Rectangle bounds) 1566Rectangle bounds = new(Point.Empty, item.Size); 1569Rectangle fillRect = (item.Selected) ? item.ContentRectangle : bounds; 1645private static Point RenderArrowInternal(Graphics g, Rectangle dropDownRect, ArrowDirection direction, Brush brush)
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (13)
637Rectangle dropDownRect = e.ArrowRectangle; 807Rectangle imageRect = e.ImageRectangle; 810if (imageRect != Rectangle.Empty && image is not null) 851Rectangle imageRect = e.ImageRectangle; 854if (imageRect == Rectangle.Empty || image is null) 901Rectangle textRect = e.TextRectangle; 1006private static readonly Rectangle[] s_baseSizeGripRectangles = 1046Rectangle sizeGripBounds = statusStrip.SizeGripBounds; 1054ReadOnlySpan<Rectangle> baseRectangles = s_baseSizeGripRectangles; 1094foreach (Rectangle baseRect in baseRectangles) 1096Rectangle dotRect = new( 1103Rectangle highlightRect = dotRect; 1108Rectangle shadowRect = dotRect;
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderEventArgs.cs (10)
26Rectangle affectedBounds, 43public Rectangle AffectedBounds { get; } 92public Rectangle ConnectedArea 103return Rectangle.Empty; 109Rectangle itemBounds = new(ToolStrip.PointToClient(ownerItem.TranslatePoint(Point.Empty, ToolStripPointType.ToolStripItemCoords, ToolStripPointType.ScreenCoords)), ownerItem.Size); 111Rectangle overlap = ToolStrip.ClientRectangle; 119return Rectangle.Empty; 130return Rectangle.Empty; 133return Rectangle.Empty; 139return Rectangle.Empty;
System\Windows\Forms\Controls\ToolStrips\ToolStripSeparator.cs (1)
306protected internal override void SetBounds(Rectangle rect)
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.cs (11)
17private Rectangle _dropDownButtonBounds = Rectangle.Empty; 21private Rectangle _splitterBounds = Rectangle.Empty; 83public Rectangle ButtonBounds 172internal override Rectangle DropDownButtonArea => DropDownButtonBounds; 178public Rectangle DropDownButtonBounds => _dropDownButtonBounds; 290public Rectangle SplitterBounds 301Rectangle dropDownButtonBounds = new(Point.Empty, new Size(Math.Min(Width, DropDownButtonWidth), Height)); 307Rectangle splitButtonButtonBounds = new(Point.Empty, new Size(splitButtonButtonWidth, splitButtonButtonHeight)); 545private void SetDropDownButtonBounds(Rectangle rect) => _dropDownButtonBounds = rect;
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.ToolStripSplitButtonButtonLayout.cs (4)
38public override Rectangle ImageRectangle 42Rectangle imageRect = base.ImageRectangle; 49public override Rectangle TextRectangle 53Rectangle textRect = base.TextRectangle;
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackDragDropHandler.cs (5)
139Rectangle insertionRect = Rectangle.Empty; 161Rectangle insertionRect = _owner.DisplayRectangle; 174Rectangle bounds = _owner.DisplayedItems[i].Bounds; 204private RelativeLocation ComparePositions(Rectangle orig, Point check)
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackLayout.cs (24)
12private Rectangle _displayRectangle = Rectangle.Empty; 177_displayRectangle = Rectangle.Empty; 211Rectangle clientRectangle = toolStrip.ClientRectangle; 217Rectangle alignedLeftItems = Rectangle.Empty; 218Rectangle alignedRightItems = Rectangle.Empty; 301alignedRightItems = (alignedRightItems == Rectangle.Empty) ? new Rectangle(x, y, itemSize.Width, itemSize.Height) 302: Rectangle.Union(alignedRightItems, new Rectangle(x, y, itemSize.Width, itemSize.Height)); 314alignedLeftItems = (alignedLeftItems == Rectangle.Empty) ? new Rectangle(x, y, itemSize.Width, itemSize.Height) 315: Rectangle.Union(alignedLeftItems, new Rectangle(x, y, itemSize.Width, itemSize.Height)); 339Rectangle bounds = LayoutUtils.VAlign(item.Size, _displayRectangle, AnchorStyles.None); 357Rectangle clientRectangle = toolStrip.ClientRectangle; 362Rectangle alignedLeftItems = Rectangle.Empty; 363Rectangle alignedRightItems = Rectangle.Empty; 438alignedRightItems = (alignedRightItems == Rectangle.Empty) ? new Rectangle(x, y, itemSize.Width, itemSize.Height) 439: Rectangle.Union(alignedRightItems, new Rectangle(x, y, itemSize.Width, itemSize.Height)); 446alignedLeftItems = (alignedLeftItems == Rectangle.Empty) ? new Rectangle(x, y, itemSize.Width, itemSize.Height) 447: Rectangle.Union(alignedLeftItems, new Rectangle(x, y, itemSize.Width, itemSize.Height)); 472Rectangle bounds = LayoutUtils.HAlign(item.Size, _displayRectangle, AnchorStyles.None); 495Rectangle itemBounds = new(itemLocation, itemSize);
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemDarkModeRenderer.cs (13)
99private static void FillBackground(Graphics g, Rectangle bounds, Color backColor) 120Rectangle bounds = e.AffectedBounds; 159Rectangle bounds = e.AffectedBounds; 182Rectangle bounds = e.ToolStrip.ClientRectangle; 213Rectangle bounds = e.ToolStrip.ClientRectangle; 228Rectangle bounds = new(Point.Empty, e.Item.Size); 274Rectangle bounds = new(Point.Empty, e.Item.Size); 321Rectangle bounds = new(Point.Empty, e.Item.Size); 334Rectangle dropDownRect = splitButton.DropDownButtonBounds; 360Rectangle bounds = e.Item.ContentRectangle; 429Rectangle bounds = new(Point.Empty, e.Item.Size); 441Rectangle arrowRect = item.ContentRectangle; 526Rectangle bounds = e.GripBounds;
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemRenderer.cs (18)
108private static void FillBackground(Graphics g, Rectangle bounds, Color backColor) 233Rectangle bounds = e.AffectedBounds; 290Rectangle bounds = toolStrip.ClientRectangle; 331Rectangle bounds = new(Point.Empty, e.GripBounds.Size); 474Rectangle bounds = new(Point.Empty, item.Size); 497Rectangle fillRect = new(Point.Empty, item.Size); 605Rectangle splitButtonBounds = splitButton.ButtonBounds; 622Rectangle fillRect = splitButton.ContentRectangle; 642var clientBounds = item.ClientBounds; 651Rectangle splitButtonButtonRect = splitButton.ButtonBounds; 655Rectangle bounds = new(Point.Empty, splitButton.Size); 658Rectangle fillRect = splitButton.Selected ? splitButton.ContentRectangle : bounds; 674Rectangle dropDownRect = splitButton.DropDownButtonBounds; 720var bounds = item.ClientBounds; 730Rectangle fillRect = item.ContentRectangle; 748private static void RenderSeparatorInternal(Graphics g, ToolStripItem item, Rectangle bounds, bool vertical) 803private static void RenderSmall3DBorderInternal(Graphics g, Rectangle bounds, ToolBarState state, bool rightToLeft) 852Rectangle fillRect = item.ContentRectangle;
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.cs (1)
92Rectangle bounds = CommonProperties.GetSpecifiedBounds(TextBox);
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.ToolStripTextBoxControl.cs (2)
51private Rectangle AbsoluteClientRectangle => AbsoluteClientRECT; 254Rectangle clientRect = AbsoluteClientRectangle;
System\Windows\Forms\Controls\TrackBar\TrackBar.cs (1)
391Rectangle r = Bounds;
System\Windows\Forms\Controls\TrackBar\TrackBar.TrackBarAccessibleObject.cs (2)
22public override Rectangle Bounds 28return Rectangle.Empty;
System\Windows\Forms\Controls\TrackBar\TrackBar.TrackBarChildAccessibleObject.cs (3)
20public override Rectangle Bounds 26return Rectangle.Empty; 31return ParentInternal?.SystemIAccessible.TryGetLocation(GetChildId()) ?? Rectangle.Empty;
System\Windows\Forms\Controls\TrackBar\TrackBarRenderer.cs (10)
28public static void DrawHorizontalTrack(Graphics g, Rectangle bounds) 38public static void DrawVerticalTrack(Graphics g, Rectangle bounds) 48public static void DrawHorizontalThumb(Graphics g, Rectangle bounds, TrackBarThumbState state) 58public static void DrawVerticalThumb(Graphics g, Rectangle bounds, TrackBarThumbState state) 68public static void DrawLeftPointingThumb(Graphics g, Rectangle bounds, TrackBarThumbState state) 78public static void DrawRightPointingThumb(Graphics g, Rectangle bounds, TrackBarThumbState state) 88public static void DrawTopPointingThumb(Graphics g, Rectangle bounds, TrackBarThumbState state) 98public static void DrawBottomPointingThumb(Graphics g, Rectangle bounds, TrackBarThumbState state) 108public static void DrawHorizontalTicks(Graphics g, Rectangle bounds, int numTicks, EdgeStyle edgeStyle) 138public static void DrawVerticalTicks(Graphics g, Rectangle bounds, int numTicks, EdgeStyle edgeStyle)
System\Windows\Forms\Controls\TreeView\DrawTreeNodeEventArgs.cs (2)
19Rectangle bounds, 41public Rectangle Bounds { get; }
System\Windows\Forms\Controls\TreeView\TreeNode.cs (6)
227public Rectangle Bounds 234return Rectangle.Empty; 244return Rectangle.Empty; 255internal Rectangle RowBounds 267return Rectangle.Empty; 273return Rectangle.Empty;
System\Windows\Forms\Controls\TreeView\TreeNode.IKeyboardToolTip.cs (6)
18Rectangle IKeyboardToolTip.GetNativeScreenRectangle() => RectangleToScreen(Bounds); 20IList<Rectangle> IKeyboardToolTip.GetNeighboringToolsRectangles() 24List<Rectangle> neighboringRectangles = []; 59private Rectangle RectangleToScreen(Rectangle bounds) 61return TreeView?.RectangleToScreen(bounds) ?? Rectangle.Empty;
System\Windows\Forms\Controls\TreeView\TreeNode.TreeNodeAccessibleObject.cs (2)
23public override Rectangle Bounds 29return Rectangle.Empty;
System\Windows\Forms\Controls\TreeView\TreeView.cs (4)
2733Rectangle bounds = node.RowBounds; 2814Rectangle bounds = node.Bounds; 2916Rectangle bounds = tn.Bounds; 3138Rectangle rect = new(0, 0, Size.Width - 1, Size.Height - 1);
System\Windows\Forms\Controls\TreeView\TreeView.TreeViewAccessibleObject.cs (2)
17internal override Rectangle BoundingRectangle => this.IsOwnerHandleCreated(out ListBox? owner) ? 18owner.GetToolNativeScreenRectangle() : Rectangle.Empty;
System\Windows\Forms\Controls\Unsupported\DataGrid\DataGrid.cs (4)
532protected internal virtual void ColumnStartedEditing(Rectangle bounds) { } 546public Rectangle GetCurrentCellBounds() => throw null; 548public Rectangle GetCellBounds(int row, int col) => throw null; 550public Rectangle GetCellBounds(DataGridCell dgc) => throw null;
System\Windows\Forms\Controls\Unsupported\DataGrid\DataGridBoolColumn.cs (3)
90Rectangle bounds, 97Rectangle bounds, 103protected internal override void Paint(Graphics g, Rectangle bounds, CurrencyManager source, int rowNum)
System\Windows\Forms\Controls\Unsupported\DataGrid\DataGridColumnStyle.cs (6)
173Rectangle bounds, 180Rectangle bounds, 188Rectangle bounds, 199Rectangle bounds, 206Rectangle bounds, 214protected internal abstract void Paint(Graphics g, Rectangle bounds, CurrencyManager source, int rowNum);
System\Windows\Forms\Controls\Unsupported\DataGrid\DataGridTextBoxColumn.cs (5)
65Rectangle bounds, 72Rectangle textBounds, 92Rectangle bounds, 100Rectangle bounds, 106protected internal override void Paint(Graphics g, Rectangle bounds, CurrencyManager source, int rowNum)
System\Windows\Forms\Controls\Unsupported\StatusBar\StatusBarDrawItemEventArgs.cs (2)
26Rectangle r, 39Rectangle r,
System\Windows\Forms\Controls\Unsupported\ToolBar\ToolBarButton.cs (1)
94public Rectangle Rectangle => throw null;
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (15)
451internal override Rectangle ApplyBoundsConstraints(int suggestedX, int suggestedY, int proposedWidth, int proposedHeight) 516Rectangle editBounds = _upDownEdit.Bounds; 523Rectangle bounds = ClientRectangle; 524Rectangle clipBounds = e.ClipRectangle; 529Rectangle clipLeft = new(bounds.Left, bounds.Top, border, bounds.Height); 530Rectangle clipTop = new(bounds.Left, bounds.Top, bounds.Width, border); 531Rectangle clipRight = new(bounds.Right - border, bounds.Top, border, bounds.Height); 532Rectangle clipBottom = new(bounds.Left, bounds.Bottom - border, bounds.Width, border); 545Rectangle backRect = editBounds; 557Rectangle backRect = editBounds; 832Rectangle upDownEditBounds = Rectangle.Empty; 833Rectangle upDownButtonsBounds = Rectangle.Empty; 835Rectangle clientArea = new(Point.Empty, ClientSize);
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.cs (3)
152Rectangle rect = ClientRectangle; 191Rectangle rectUp = ClientRectangle, rectDown = ClientRectangle; 350Rectangle clientRect = ClientRectangle;
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.UpDownButtonsAccessibleObject.DirectionButtonAccessibleObject.cs (4)
27public override Rectangle Bounds 33return Rectangle.Empty; 37Rectangle bounds = owner.Bounds; 46return owner.ParentInternal?.RectangleToScreen(bounds) ?? Rectangle.Empty;
System\Windows\Forms\Controls\WebBrowser\HtmlElement.cs (3)
98public Rectangle ClientRectangle 302public Rectangle OffsetRectangle 401public Rectangle ScrollRectangle
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (1)
159public new void DrawToBitmap(Bitmap bitmap, Rectangle targetBounds)
System\Windows\Forms\Design\ComponentEditorForm.cs (3)
235Rectangle pageHostBounds = new(2 * BUTTON_PAD + selectorWidth, 2 * BUTTON_PAD + STRIP_HEIGHT, 243Rectangle pageBounds = new(0, 0, pageHostBounds.Width, pageHostBounds.Height); 252Rectangle bounds = pageHostBounds;
System\Windows\Forms\Dialogs\CommonDialogs\CommonDialog.cs (1)
98Rectangle screen = Screen.GetWorkingArea(Control.MousePosition);
System\Windows\Forms\ErrorProvider\ErrorProvider.ControlItem.ControlItemAccessibleObject.cs (2)
33public override Rectangle Bounds 36: Rectangle.Empty;
System\Windows\Forms\ErrorProvider\ErrorProvider.ControlItem.cs (1)
206internal Rectangle GetIconBounds(Size size)
System\Windows\Forms\ErrorProvider\ErrorProvider.ErrorWindow.cs (6)
25private Rectangle _windowBounds; 189Rectangle bounds = item.GetIconBounds(_provider.Region.Size); 302_windowBounds = Rectangle.Empty; 306Rectangle iconBounds = item.GetIconBounds(size); 307_windowBounds = _windowBounds.IsEmpty ? iconBounds : Rectangle.Union(_windowBounds, iconBounds); 315Rectangle iconBounds = item.GetIconBounds(size);
System\Windows\Forms\Form.AccessibleObject.cs (4)
21public override Rectangle Bounds => this.IsOwnerHandleCreated(out Control? owner) 23: Rectangle.Empty; 25internal override Rectangle BoundingRectangle 27? Rectangle.Empty
System\Windows\Forms\Form.cs (23)
151private Rectangle _restoredWindowBounds = new(-1, -1, -1, -1); 158private Rectangle _restoreBounds = new(-1, -1, -1, -1); 677Rectangle preClientUpdateRestoredWindowBounds = _restoredWindowBounds; 891public Rectangle DesktopBounds 895Rectangle screen = SystemInformation.WorkingArea; 896Rectangle bounds = Bounds; 918Rectangle screen = SystemInformation.WorkingArea; 1153protected Rectangle MaximizedBounds 1155get => Properties.GetValueOrDefault<Rectangle>(s_propMaximizedBounds); 1309Rectangle bounds = Bounds; 1660public Rectangle RestoreBounds 3107Rectangle bounds = Bounds; 3701Rectangle clientRect = mdiclient is null ? Rectangle.Empty : mdiclient.ClientRectangle; 3723Rectangle screenRect = desktop.WorkingArea; 3908Rectangle screenRect = desktop.WorkingArea; 3964Rectangle screenRect = desktop.WorkingArea; 5202protected override Rectangle GetScaledBounds(Rectangle bounds, SizeF factor, BoundsSpecified specified) 5394Rectangle workingArea = SystemInformation.WorkingArea; 5403Rectangle workingArea = SystemInformation.WorkingArea; 6868Rectangle maximizedBounds = MaximizedBounds; 6881private unsafe void WmGetMinMaxInfoHelper(ref Message m, Size minTrack, Size maxTrack, Rectangle maximizedBounds)
System\Windows\Forms\Input\Cursor.cs (8)
115/// Gets or sets a <see cref="Rectangle"/> that represents the current clipping 118public static unsafe Rectangle Clip 248private void DrawImageCore(Graphics graphics, Rectangle imageRect, Rectangle targetRect, bool stretch) 350public void Draw(Graphics g, Rectangle targetRect) 352DrawImageCore(g, Rectangle.Empty, targetRect, stretch: false); 358public void DrawStretched(Graphics g, Rectangle targetRect) 360DrawImageCore(g, Rectangle.Empty, targetRect, stretch: true);
System\Windows\Forms\Internal\WinFormsUtils.cs (7)
63internal static Rectangle ConstrainToScreenWorkingAreaBounds(Rectangle bounds) 71internal static Rectangle ConstrainToScreenBounds(Rectangle bounds) 76internal static Rectangle ConstrainToBounds(Rectangle constrainingBounds, Rectangle bounds)
System\Windows\Forms\Layout\ArrangedElement.cs (10)
13private Rectangle _bounds = Rectangle.Empty; 27public Rectangle Bounds 55public virtual Rectangle DisplayRectangle 59Rectangle displayRectangle = Bounds; 166protected virtual void OnBoundsChanged(Rectangle oldBounds, Rectangle newBounds) 171public void SetBounds(Rectangle bounds, BoundsSpecified specified) 178protected virtual void SetBoundsCore(Rectangle bounds, BoundsSpecified specified) 182Rectangle oldBounds = _bounds;
System\Windows\Forms\Layout\CommonProperties.cs (6)
151internal static Rectangle GetSpecifiedBounds(IArrangedElement element) => 152element.Properties.TryGetValue(s_specifiedBoundsProperty, out Rectangle rectangle) 206Rectangle bounds = element.Bounds; 230Rectangle bounds = element.Bounds; 286Rectangle originalBounds = GetSpecifiedBounds(element); 336Rectangle bounds = new(x, y, width, height);
System\Windows\Forms\Layout\Containers\ContainerControl.cs (2)
683internal override Rectangle GetToolNativeScreenRectangle() 1367internal void ScaleContainerForDpi(int deviceDpiNew, int deviceDpiOld, Rectangle suggestedRectangle)
System\Windows\Forms\Layout\Containers\SplitContainer.cs (12)
45private Rectangle _splitterRect; 762public Rectangle SplitterRectangle 766Rectangle r = _splitterRect; 988Rectangle r = CalcSplitLine(_splitterDistance, 0); 1101Rectangle r = CalcSplitLine(GetSplitterDistance(e.X, e.Y), 0); 1373private Rectangle CalcSplitLine(int splitSize, int minWeight) 1375Rectangle r = default; 1461private void DrawFocus(Graphics g, Rectangle r) 1473Rectangle r = CalcSplitLine(splitSize, 3); 2280internal override Rectangle GetToolNativeScreenRectangle() 2283Rectangle containerRectangle = base.GetToolNativeScreenRectangle(); 2284Rectangle splitterRectangle = SplitterRectangle;
System\Windows\Forms\Layout\DefaultLayout.AnchorInfo.cs (1)
25public Rectangle DisplayRectangle;
System\Windows\Forms\Layout\DefaultLayout.cs (42)
31Rectangle bounds = GetCachedBounds(element); 47Rectangle newBounds = bounds; 77private static Rectangle GetGrowthBounds(IArrangedElement element, Size newSize) 80Rectangle oldBounds = GetCachedBounds(element); 98Rectangle newBounds = new(location, newSize); 149private static Rectangle GetAnchorDestination(IArrangedElement element, Rectangle displayRect, bool measureOnly) 157private static Rectangle ComputeAnchoredBoundsV2(IArrangedElement element, Rectangle displayRectangle) 159Rectangle bounds = GetCachedBounds(element); 236private static Rectangle ComputeAnchoredBounds(IArrangedElement element, Rectangle displayRect, bool measureOnly) 294Rectangle cachedBounds = GetCachedBounds(element); 351Rectangle displayRectangle = container.DisplayRectangle; 384Rectangle remainingBounds = measureOnly ? Rectangle.Empty : container.DisplayRectangle; 405Rectangle newElementBounds = new(remainingBounds.X, remainingBounds.Y, elementSize.Width, elementSize.Height); 418Rectangle newElementBounds = new(remainingBounds.X, remainingBounds.Bottom - elementSize.Height, elementSize.Width, elementSize.Height); 431Rectangle newElementBounds = new(remainingBounds.X, remainingBounds.Y, elementSize.Width, elementSize.Height); 444Rectangle newElementBounds = new(remainingBounds.Right - elementSize.Width, remainingBounds.Y, elementSize.Width, elementSize.Height); 462Rectangle newElementBounds = new(remainingBounds.X, remainingBounds.Y, elementSize.Width, elementSize.Height); 488private static void TryCalculatePreferredSizeDockedControl(IArrangedElement element, Rectangle newElementBounds, bool measureOnly, ref Size preferredSize, ref Rectangle remainingBounds) 737Rectangle cachedBounds = GetCachedBounds(element); 746Rectangle elementBounds = element.Bounds; 752Rectangle parentDisplayRect = element.Container.DisplayRectangle; 884Rectangle displayRectangle = control.Parent!.DisplayRectangle; 885Rectangle elementBounds = GetCachedBounds(control); 995Rectangle displayRect = element.Container!.DisplayRectangle; 1010private static Rectangle GetCachedBounds(IArrangedElement element) 1019return (Rectangle)bounds; 1035Rectangle displayRectangle = container.DisplayRectangle; 1066Rectangle bounds = (Rectangle)entry.Value!; 1079private static void SetCachedBounds(IArrangedElement element, Rectangle bounds) 1131Rectangle elementSpace = LayoutUtils.InflateRect(GetCachedBounds(element), margin); 1154Rectangle bounds = GetCachedBounds(element); 1159Rectangle anchorDest = GetAnchorDestination(element, Rectangle.Empty, measureOnly: true); 1170Rectangle anchorDest = GetAnchorDestination(element, Rectangle.Empty, measureOnly: true); 1174Rectangle bounds = GetCachedBounds(element);
System\Windows\Forms\Layout\FlowLayout.BottomUpProxy.cs (1)
27public override Rectangle Bounds
System\Windows\Forms\Layout\FlowLayout.ContainerProxy.cs (6)
32private Rectangle _displayRect; 45public virtual Rectangle Bounds 93public Rectangle DisplayRect 134protected Rectangle RTLTranslateNoMarginSwap(Rectangle bounds) 136Rectangle newBounds = bounds;
System\Windows\Forms\Layout\FlowLayout.cs (8)
25Rectangle measureBounds = new(new Point(0, 0), proposedConstraints); 53private static Size TryCalculatePreferredSize(IArrangedElement container, Rectangle displayRect, bool measureOnly) 76Rectangle measureBounds = new(displayRect.X, displayRect.Y, displayRect.Width, displayRect.Height - layoutSize.Height); 86Rectangle rowBounds = new(displayRect.X, 117Rectangle rowBounds) 141Rectangle displayRectangle, 161Rectangle rowBounds, 226Rectangle cellBounds = new(location, new Size(requiredSize.Width, rowBounds.Height));
System\Windows\Forms\Layout\FlowLayout.ElementProxy.cs (1)
52public virtual Rectangle Bounds
System\Windows\Forms\Layout\FlowLayout.RightToLeftProxy.cs (1)
16public override Rectangle Bounds
System\Windows\Forms\Layout\FlowLayout.VerticalElementProxy.cs (1)
44public override Rectangle Bounds
System\Windows\Forms\Layout\IArrangedElement.cs (3)
14Rectangle Bounds { get; } 21void SetBounds(Rectangle bounds, BoundsSpecified specified); 35Rectangle DisplayRectangle { get; }
System\Windows\Forms\Layout\LayoutUtils.cs (43)
16public static readonly Rectangle s_maxRectangle = new(0, 0, int.MaxValue, int.MaxValue); 219public static bool IsIntersectHorizontally(Rectangle rect1, Rectangle rect2) 241public static bool IsIntersectVertically(Rectangle rect1, Rectangle rect2) 275public static Rectangle AlignAndStretch(Size fitThis, Rectangle withinThis, AnchorStyles anchorStyles) 280public static Rectangle Align(Size alignThis, Rectangle withinThis, AnchorStyles anchorStyles) 285public static Rectangle Align(Size alignThis, Rectangle withinThis, ContentAlignment align) 290public static Rectangle HAlign(Size alignThis, Rectangle withinThis, AnchorStyles anchorStyles) 306private static Rectangle HAlign(Size alignThis, Rectangle withinThis, ContentAlignment align) 322public static Rectangle VAlign(Size alignThis, Rectangle withinThis, AnchorStyles anchorStyles) 338public static Rectangle VAlign(Size alignThis, Rectangle withinThis, ContentAlignment align) 372public static Rectangle InflateRect(Rectangle rect, Padding padding) 381public static Rectangle DeflateRect(Rectangle rect, Padding padding) 440public static Rectangle FlipRectangle(Rectangle rect) 448public static Rectangle FlipRectangleIf(bool condition, Rectangle rect) 488public static bool IsZeroWidthOrHeight(Rectangle rectangle) 503public static void SplitRegion(Rectangle bounds, Size specifiedContent, AnchorStyles region1Align, out Rectangle region1, out Rectangle region2) 533Debug.Assert(Rectangle.Union(region1, region2) == bounds, 538public static void ExpandRegionsToFillBounds(Rectangle bounds, AnchorStyles region1Align, ref Rectangle region1, ref Rectangle region2) 567Debug.Assert(Rectangle.Union(region1, region2) == bounds, "region1 and region2 do not add up to bounds."); 589private static Rectangle SubstituteSpecifiedBounds(Rectangle originalBounds, Rectangle substitutionBounds, AnchorStyles specified) 595return Rectangle.FromLTRB(left, top, right, bottom); 601public static Rectangle RTLTranslate(Rectangle bounds, Rectangle withinBounds)
System\Windows\Forms\Layout\TableLayout.cs (6)
1250Rectangle cellBounds = new((int)(startX + cellBorderWidth / 2.0f), (int)(top + cellBorderWidth / 2.0f), width - cellBorderWidth, height - cellBorderWidth); 1268Rectangle elementBounds = LayoutUtils.AlignAndStretch(GetElementSize(element, cellBounds.Size), cellBounds, anchorStyles); 1474Rectangle elementBounds1 = layoutInfo1.Element.Bounds; 1475Rectangle cellsOccupied1 = new(layoutInfo1.ColumnStart, layoutInfo1.RowStart, layoutInfo1.ColumnSpan, layoutInfo1.RowSpan); 1479Rectangle elementBounds2 = layoutInfo2.Element.Bounds; 1480Rectangle cellsOccupied2 = new(layoutInfo2.ColumnStart, layoutInfo2.RowStart, layoutInfo2.ColumnSpan, layoutInfo2.RowSpan);
System\Windows\Forms\MDI\MDIClient.cs (4)
190Rectangle bounds = Bounds; 226Rectangle oldBounds = Bounds; 228Rectangle newBounds = Bounds; 285Rectangle bounds = Bounds;
System\Windows\Forms\Panels\Panel.cs (1)
224private protected override void PrintToMetaFileRecursive(HDC hDC, IntPtr lParam, Rectangle bounds)
System\Windows\Forms\Panels\Panel.PanelAccessibleObject.cs (2)
18internal override Rectangle BoundingRectangle => this.IsOwnerHandleCreated(out Panel? owner) ? 19owner.GetToolNativeScreenRectangle() : Rectangle.Empty;
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutCellPaintEventArgs.cs (5)
16Rectangle clipRectangle, 17Rectangle cellBounds, 29Rectangle clipRectangle, 30Rectangle cellBounds, 40public Rectangle CellBounds { get; }
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutPanel.cs (5)
352Rectangle displayRect = DisplayRectangle; 353Rectangle clipRect = e.ClipRectangle; 380Rectangle outsideCellBounds = new( 386Rectangle insideCellBounds = new( 432Rectangle tableBounds = new(
System\Windows\Forms\Printing\PrintPreviewControl.cs (14)
353Rectangle rect = InsideRectangle; 424private Rectangle InnerClientRectangle 428Rectangle rect = ClientRectangle; 437private Rectangle InsideRectangle 441Rectangle rect = InnerClientRectangle; 462private Rectangle FocusRectangle => new(0, 0, Width - 1, Height - 1); 464private Rectangle ResizeBoxRectangle => new(_vScrollBar.Left, _hScrollBar.Top, _vScrollBar.Width, _hScrollBar.Height); 593private void DrawMessage(Graphics g, Rectangle rect, bool isExceptionPrinting) 614private void DrawPages(Graphics g, Rectangle rect, PreviewPageInfo[] pages, Brush backBrush) 634Rectangle[] pageRenderArea = new Rectangle[_rows * _columns]; 685Rectangle box = pageRenderArea[i]; 717Rectangle focusRect = FocusRectangle; 792Rectangle availableRect = InnerClientRectangle;
System\Windows\Forms\Printing\PrintPreviewDialog.cs (1)
1143Rectangle rect = new(0, 0, item.Bounds.Width - 1, item.Bounds.Height - 1);
System\Windows\Forms\PropertyStore.cs (2)
205else if (typeof(T) == typeof(Rectangle)) 207AddOrUpdate(key, Unsafe.As<T, Rectangle>(ref value));
System\Windows\Forms\Rendering\ControlPaint.cs (56)
98internal static Rectangle CalculateBackgroundImageRectangle(Rectangle bounds, Size imageSize, ImageLayout imageLayout) 100Rectangle result = bounds; 419internal static void PrintBorder(Graphics graphics, Rectangle bounds, BorderStyle style, Border3DStyle b3dStyle) 444Rectangle bounds, 445Rectangle clipRect, 477Rectangle imageRectangle = CalculateBackgroundImageRectangle(bounds, backgroundImage.Size, backgroundImageLayout); 506Rectangle imageRect = imageRectangle; 508Rectangle partOfImageToDraw = new(Point.Empty, imageRect.Size); 520Rectangle imageRect = imageRectangle; 522Rectangle partOfImageToDraw = new( 553public static void DrawBorder(Graphics graphics, Rectangle bounds, Color color, ButtonBorderStyle style) 581Rectangle bounds, 600Rectangle bounds, 1008public static void DrawBorder3D(Graphics graphics, Rectangle rectangle) 1018public static void DrawBorder3D(Graphics graphics, Rectangle rectangle, Border3DStyle style) 1029public static void DrawBorder3D(Graphics graphics, Rectangle rectangle, Border3DStyle style, Border3DSide sides) 1087private static void DrawBorderComplex(Graphics graphics, Rectangle bounds, Color color, ButtonBorderStyle style) 1174Rectangle bounds, 1211public static void DrawButton(Graphics graphics, Rectangle rectangle, ButtonState state) 1233Rectangle rectangle, 1259public static void DrawCheckBox(Graphics graphics, Rectangle rectangle, ButtonState state) 1287public static void DrawComboButton(Graphics graphics, Rectangle rectangle, ButtonState state) 1305public static void DrawContainerGrabHandle(Graphics graphics, Rectangle bounds) 1349private static void DrawFlatCheckBox(Graphics graphics, Rectangle rectangle, ButtonState state) 1371Rectangle rectangle, 1380Rectangle offsetRectangle = new( 1425public static void DrawFocusRectangle(Graphics graphics, Rectangle rectangle) 1432public static void DrawFocusRectangle(Graphics graphics, Rectangle rectangle, Color foreColor, Color backColor) 1435internal static void DrawHighContrastFocusRectangle(Graphics graphics, Rectangle rectangle, Color color) 1438internal static void DrawBlackWhiteFocusRectangle(Graphics graphics, Rectangle rectangle, Color color) 1441private static void DrawFocusRectangle(Graphics graphics, Rectangle rectangle, Color color, bool highContrast, bool blackAndWhite = false) 1511public static void DrawGrabHandle(Graphics graphics, Rectangle rectangle, bool primary, bool enabled) 1523Rectangle fillRect = new( 1538public static void DrawGrid(Graphics graphics, Rectangle area, Size pixelsBetweenDots, Color backColor) 1583Rectangle destination, 1605internal static void DrawImageReplaceColor(Graphics g, Image image, Rectangle dest, Color oldColor, Color newColor) 1625internal static void DrawImageDisabled(Graphics graphics, Image image, Rectangle imageBounds, bool unscaledImage) 1691internal static void EnforceHeaderCellDividerContrast(Graphics graphics, Rectangle bounds) 1708public static void DrawLockedFrame(Graphics graphics, Rectangle rectangle, bool primary) 1726public static void DrawMenuGlyph(Graphics graphics, Rectangle rectangle, MenuGlyph glyph) 1735Rectangle rectangle, 1771public static void DrawMixedCheckBox(Graphics graphics, Rectangle rectangle, ButtonState state) 1788public static void DrawRadioButton(Graphics graphics, Rectangle rectangle, ButtonState state) 1810public static void DrawReversibleFrame(Rectangle rectangle, Color backColor, FrameStyle style) 1870public static void DrawScrollButton(Graphics graphics, Rectangle rectangle, ScrollButton button, ButtonState state) 1892Rectangle bounds = new(x, y, width, height); 1930Rectangle outsideRect, 1931Rectangle insideRect, 1947public static void DrawSizeGrip(Graphics graphics, Color backColor, Rectangle bounds) 2041Rectangle layoutRectangle, 2058Rectangle layoutRectangle, 2081public static void DrawVisualStyleBorder(Graphics graphics, Rectangle bounds) 2095public static void FillReversibleRectangle(Rectangle rectangle, Color backColor) 2376Rectangle bound) 2409internal static void PaintTableCellBorder(TableLayoutPanelCellBorderStyle borderStyle, Graphics g, Rectangle bound)
System\Windows\Forms\Rendering\ControlPaint_ModernControlButtonRenderer.cs (7)
22Rectangle bounds, 128Rectangle focusRect = bounds; 152Rectangle bounds, 213private static int ScaleSymbolSize(Rectangle bounds) 232private static void DrawUpDownArrows(Graphics graphics, Brush brush, int centerX, int centerY, Rectangle bounds) 260private static void DrawLeftRightArrows(Graphics graphics, Brush brush, int centerX, int centerY, Rectangle bounds) 288private static void DrawEllipseSymbol(Graphics graphics, Brush brush, int centerX, int centerY, Rectangle bounds)
System\Windows\Forms\Rendering\DCMapping.cs (1)
29public unsafe DCMapping(HDC hdc, Rectangle bounds)
System\Windows\Forms\Rendering\DpiChangedEventArgs.cs (1)
29public Rectangle SuggestedRectangle { get; }
System\Windows\Forms\Rendering\DrawingEventArgs.cs (3)
32Rectangle clipRect, 48Rectangle clipRect, 69internal Rectangle ClipRectangle { get; }
System\Windows\Forms\Rendering\DrawItemEventArgs.cs (6)
11/// including the item index, the <see cref="Rectangle"/> in which the drawing should be done, and the 31public DrawItemEventArgs(Graphics graphics, Font? font, Rectangle rect, int index, DrawItemState state) 42Rectangle rect, 59Rectangle rect, 68Rectangle rect, 95public Rectangle Bounds => _event.ClipRectangle;
System\Windows\Forms\Rendering\InvalidateEventArgs.cs (3)
17public InvalidateEventArgs(Rectangle invalidRect) 23/// Gets a value indicating the <see cref="Rectangle"/> that contains the 26public Rectangle InvalidRect { get; }
System\Windows\Forms\Rendering\PaintEventArgs.cs (5)
37public PaintEventArgs(Graphics graphics, Rectangle clipRect) : this( 47Rectangle clipRect) 57Rectangle clipRect, 69Rectangle clipRect, 80public Rectangle ClipRectangle => _event.ClipRectangle;
System\Windows\Forms\Rendering\TextExtensions.cs (4)
53Rectangle bounds, 151public static unsafe Rectangle AdjustForVerticalAlignment( 154Rectangle bounds, 180Rectangle adjustedBounds = bounds;
System\Windows\Forms\Rendering\TextRenderer.cs (18)
149public static void DrawText(IDeviceContext dc, string? text, Font? font, Rectangle bounds, Color foreColor) 158/// <param name="bounds">The <see cref="Rectangle"/> that represents the bounds of the text.</param> 165Rectangle bounds, 173Rectangle bounds, 185/// <param name="bounds">The <see cref="Rectangle"/> that represents the bounds of the text.</param> 193Rectangle bounds, 202Rectangle bounds, 214/// <param name="bounds">The <see cref="Rectangle"/> that represents the bounds of the text.</param> 225Rectangle bounds, 241Rectangle bounds, 254/// <param name="bounds">The <see cref="Rectangle"/> that represents the bounds of the text.</param> 266Rectangle bounds, 293Rectangle bounds, 316Rectangle bounds, 325Rectangle bounds, 349Rectangle bounds, 359Rectangle bounds, 392/// <see cref="DrawText(IDeviceContext, ReadOnlySpan{char}, Font?, Rectangle, Color, TextFormatFlags)"/>
System\Windows\Forms\Screen.cs (14)
19private readonly Rectangle _bounds; 24private Rectangle _workingArea = Rectangle.Empty; 139public Rectangle Bounds => _bounds; 181public unsafe Rectangle WorkingArea 257public static Screen FromRectangle(Rectangle rect) 283public static Rectangle GetWorkingArea(Point pt) => FromPoint(pt).WorkingArea; 288public static Rectangle GetWorkingArea(Rectangle rect) => FromRectangle(rect).WorkingArea; 293public static Rectangle GetWorkingArea(Control ctl) => FromControl(ctl).WorkingArea; 298public static Rectangle GetBounds(Point pt) => FromPoint(pt).Bounds; 303public static Rectangle GetBounds(Rectangle rect) => FromRectangle(rect).Bounds; 308public static Rectangle GetBounds(Control ctl) => FromControl(ctl).Bounds;
System\Windows\Forms\Scrolling\ScrollableControl.cs (26)
27private Rectangle _displayRect = Rectangle.Empty; 119Rectangle rect = GetDisplayRectInternal(); 188public override Rectangle DisplayRectangle 192Rectangle rect = ClientRectangle; 212Rectangle IArrangedElement.DisplayRectangle 216Rectangle displayRectangle = DisplayRectangle; 281Rectangle display = GetDisplayRectInternal(); 298private bool ApplyScrollbarChanges(Rectangle display) 303Rectangle currentClient = ClientRectangle; 304Rectangle fullClient = currentClient; 305Rectangle minClient = fullClient; 452Rectangle bounds = current.Bounds; 492Rectangle clientToBe = fullClient; 543private Rectangle GetDisplayRectInternal() 608Rectangle client = ClientRectangle; 624Rectangle client = ClientRectangle; 727Rectangle display = GetDisplayRectInternal(); 741Rectangle client = ClientRectangle; 746Rectangle displayRectangle = _displayRect; 822Rectangle client = ClientRectangle; 846Rectangle client = ClientRectangle; 852Rectangle bounds = activeControl.Bounds; 1137Rectangle displayRect = _displayRect; 1257Rectangle client = ClientRectangle; 1352Rectangle client = ClientRectangle;
System\Windows\Forms\Scrolling\ScrollBar.cs (2)
477protected override Rectangle GetScaledBounds(Rectangle bounds, SizeF factor, BoundsSpecified specified)
System\Windows\Forms\Scrolling\ScrollBar.ScrollBarChildAccessibleObject.cs (2)
21public override Rectangle Bounds 27return Rectangle.Empty;
System\Windows\Forms\Scrolling\ScrollBarRenderer.cs (10)
27public static void DrawArrowButton(Graphics g, Rectangle bounds, ScrollBarArrowButtonState state) 37public static void DrawHorizontalThumb(Graphics g, Rectangle bounds, ScrollBarState state) 47public static void DrawVerticalThumb(Graphics g, Rectangle bounds, ScrollBarState state) 57public static void DrawHorizontalThumbGrip(Graphics g, Rectangle bounds, ScrollBarState state) 67public static void DrawVerticalThumbGrip(Graphics g, Rectangle bounds, ScrollBarState state) 77public static void DrawRightHorizontalTrack(Graphics g, Rectangle bounds, ScrollBarState state) 87public static void DrawLeftHorizontalTrack(Graphics g, Rectangle bounds, ScrollBarState state) 97public static void DrawUpperVerticalTrack(Graphics g, Rectangle bounds, ScrollBarState state) 107public static void DrawLowerVerticalTrack(Graphics g, Rectangle bounds, ScrollBarState state) 117public static void DrawSizeBox(Graphics g, Rectangle bounds, ScrollBarSizeBoxState state)
System\Windows\Forms\SystemInformation.cs (2)
181public static Rectangle WorkingArea 449public static Rectangle VirtualScreen
System\Windows\Forms\ToolTip\DrawToolTipEventArgs.cs (2)
23Rectangle bounds, 57public Rectangle Bounds { get; }
System\Windows\Forms\ToolTip\IKeyboardToolTip.cs (2)
19Rectangle GetNativeScreenRectangle(); 25IList<Rectangle> GetNeighboringToolsRectangles();
System\Windows\Forms\ToolTip\ToolTip.cs (17)
1479Rectangle toolRectangle = tool.GetNativeScreenRectangle(); 1547private Point GetOptimalToolTipPosition(IKeyboardToolTip tool, Rectangle toolRectangle, int width, int height) 1553Rectangle[] possibleLocations = 1562IList<Rectangle> neighboringToolsRectangles = tool.GetNeighboringToolsRectangles(); 1570foreach (Rectangle neighboringToolRectangle in neighboringToolsRectangles) 1572Rectangle intersection = Rectangle.Intersect(possibleLocations[i], neighboringToolRectangle); 1581Rectangle screenBounds = SystemInformation.VirtualScreen; 1585Rectangle locationAreaWithinScreen = Rectangle.Intersect(screenBounds, possibleLocations[i]); 1595Rectangle topContainerBounds = ((IKeyboardToolTip?)TopLevelControl)?.GetNativeScreenRectangle() ?? Rectangle.Empty; 1600Rectangle locationWithinTopControlRectangle = Rectangle.Intersect(topContainerBounds, possibleLocations[i]); 1613Rectangle optimalLocation = possibleLocations[0]; 2312Rectangle bounds = paintScope.PaintRectangle; 2313if (bounds == Rectangle.Empty)
System\Windows\Forms\VisualStyles\VisualStyleRenderer.cs (33)
211public void DrawBackground(IDeviceContext dc, Rectangle bounds) 219internal unsafe void DrawBackground(HDC dc, Rectangle bounds, HWND hwnd = default) 240public void DrawBackground(IDeviceContext dc, Rectangle bounds, Rectangle clipRectangle) 248internal unsafe void DrawBackground(HDC dc, Rectangle bounds, Rectangle clipRectangle, HWND hwnd) 267public Rectangle DrawEdge(IDeviceContext dc, Rectangle bounds, Edges edges, EdgeStyle style, EdgeEffects effects) 275internal unsafe Rectangle DrawEdge(HDC dc, Rectangle bounds, Edges edges, EdgeStyle style, EdgeEffects effects) 299public void DrawImage(Graphics g, Rectangle bounds, Image image) 314public void DrawImage(Graphics g, Rectangle bounds, ImageList imageList, int imageIndex) 335public void DrawParentBackground(IDeviceContext dc, Rectangle bounds, Control childControl) 355public void DrawText(IDeviceContext dc, Rectangle bounds, string? textToDraw) 363public void DrawText(IDeviceContext dc, Rectangle bounds, string? textToDraw, bool drawDisabled) 371public void DrawText(IDeviceContext dc, Rectangle bounds, string? textToDraw, bool drawDisabled, TextFormatFlags flags) 379internal void DrawText(HDC dc, Rectangle bounds, string? textToDraw, bool drawDisabled, TextFormatFlags flags) 405public Rectangle GetBackgroundContentRectangle(IDeviceContext dc, Rectangle bounds) 413internal Rectangle GetBackgroundContentRectangle(HDC dc, Rectangle bounds) 417return Rectangle.Empty; 427public Rectangle GetBackgroundExtent(IDeviceContext dc, Rectangle contentBounds) 433return Rectangle.Empty; 446public unsafe Region? GetBackgroundRegion(IDeviceContext dc, Rectangle bounds) 598public unsafe Size GetPartSize(IDeviceContext dc, Rectangle bounds, ThemeSizeType type) 658public unsafe Rectangle GetTextExtent(IDeviceContext dc, string textToDraw, TextFormatFlags flags) 681public unsafe Rectangle GetTextExtent(IDeviceContext dc, Rectangle bounds, string textToDraw, TextFormatFlags flags) 716public HitTestCode HitTestBackground(IDeviceContext dc, Rectangle backgroundRectangle, Point pt, HitTestOptions options) 738public HitTestCode HitTestBackground(Graphics g, Rectangle backgroundRectangle, Region region, Point pt, HitTestOptions options) 750public HitTestCode HitTestBackground(IDeviceContext dc, Rectangle backgroundRectangle, IntPtr hRgn, Point pt, HitTestOptions options)
System.Windows.Forms.Design (520)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (3)
586Rectangle button = e.Bounds with { Width = w }; 601Rectangle res = e.Bounds with { X = e.Bounds.X + offset, Width = e.Bounds.Width - offset }; 612Rectangle baseVar = new(e.Bounds.X + offset, e.Bounds.Y + 1, PaintWidth, e.Bounds.Height - 3);
System\ComponentModel\Design\CollectionEditor.SplitButton.cs (3)
16private Rectangle _dropDownRectangle; 196Rectangle bounds = new(0, 0, Width, Height); 242private static void PaintArrow(IDeviceContext deviceContext, Rectangle dropDownRect)
System\ComponentModel\Design\DesignerActionPanel.cs (4)
232public static Point ComputePreferredDesktopLocation(Rectangle rectangleAnchor, Size sizePanel, out DockStyle edgeToDock) 234Rectangle rectScreen = Screen.FromPoint(rectangleAnchor.Location).WorkingArea; 471Rectangle rect = Bounds; 488Rectangle originalClip = e.ClipRectangle;
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (5)
291Rectangle rect = new(1, 1, width - 2, height - 2); 341Rectangle editorBounds = new(Point.Empty, EditRegionSize); 344Rectangle rectScreen = Screen.FromRectangle(ActionPanel.RectangleToScreen(editorBounds)).WorkingArea; 365Rectangle editorBounds = new(Point.Empty, EditRegionSize); 368Rectangle rectScreen = Screen.FromRectangle(ActionPanel.RectangleToScreen(editorBounds)).WorkingArea;
System\ComponentModel\Design\DesignerActionPanel.TextBoxPropertyLine.cs (1)
290Rectangle editRect = new(EditRegionRelativeLocation, EditRegionSize);
System\ComponentModel\Design\DesignerActionUI.cs (2)
198Rectangle trayBounds = trayControl.Bounds; 656Rectangle rectGlyph = new(glyphLocationScreenCoord, glyph.Bounds.Size);
System\ComponentModel\Design\FlowLayoutPanelDesigner.cs (2)
15public Rectangle MarginBounds; 20public Rectangle ControlBounds;
System\ComponentModel\Design\MultilineStringEditor.MultilineStringEditorUI.cs (2)
163Rectangle workingArea = Screen.GetWorkingArea(this); 239Rectangle workingArea = Screen.GetWorkingArea(this);
System\ComponentModel\Design\SelectionService.cs (1)
473_statusCommandUI.SetStatusInformation(Rectangle.Empty);
System\Drawing\Design\ColorEditor.ColorPalette.ColorPaletteAccessibleObject.ColorCellAccessibleObject.cs (2)
27public override Rectangle Bounds 32Rectangle rect = default;
System\Drawing\Design\ColorEditor.ColorPalette.cs (10)
121private static void FillRectWithCellBounds(int across, int down, ref Rectangle rect) 207Rectangle r = default; 209Invalidate(Rectangle.Inflate(r, 5, 5)); 218Rectangle r = default; 220Invalidate(Rectangle.Inflate(r, 5, 5)); 363Rectangle rect = new() 385Rectangle.Inflate(rect, 3, 3), 396Rectangle.Inflate(rect, 5, 5), 403Rectangle.Inflate(rect, 2, 2), 414private static void PaintValue(Color color, Graphics g, Rectangle rect)
System\Drawing\Design\ColorEditor.ColorUI.cs (3)
87Rectangle rectItemSize = _tabControl.GetTabRect(0); 309Rectangle rectTabControl = _tabControl.TabPages[0].ClientRectangle; 310Rectangle rectItemSize = _tabControl.GetTabRect(1);
System\Drawing\Design\IconEditor.cs (1)
118Rectangle rectangle = e.Bounds;
System\Drawing\Design\ImageEditor.cs (1)
176Rectangle r = e.Bounds;
System\Windows\Forms\Design\AnchorEditor.AnchorUI.cs (3)
191Rectangle rc = ClientRectangle; 207Rectangle rc = ClientRectangle; 273Rectangle rc = ClientRectangle;
System\Windows\Forms\Design\Behavior\Adorner.cs (1)
76public void Invalidate(Rectangle rectangle)
System\Windows\Forms\Design\Behavior\BehaviorService.AdornerWindow.cs (4)
96internal Rectangle DesignerFrameDisplayRectangle 97=> DesignerFrameValid ? DesignerFrame.DisplayRectangle : Rectangle.Empty; 144internal void InvalidateAdornerWindow(Rectangle rectangle) 301Rectangle paintRect = clip;
System\Windows\Forms\Design\Behavior\BehaviorService.cs (4)
294public Rectangle ControlRectInAdornerWindow(Control c) 298return Rectangle.Empty; 371public void Invalidate(Rectangle rect) => _adornerWindow.InvalidateAdornerWindow(rect); 417internal void ProcessPaintMessage(Rectangle paintRect)
System\Windows\Forms\Design\Behavior\ContainerSelectorGlyph.cs (3)
15private readonly Rectangle _glyphBounds; 22internal ContainerSelectorGlyph(Rectangle containerBounds, int glyphSize, int glyphOffset, ContainerSelectorBehavior? behavior) 32public override Rectangle Bounds => _glyphBounds;
System\Windows\Forms\Design\Behavior\ControlBodyGlyph.cs (4)
16private Rectangle _bounds; // bounds of the related control 24Rectangle bounds, 35public ControlBodyGlyph(Rectangle bounds, Cursor? cursor, IComponent? relatedComponent, Behavior? behavior) 46public override Rectangle Bounds => _bounds;
System\Windows\Forms\Design\Behavior\DesignerActionGlyph.cs (10)
20private Rectangle _alternativeBounds = Rectangle.Empty; // if !empty, this represents the bounds of the tray control this glyph is related to 21private Rectangle _bounds; // the bounds of our glyph 36: this(behavior, adorner, Rectangle.Empty, null) 40public DesignerActionGlyph(DesignerActionBehavior? behavior, Rectangle alternativeBounds, Control? alternativeParent) 48private DesignerActionGlyph(DesignerActionBehavior? behavior, Adorner? adorner, Rectangle alternativeBounds, Control? alternativeParent) 61public override Rectangle Bounds 154Rectangle newRect = DesignerUtils.GetBoundsForNoResizeSelectionType(_alternativeBounds, SelectionBorderGlyphType.Top); 213pe.Graphics.FillRectangle(DesignerUtils.HoverBrush, Rectangle.Inflate(_bounds, -1, -1)); 226internal void UpdateAlternativeBounds(Rectangle newBounds)
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (22)
26private Rectangle _cachedDragRect; // used to store drag rect between erasing & waiting to render 59private readonly Dictionary<SnapLine, Rectangle> _snapLineToBounds = []; 198Rectangle controlRect = controlDesigner.Control.ClientRectangle; 200Rectangle controlBounds = controlDesigner.Control.Bounds; 270private int BuildDistanceArray(List<SnapLine> snapLines, List<SnapLine> targetSnapLines, int[] distances, Rectangle dragBounds) 340Rectangle invalidRect; 443private void IdentifyAndStoreValidLines(List<SnapLine> snapLines, int[] distances, Rectangle dragBounds, int smallestDistance) 472private bool AddChildCompSnaplines(IComponent comp, List<IComponent>? dragComponents, Rectangle clipBounds, Control? targetControl) 535Rectangle clipBounds = new(0, 0, rootControl.ClientRectangle.Width, rootControl.ClientRectangle.Height); 689Rectangle currentBounds = new(_behaviorService.ControlToAdornerWindow(targetControl), targetControl.Size); 817private void RenderSnapLines(Line[] lines, Rectangle dragRect) 924private void StoreSnapLine(SnapLine snapLine, Rectangle dragBounds) 926Rectangle bounds = _snapLineToBounds[snapLine]; 999private bool ValidateMarginOrPaddingLine(SnapLine snapLine, Rectangle dragBounds) 1001Rectangle bounds = _snapLineToBounds[snapLine]; 1035internal Point OnMouseMove(Rectangle dragBounds, SnapLine[] snapLines) 1046internal Point OnMouseMove(Rectangle dragBounds, SnapLine[] snapLines, ref bool didSnap, bool shouldSnapHorizontally) 1075internal Point OnMouseMove(Rectangle dragBounds) 1087Rectangle dragBounds = new(_behaviorService.ControlToAdornerWindow(targetControl), targetControl.Size); 1096private Point OnMouseMove(Rectangle dragBounds, bool offsetSnapLines, ref bool didSnap, bool shouldSnapHorizontally) 1144Rectangle tempDragRect = new(dragBounds.Left + snapPoint.X, dragBounds.Top + snapPoint.Y, dragBounds.Width, dragBounds.Height); 1165internal void RenderSnapLinesInternal(Rectangle dragRect)
System\Windows\Forms\Design\Behavior\DragAssistanceManager.Line.cs (1)
25public Rectangle OriginalBounds { get; set; }
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (17)
55private Rectangle _dragImageRect; // Rectangle of the dragImage -- in SOURCE AdornerWindow coordinates 56private Rectangle _clearDragImageRect; // Rectangle used to remember the last dragimage rect we cleared 115_dragImageRect = Rectangle.Empty; 116_clearDragImageRect = Rectangle.Empty; 201if (_dragImageRect != Rectangle.Empty) 203Rectangle rect = _dragImageRect; 689Rectangle controlRect = _behaviorServiceSource.ControlRectInAdornerWindow(dragControl); 738Rectangle newRect = new(newPosition.X, newPosition.Y, 780Rectangle previousImageRect = _dragImageRect; 790Rectangle newImageRect = _dragImageRect; 793Rectangle unionRectangle = Rectangle.Union(newImageRect, previousImageRect); 932_dragImageRect = Rectangle.Empty; 933_clearDragImageRect = Rectangle.Empty; 944Rectangle controlRect = _behaviorServiceSource.ControlRectInAdornerWindow(dragControl); 952_dragImageRect = Rectangle.Union(_dragImageRect, controlRect); 1027Rectangle controlRect = new(_dragComponents[i].draggedLocation.X - _dragImageRect.X,
System\Windows\Forms\Design\Behavior\Glyph.cs (2)
38public virtual Rectangle Bounds => Rectangle.Empty;
System\Windows\Forms\Design\Behavior\GrabHandleGlyph.cs (1)
22internal GrabHandleGlyph(Rectangle controlBounds, GrabHandleGlyphType type, Behavior? behavior, bool primarySelection)
System\Windows\Forms\Design\Behavior\LockedBorderGlyph.cs (2)
18internal LockedBorderGlyph(Rectangle controlBounds, SelectionBorderGlyphType type) 27private void InitializeGlyph(Rectangle controlBounds, SelectionBorderGlyphType type)
System\Windows\Forms\Design\Behavior\LockedHandleGlyph.cs (1)
21internal LockedHandleGlyph(Rectangle controlBounds, bool primarySelection) : base(null)
System\Windows\Forms\Design\Behavior\MiniLockedBorderGlyph.cs (2)
26internal MiniLockedBorderGlyph(Rectangle controlBounds, SelectionBorderGlyphType type, Behavior behavior) 35private void InitializeGlyph(Rectangle controlBounds, SelectionBorderGlyphType type)
System\Windows\Forms\Design\Behavior\NoResizeHandleGlyph.cs (1)
21internal NoResizeHandleGlyph(Rectangle controlBounds, SelectionRules selRules, bool primarySelection, Behavior? behavior)
System\Windows\Forms\Design\Behavior\NoResizeSelectionBorderGlyph.cs (2)
16internal NoResizeSelectionBorderGlyph(Rectangle controlBounds, SelectionRules rules, SelectionBorderGlyphType type, Behavior? behavior) 25private void InitializeGlyph(Rectangle controlBounds, SelectionRules selRules, SelectionBorderGlyphType type)
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (17)
22public Rectangle resizeBounds; 90private Rectangle AdjustToGrid(Rectangle controlBounds, SelectionRules rules) 92Rectangle rect = controlBounds; 381Rectangle borderRect = BehaviorService.ControlRectInAdornerWindow(control); 388newRegion.Exclude(Rectangle.Inflate(borderRect, -BorderSize, -BorderSize)); 618Rectangle controlBounds = new(_resizeComponents[0].resizeBounds.X, _resizeComponents[0].resizeBounds.Y, 629Rectangle newBorderRect = Rectangle.Empty; 630Rectangle targetBorderRect = Rectangle.Empty; 636Rectangle bounds = control.Bounds; 637Rectangle oldBounds = bounds; 640Rectangle baseBounds = _resizeComponents[i].resizeBounds; 641Rectangle oldBorderRect = BehaviorService.ControlRectInAdornerWindow(control); 854newRegion.Exclude(Rectangle.Inflate(newBorderRect, -BorderSize, -BorderSize)); 863oldRegion.Exclude(Rectangle.Inflate(oldBorderRect, -BorderSize, -BorderSize));
System\Windows\Forms\Design\Behavior\SelectionBorderGlyph.cs (2)
16internal SelectionBorderGlyph(Rectangle controlBounds, SelectionRules rules, SelectionBorderGlyphType type, Behavior? behavior) 25private void InitializeGlyph(Rectangle controlBounds, SelectionRules selRules, SelectionBorderGlyphType type)
System\Windows\Forms\Design\Behavior\SelectionGlyphBase.cs (3)
14protected Rectangle bounds; // defines the bounds of the selection glyph 15protected Rectangle hitBounds; // defines the bounds used for hittest - it could be different than the bounds of the glyph itself 58public override Rectangle Bounds
System\Windows\Forms\Design\Behavior\SelectionManager.cs (17)
27private Rectangle[]? _previousSelectionBounds; 30private Rectangle[]? _currentSelectionBounds; 148ref Rectangle currentSelectionBounds = ref _currentSelectionBounds[_curCompIndex]; 149currentSelectionBounds = currentSelectionBounds == Rectangle.Empty 151: Rectangle.Union(currentSelectionBounds, bodyGlyph.Bounds); 163_currentSelectionBounds[_curCompIndex] = Rectangle.Union(_currentSelectionBounds[_curCompIndex], glyph.Bounds); 311private Region DetermineRegionToRefresh(object? primarySelection, Rectangle[] previousSelectionBounds, Rectangle[] currentSelectionBounds) 313Region toRefresh = new(Rectangle.Empty); 314Rectangle[] larger; 315Rectangle[] smaller; 339foreach (Rectangle large in larger) 346Rectangle small = smaller[s]; 417_currentSelectionBounds = new Rectangle[selComps.Count]; 435Rectangle toUpdate = _currentSelectionBounds[0]; 438toUpdate = Rectangle.Union(toUpdate, _currentSelectionBounds[i]); 441if (toUpdate != Rectangle.Empty)
System\Windows\Forms\Design\Behavior\TableLayoutPanelResizeGlyph.cs (3)
10private Rectangle _bounds; 19Rectangle controlBounds, 35public override Rectangle Bounds => _bounds;
System\Windows\Forms\Design\Behavior\ToolboxItemSnapLineBehavior.cs (6)
20private Rectangle _lastRectangle; // cache the last mouse loc - so we can ignore when mouse doesn't move 36_lastRectangle = Rectangle.Empty; 87_lastRectangle = Rectangle.Empty; 228private static SnapLine[] GenerateNewToolSnapLines(Rectangle r) 306Rectangle newRectangle = new( 343Rectangle statusRect = new(newRectangle.X - adornerServiceOrigin.X, newRectangle.Y - adornerServiceOrigin.Y, 0, 0);
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionBehavior.cs (4)
85Rectangle oldBounds = selectionGlyph.Bounds; 95Rectangle oldBounds = selectionGlyph.Bounds; 119Rectangle translatedBounds = new(loc, parent.Size); 246Rectangle oldBounds = selectionGlyph.Bounds;
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionGlyph.cs (11)
14private Rectangle _glyphBounds; 25internal ToolStripPanelSelectionGlyph(Rectangle bounds, Cursor cursor, IComponent relatedComponent, IServiceProvider? _provider, ToolStripPanelSelectionBehavior behavior) : base(bounds, cursor, relatedComponent, behavior) 63Rectangle translatedBounds = _behaviorService.ControlRectInAdornerWindow(_relatedPanel!); 65_glyphBounds = Rectangle.Empty; 95private void CollapseGlyph(Rectangle bounds) 144private void ExpandGlyph(Rectangle bounds) 196public override Rectangle Bounds => _glyphBounds; 209Rectangle baseParentBounds = _behaviorService.ControlRectInAdornerWindow(_baseParent); 210return _glyphBounds != Rectangle.Empty && baseParentBounds.Contains(_glyphBounds) && _glyphBounds.Contains(p) ? Cursors.Hand : null; 223Rectangle baseParentBounds = _behaviorService.ControlRectInAdornerWindow(_baseParent); 224if (_relatedPanel!.Visible && _image is not null && _glyphBounds != Rectangle.Empty && baseParentBounds.Contains(_glyphBounds))
System\Windows\Forms\Design\CommandSet.cs (2)
3304Rectangle childBounds = child.Bounds; 3327Rectangle pasteControlBounds = pasteControl.Bounds;
System\Windows\Forms\Design\ComponentTray.cs (24)
54private Rectangle _mouseDragWorkspace = Rectangle.Empty; // a temp work rectangle we cache for perf 193Rectangle bounds = control.Bounds; 583void ISelectionUIHandler.DragMoved(object[] components, Rectangle offset) => DragHandler.DragMoved(components, offset); 607Rectangle ISelectionUIHandler.GetComponentBounds(object component) => Rectangle.Empty; 611Rectangle ISelectionUIHandler.GetSelectionClipRect(object component) 618return Rectangle.Empty; 649Cursor.Clip = Rectangle.Empty; 1177Cursor.Clip = Rectangle.Empty; 1319Cursor.Clip = Rectangle.Empty; 1323Rectangle rect = new Rectangle 1359private IComponent[] GetComponentsInRect(Rectangle rect) 1366Rectangle bounds = child.Bounds; 1442Rectangle innerRect = c.Bounds; 1816Rectangle display = DisplayRectangle; 1844Rectangle bounds = prevCtl.Bounds; 1974Rectangle rc = Bounds; 2238Cursor.Clip = Rectangle.Empty; 2256Rectangle rc = ClientRectangle; 2402Rectangle bounds = Bounds; 2864public override Rectangle GetUpdatedRect(Rectangle originalRect, Rectangle dragRect, bool updateSize)
System\Windows\Forms\Design\ControlCommandSet.cs (2)
714Rectangle dragRect = new(primaryControl.Location.X, primaryControl.Location.Y, 717Rectangle newRect = parentDesigner.GetSnappedRect(primaryControl.Bounds, dragRect, true);
System\Windows\Forms\Design\ControlDesigner.ControlDesignerAccessibleObject.cs (1)
24public override Rectangle Bounds => _control.AccessibilityObject.Bounds;
System\Windows\Forms\Design\ControlDesigner.cs (12)
697Rectangle translatedBounds = BehaviorService?.ControlRectInAdornerWindow(Control) ?? Rectangle.Empty; 705Rectangle parentRect = parent.RectangleToScreen(parent.ClientRectangle); 706Rectangle controlRect = Control.RectangleToScreen(Control.ClientRectangle); 756Rectangle translatedBounds = BehaviorService.ControlRectInAdornerWindow(Control); 2089Rectangle paintRect = clip; 2133Rectangle controlScreenBounds = new(parent.PointToScreen(Control.Location), Control.Size); 2134Rectangle clientAreaScreenBounds = new(Control.PointToScreen(Point.Empty), Control.ClientSize); 2259Rectangle clientRectangle = Control.ClientRectangle; 2260Rectangle borderRectangle = clientRectangle; 2266Rectangle imageRect = new(marginX, marginY, glyphSize.Width, glyphSize.Height); 2267Rectangle textRect = clientRectangle;
System\Windows\Forms\Design\ControlDesigner.TransparentBehavior.cs (5)
19private Rectangle _controlRect = Rectangle.Empty; 37_controlRect = Rectangle.Empty; 59_controlRect = Rectangle.Empty; 71if (e is not null && _controlRect != Rectangle.Empty && !_controlRect.Contains(new Point(e.X, e.Y)))
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (3)
902Rectangle bounds = new(0, selectedIndex * _selectedColumns.ItemHeight, _selectedColumns.Width, _selectedColumns.ItemHeight); 986Rectangle bounds = e.Bounds; 1003Rectangle focusRectangle = new(bounds.X, e.Bounds.Y + 1, textWidth + OWNERDRAWHORIZONTALBUFFER, e.Bounds.Height - 2);
System\Windows\Forms\Design\DesignBindingPicker.cs (2)
1857Rectangle rect = new(ClientRectangle.Location, ClientRectangle.Size); 2024Rectangle bounds = node.Bounds;
System\Windows\Forms\Design\DesignerFrame.cs (5)
244void IOverlayService.InvalidateOverlays(Rectangle screenRectangle) 387Rectangle client = DisplayRectangle; 457public void InvalidateOverlays(Rectangle screenRectangle) 463Rectangle invalidateRect = new(overlayControl.PointToClient(screenRectangle.Location), screenRectangle.Size); 480Rectangle overlayControlScreenBounds = overlayControl.Bounds;
System\Windows\Forms\Design\DesignerToolStripControlHost.cs (1)
53Rectangle r = Bounds;
System\Windows\Forms\Design\DesignerUtils.cs (18)
246public static void DrawGrabHandle(Graphics graphics, Rectangle bounds, bool isPrimary) 261public static void DrawNoResizeHandle(Graphics graphics, Rectangle bounds, bool isPrimary) 276public static void DrawLockedHandle(Graphics graphics, Rectangle bounds, bool isPrimary) 300public static void DrawSelectionBorder(Graphics graphics, Rectangle bounds) 459public static Rectangle GetBoundsForSelectionType(Rectangle originalBounds, SelectionBorderGlyphType type, int borderSize) => 467_ => Rectangle.Empty 475private static Rectangle GetBoundsForSelectionType(Rectangle originalBounds, SelectionBorderGlyphType type, int bordersize, int offset) 477Rectangle bounds = GetBoundsForSelectionType(originalBounds, type, bordersize); 511public static Rectangle GetBoundsForSelectionType(Rectangle originalBounds, SelectionBorderGlyphType type) 516public static Rectangle GetBoundsForNoResizeSelectionType(Rectangle originalBounds, SelectionBorderGlyphType type) 527Rectangle face = ctrl.ClientRectangle; 563public static Rectangle GetBoundsFromToolboxSnapDragDropInfo(ToolboxSnapDragDropEventArgs e, Rectangle originalBounds, bool isMirrored) 565Rectangle newBounds = originalBounds;
System\Windows\Forms\Design\DockEditor.DockUI.cs (1)
301Rectangle rc = ClientRectangle;
System\Windows\Forms\Design\DocumentDesigner.cs (1)
471Rectangle translatedBounds = new(loc, ((Control)Component).Size);
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (9)
145private Rectangle GetMarginBounds(Control control) 149var bounds = control.Bounds; 200var marginBounds = GetMarginBounds(currentControl); 201var bounds = currentControl.Bounds; 391private void DrawIBarBeforeRectangle(Rectangle bounds) 410private void DrawIBarAfterRectangle(Rectangle bounds) 458Rectangle invalidRect = new( 814Rectangle bounds = Rectangle.Empty;
System\Windows\Forms\Design\GroupBoxDesigner.cs (1)
78Rectangle rectangle = Control.DisplayRectangle;
System\Windows\Forms\Design\InheritanceUI.cs (3)
15private static Rectangle s_inheritanceGlyphRect; 30public static Rectangle InheritanceGlyphRectangle 34if (s_inheritanceGlyphRect == Rectangle.Empty)
System\Windows\Forms\Design\IOverlayService.cs (1)
38void InvalidateOverlays(Rectangle screenRectangle);
System\Windows\Forms\Design\ISelectionUIHandler.cs (3)
29void DragMoved(object[] components, Rectangle offset); 42Rectangle GetComponentBounds(object component); 56Rectangle GetSelectionClipRect(object component);
System\Windows\Forms\Design\ISelectionUIService.cs (1)
52void DragMoved(Rectangle offset);
System\Windows\Forms\Design\OleDragDropHandler.CfCodeToolboxItem.cs (3)
94Rectangle bounds = Rectangle.Empty; 100bounds = bounds.IsEmpty ? childControl.Bounds : Rectangle.Union(bounds, childControl.Bounds);
System\Windows\Forms\Design\OleDragDropHandler.cs (5)
361Rectangle newRect; 410private static void DrawReversibleFrame(HWND handle, Rectangle rectangle, Color backColor) 767Rectangle bounds = default; 771bounds = _selectionHandler.GetUpdatedRect(Rectangle.Empty, bounds, false); 845Rectangle offset = new(de.X - _dragBase.X, de.Y - _dragBase.Y, 0, 0);
System\Windows\Forms\Design\PanelDesigner.cs (1)
37Rectangle rc = Control.ClientRectangle;
System\Windows\Forms\Design\ParentControlDesigner.cs (48)
23private Rectangle _mouseDragOffset = Rectangle.Empty; // always keeps the current rectangle 311Rectangle displayRectangle = Control.DisplayRectangle; 458Rectangle bounds = default; 520Rectangle tempBounds = GetAdjustedSnapLocation(Rectangle.Empty, bounds); 529bounds = GetAdjustedSnapLocation(Rectangle.Empty, bounds); 541Rectangle snappedBounds = DesignerUtils.GetBoundsFromToolboxSnapDragDropInfo(e, bounds, Control.IsMirrored); 810protected void CreateTool(ToolboxItem tool, Rectangle bounds) 844private static SnapLine[] GenerateNewToolSnapLines(Rectangle r) 861internal List<Control> GetComponentsInRect(Rectangle value, bool screenCoords, bool containRect) 864Rectangle rect = screenCoords ? Control.RectangleToClient(value) : value; 874Rectangle bounds = child.Bounds; 915private Rectangle GetControlStackLocation(Rectangle centeredLocation) 996Rectangle controlRect = BehaviorService.ControlRectInAdornerWindow(Control); 1003Rectangle parentRect = BehaviorService.ControlRectInAdornerWindow(parent); 1004Rectangle nonClipRect = Rectangle.Intersect(parentRect, controlRect); 1042Rectangle translatedBounds = new(loc, ((Control)Component).Size); 1090private Rectangle GetAdjustedSnapLocation(Rectangle originalRect, Rectangle dragRect) 1092Rectangle adjustedRect = GetUpdatedRect(originalRect, dragRect, true); 1120Rectangle r = GetUpdatedRect(Rectangle.Empty, new Rectangle(pt.X, pt.Y, 0, 0), false); 1124internal Rectangle GetSnappedRect(Rectangle originalRect, Rectangle dragRect, bool updateSize) 1133protected Rectangle GetUpdatedRect(Rectangle originalRect, Rectangle dragRect, bool updateSize) 1135Rectangle updatedRect; 1238Rectangle bounds = new((Point)defaultValues["Location"], (Size)defaultValues["Size"]); 1769Rectangle offset = _mouseDragOffset; 1773_mouseDragOffset = Rectangle.Empty; 1778Cursor.Clip = Rectangle.Empty; 1783Rectangle frameRect = new(offset.X - _adornerWindowToScreenOffset.X, 1792newRegion.Exclude(Rectangle.Inflate(frameRect, -frameWidth, -frameWidth)); 1911Rectangle oldFrameRect = _mouseDragOffset; 1932Rectangle r = new(_mouseDragBase.X - _adornerWindowToScreenOffset.X, 1960_mouseDragOffset = GetUpdatedRect(Rectangle.Empty, _mouseDragOffset, true); 1969Rectangle frameRect = new(_mouseDragOffset.X - _adornerWindowToScreenOffset.X, 1978newRegion.Exclude(Rectangle.Inflate(frameRect, -frameWidth, -frameWidth)); 1994oldRegion.Exclude(Rectangle.Inflate(oldFrameRect, -frameWidth, -frameWidth)); 2023Rectangle displayRect = Control.DisplayRectangle; 2024Rectangle clientRect = Control.ClientRectangle; 2026Rectangle paintRect = new(Math.Min(displayRect.X, clientRect.X),
System\Windows\Forms\Design\PictureBoxDesigner.cs (1)
33Rectangle rc = ctl.ClientRectangle;
System\Windows\Forms\Design\SelectionUIHandler.cs (13)
21private Rectangle _dragOffset = Rectangle.Empty; // this gets added to a component's x, y, width, height 62Rectangle b = default; 97public virtual void DragMoved(object[] components, Rectangle offset) 173public abstract Rectangle GetUpdatedRect(Rectangle orignalRect, Rectangle dragRect, bool updateSize); 184Rectangle offset = _dragOffset; 192Cursor.Clip = Rectangle.Empty; 193_dragOffset = Rectangle.Empty; 273Rectangle oldBounds = controls[i].Bounds; 316Rectangle tempNewBounds = GetUpdatedRect(oldBounds, new Rectangle(targetX, targetY, targetWidth, targetHeight), true); 317Rectangle newBounds = oldBounds;
System\Windows\Forms\Design\SelectionUIService.ContainerSelectionUIItem.cs (4)
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); 77_region = new(Rectangle.Empty);
System\Windows\Forms\Design\SelectionUIService.cs (8)
40private Rectangle _mouseDragOffset = Rectangle.Empty; // current drag offset 190_mouseDragOffset = Rectangle.Empty; 646Rectangle old = _mouseDragOffset; 685Rectangle delta = _mouseDragOffset; 1055void ISelectionUIService.DragMoved(Rectangle offset) 1057Rectangle newOffset = Rectangle.Empty;
System\Windows\Forms\Design\SelectionUIService.SelectionUIItem.cs (12)
62internal Rectangle _innerRect = Rectangle.Empty; // inner part of selection (== control bounds) 63internal Rectangle _outerRect = Rectangle.Empty; // outer part of selection (inner + border size) 131Rectangle rect = new(_outerRect.X, _outerRect.Y, GRABHANDLE_WIDTH, GRABHANDLE_HEIGHT); 132Rectangle inner = _innerRect; 133Rectangle outer = _outerRect; 335_region = new(Rectangle.Empty); 340Rectangle handlerClip = _handler.GetSelectionClipRect(_component); 508Rectangle rcOuterNew = new(_innerRect.X - GRABHANDLE_WIDTH, _innerRect.Y - GRABHANDLE_HEIGHT, _innerRect.Width + 2 * GRABHANDLE_WIDTH, _innerRect.Height + 2 * GRABHANDLE_HEIGHT); 526Rectangle rcNew = Rectangle.Empty;
System\Windows\Forms\Design\SplitContainerDesigner.cs (3)
200Rectangle translatedBounds = BehaviorService?.ControlRectInAdornerWindow(_splitterPanel1!) ?? Rectangle.Empty; 211translatedBounds = BehaviorService?.ControlRectInAdornerWindow(_splitterPanel2!) ?? Rectangle.Empty;
System\Windows\Forms\Design\SplitterDesigner.cs (1)
26Rectangle rectangle = control.ClientRectangle;
System\Windows\Forms\Design\SplitterPanelDesigner.cs (3)
155Rectangle rectangle = control.ClientRectangle; 165Rectangle rectangle = control.ClientRectangle; 181Rectangle rectangle = control.ClientRectangle;
System\Windows\Forms\Design\StatusCommandUI.cs (5)
45Rectangle bounds; 52bounds = Rectangle.Empty; 74Rectangle bounds; 81bounds = Rectangle.Empty; 90public void SetStatusInformation(Rectangle bounds)
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (6)
842Rectangle rc = Control.DisplayRectangle; 964Rectangle bounds = new(startingPoint, Table.DisplayRectangle.Size); 1070Rectangle bounds = new(loc, Table.DisplayRectangle.Size); 1073Rectangle checkBounds = new(controlLoc, Control.ClientSize); // Can't use Control.Size since that will include any scrollbar 1103Rectangle gBounds = new(startLoc - halfSize, checkBounds.Top, DesignerUtils.s_resizeGlyphSize, checkBounds.Height); 1130Rectangle gBounds = new(checkBounds.Left, startLoc - halfSize, checkBounds.Width, DesignerUtils.s_resizeGlyphSize);
System\Windows\Forms\Design\TabOrder.cs (10)
23private Rectangle[]? _tabGlyphs; 199Rectangle ctlInner = GetConvertedBounds(_ctlHover); 200Rectangle ctlOuter = ctlInner; 229Rectangle convertedRectangle = GetConvertedBounds(control); 305Rectangle screenRectangle; 336private Rectangle GetConvertedBounds(Control? control) 340return Rectangle.Empty; 343Rectangle convertedBounds = control.Bounds; 650_tabGlyphs = new Rectangle[_tabControls.Count]; 749Rectangle rc = GetConvertedBounds(_ctlHover);
System\Windows\Forms\Design\TabPageDesigner.cs (2)
46Rectangle translatedBounds = Rectangle.Empty;
System\Windows\Forms\Design\ToolStripAdornerWindowService.cs (3)
120public void Invalidate(Rectangle rect) 147internal void ProcessPaintMessage(Rectangle paintRect) 263internal void InvalidateAdornerWindow(Rectangle rectangle)
System\Windows\Forms\Design\ToolStripCollectionEditor.ToolStripItemEditorForm.cs (6)
707Rectangle imageBounds = e.Bounds; 745Rectangle textBounds = e.Bounds; 756Rectangle fillBounds = e.Bounds; 866Rectangle bounds = label.ClientRectangle; 894Rectangle textRect = new(classWidth + GdiPlusExtraSpace, 0, bounds.Width - (classWidth + GdiPlusExtraSpace), bounds.Height); 973private Rectangle ImageRect
System\Windows\Forms\Design\ToolStripContainerDesigner.cs (8)
234Rectangle translatedBounds = BehaviorService?.ControlRectInAdornerWindow(currentPanel) ?? Rectangle.Empty; 297Rectangle glyphBounds = childGlyph.Bounds; 298Rectangle controlBounds = BehaviorService?.ControlRectInAdornerWindow(dropDownItem.DropDown) ?? Rectangle.Empty; 327Rectangle glyphBounds = childGlyph.Bounds; 328Rectangle controlBounds = BehaviorService?.ControlRectInAdornerWindow(associatedControl) ?? Rectangle.Empty;
System\Windows\Forms\Design\ToolStripDesigner.cs (18)
34private Rectangle _dragBoxFromMouseDown = Rectangle.Empty; // Needed to Store the DRAGDROP Rect from the ToolStripItemBehavior. 41private Rectangle _boundsToInvalidate = Rectangle.Empty; // Bounds to Invalidate if a DropDownItem is Deleted 91private Rectangle AddItemRect 95Rectangle rect = default; 222public Rectangle DragBoxFromMouseDown 363private Rectangle OverFlowButtonRect 367Rectangle rect = default; 459Rectangle bounds = dropDownItemDesigner.GetGlyphBounds(); 628Rectangle bounds = designer.GetGlyphBounds(); 1043if (_toolStripAdornerWindowService is not null && _boundsToInvalidate != Rectangle.Empty) 1303Rectangle itemBounds = itemDesigner.GetGlyphBounds(); 1305Rectangle parentBounds = BehaviorService.ControlRectInAdornerWindow(parent); 1352Rectangle translatedBounds = new(loc, ((Control)Component).Size); 1625internal static bool IsGlyphTotallyVisible(Rectangle itemBounds, Rectangle parentBounds) 2072Rectangle r = designer.GetGlyphBounds();
System\Windows\Forms\Design\ToolStripDesignerUtils.cs (3)
56public static void GetAdjustedBounds(ToolStripItem item, ref Rectangle r) 439Rectangle invalidateBounds = Rectangle.Empty;
System\Windows\Forms\Design\ToolStripDropDownDesigner.cs (6)
133Rectangle bounds = Rectangle.Empty; 143if (bounds != Rectangle.Empty) 677Rectangle parentBounds = behaviorService.ControlRectInAdornerWindow(parent); 678Rectangle menuBounds = behaviorService.ControlRectInAdornerWindow(_designMenu); 688Rectangle r = _designMenu.Bounds;
System\Windows\Forms\Design\ToolStripEditorManager.cs (5)
26private Rectangle _lastKnownEditorBounds = Rectangle.Empty; 123private Rectangle _bounds; 125public ToolStripEditorControl(Control editorToolStrip, Rectangle bounds) 136public Rectangle Bounds1 { get => _bounds; set => _bounds = value; }
System\Windows\Forms\Design\ToolStripItemBehavior.cs (13)
24internal Rectangle _dragBoxFromMouseDown = Rectangle.Empty; 80Rectangle bounds = GetPaintingBounds(designerHost, item); 88if (bSvc is not null && bounds != Rectangle.Empty) 153private static Rectangle GetPaintingBounds(IDesignerHost designerHost, ToolStripItem item) 155Rectangle bounds = Rectangle.Empty; 543Rectangle dragBox = Rectangle.Empty; 569if (dragBox != Rectangle.Empty && !dragBox.Contains(mouseLoc.X, mouseLoc.Y)) 907Rectangle bounds = GetPaintingBounds(designerHost, item); 984parentDesigner.DragBoxFromMouseDown = _dragBoxFromMouseDown = Rectangle.Empty; 1007ownerItemDesigner._dragBoxFromMouseDown = _dragBoxFromMouseDown = Rectangle.Empty;
System\Windows\Forms\Design\ToolStripItemDesigner.cs (14)
33internal Rectangle _dragBoxFromMouseDown = Rectangle.Empty; 423Rectangle itemBounds = itemDesigner.GetGlyphBounds(); 428Rectangle parentBounds = behaviorService.ControlRectInAdornerWindow(parent); 493public Rectangle GetGlyphBounds() 495Rectangle r = Rectangle.Empty; 558Rectangle r = GetGlyphBounds(); 560Rectangle parentBounds = GetService<BehaviorService>().ControlRectInAdornerWindow((Control)ImmediateParent); 899Rectangle r = ToolStripItem.Bounds; 1202Rectangle origBoundsInAdornerWindow = ToolStripItem.Bounds; 1223Rectangle boundsInAdornerWindow = ToolStripItem.Bounds; 1242boundsInAdornerWindow = Rectangle.Union(origBoundsInAdornerWindow, boundsInAdornerWindow); 1296Rectangle itemBounds = GetGlyphBounds();
System\Windows\Forms\Design\ToolStripItemGlyph.cs (1)
14public ToolStripItemGlyph(ToolStripItem item, ToolStripItemDesigner itemDesigner, Rectangle bounds, Behavior.Behavior? b) : base(bounds, Cursors.Default, item, b)
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (17)
60private Rectangle _dropDownSizeToInvalidate = Rectangle.Empty; 62private Rectangle _boundsToInvalidateOnRemove = Rectangle.Empty; 392Rectangle bounds = dropDownItemDesigner.GetGlyphBounds(); 1044Rectangle r = designer.GetGlyphBounds(); 1356Rectangle bounds = wb.Items[i].Bounds; 1619Rectangle hostingDropDownBounds = (MenuItem.GetCurrentParent()).Bounds; 1621Rectangle itemDropDownBounds = MenuItem.DropDown.Bounds; 1624Rectangle boundstoInvalidate = Rectangle.Union(hostingDropDownBounds, itemDropDownBounds); 1882if (_toolStripAdornerWindowService is not null && _boundsToInvalidateOnRemove != Rectangle.Empty) 1887_boundsToInvalidateOnRemove = Rectangle.Empty; 1938_boundsToInvalidateOnRemove = Rectangle.Union(_boundsToInvalidateOnRemove, dropDownItem.DropDown.Bounds); 2274Rectangle bounds = ownerItem.DropDown.Bounds; 2548private Rectangle _bounds; 2549internal ToolStripDropDownGlyph(Rectangle bounds, Behavior.Behavior b) : base(b)
System\Windows\Forms\Design\ToolStripPanelDesigner.cs (3)
237Rectangle rc = Control.ClientRectangle; 256_containerSelectorGlyph = new ToolStripPanelSelectionGlyph(Rectangle.Empty, Cursors.Default, Control, Component.Site, _behavior); 287_containerSelectorGlyph = new ToolStripPanelSelectionGlyph(Rectangle.Empty, Cursors.Default, Control, Component.Site, _behavior);
System\Windows\Forms\Design\ToolStripTemplateNode.cs (20)
70private Rectangle _boundingRect; 106private Rectangle _hotRegion; 243public Rectangle Bounds 311public Rectangle HotRegion 539Rectangle bounds = menuItemDesigner.GetGlyphBounds(); 797Rectangle invalidateBounds = designer.GetGlyphBounds(); 1259Rectangle translatedBounds = new(loc, _miniToolStrip.Size); 1739private Rectangle _hotRegion = Rectangle.Empty; 1764private void DrawArrow(Graphics g, Rectangle bounds) 1773private void DrawDropDown(Graphics g, Rectangle bounds, int state) 1823Rectangle bounds = new(Point.Empty, e.ToolStrip.Size); 1825Rectangle drawRect = new(bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 1838Rectangle bounds = new(Point.Empty, item.Size); 1839Rectangle drawRect = new(bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 1927Rectangle buttonBounds = splitButton.DropDownButtonBounds; 1934Rectangle bounds = new(Point.Empty, splitButton.Size); 1940Rectangle fillRect = new(buttonBounds.Left + 1, buttonBounds.Top, buttonBounds.Right, buttonBounds.Bottom); 1959Rectangle fillRect = new(buttonBounds.Left + 1, buttonBounds.Top, buttonBounds.Right, buttonBounds.Bottom); 1984Rectangle drawRect = new(bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1);
System.Windows.Forms.Primitives (21)
System\Windows\Forms\Automation\UiaTextProvider.cs (7)
31public abstract Rectangle BoundingRectangle { get; } 71public abstract Rectangle RectangleToScreen(Rectangle rect); 81public static SafeArrayScope<double> RectListToDoubleArray(List<Rectangle> rectArray) 107internal static SafeArrayScope<double> BoundingRectangleAsArray(Rectangle bounds) 117/// <inheritdoc cref="BoundingRectangleAsArray(Rectangle)"/> 118internal static VARIANT BoundingRectangleAsVariant(Rectangle bounds)
System\Windows\Forms\Automation\UiaTextRange.cs (8)
348List<Rectangle> rectangles = []; 364Rectangle endlineRectangle = new(endlinePoint.X, endlinePoint.Y + 2, UiaTextProvider.EndOfLineWidth, Math.Abs(_provider.Logfont.lfHeight) + 1); 386Rectangle clippingRectangle = _provider.BoundingRectangle; 400Rectangle rectangle = new(startPoint.X, startPoint.Y + 2, endPoint.X - startPoint.X, clippingRectangle.Height); 719private List<Rectangle> GetMultilineBoundingRectangles(Rectangle clippingRectangle) 749List<Rectangle> rects = []; 866Rectangle rect = new(startPoint.X, startPoint.Y + 2, endPoint.X - startPoint.X, lineHeight);
System\Windows\Forms\DeviceContextExtensions.cs (6)
13internal static void DrawRectangle(this DeviceContextHdcScope hdc, Rectangle rectangle, HPEN hpen) => 40internal static void FillRectangle(this DeviceContextHdcScope hdc, Rectangle rectangle, HBRUSH hbrush) => 43internal static void FillRectangle(this HDC hdc, Rectangle rectangle, HBRUSH hbrush) 131Rectangle bounds) => 149internal static void FillRectangle(this GetDcScope hdc, HBRUSH hbrush, Rectangle rectangle) => 152internal static void FillRectangle(this HDC hdc, HBRUSH hbrush, Rectangle rectangle)