131 references to new
System.Windows.Forms (104)
System\Windows\Forms\Control.cs (2)
8817PrintToMetaFileRecursive(hDC, lParam, new Rectangle(Point.Empty, Size)); 8834Rectangle clientBounds = new(clientOffset, ClientSize);
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\SystemButtonDarkModeRenderer.cs (1)
203Rectangle arcRect = new(bounds.Location, new Size(diameter, diameter));
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\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 (1)
33_outerBorder = new Rectangle(_clientRect.Location, new Size(_clientRect.Width - 1, _clientRect.Height - 1));
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (4)
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),
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (1)
1003cellBounds = new Rectangle(new Point(0, 0), GetSize(rowIndex));
System\Windows\Forms\Controls\DataGridView\DataGridViewUtilities.cs (1)
346return new Rectangle(GetTextLocation(cellBounds, sizeConstraint, flags, cellStyle), sizeConstraint);
System\Windows\Forms\Controls\Labels\Label.cs (1)
1355ControlPaint.PrintBorder(g, new Rectangle(Point.Empty, Size), BorderStyle, Border3DStyle.SunkenOuter);
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\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 (3)
992Rectangle suggestedScreenBounds = new(screenPoint, suggestedBounds.Size); 1003dropDownBounds = new Rectangle(parentClientPoint, suggestedBounds.Size); 1020Rectangle dropDownBounds = new(Point.Empty, GetSuggestedSize());
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 (5)
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 (8)
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); 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 (1)
2378ParentInternal?.Invalidate(new Rectangle(rectangleLocation, r.Size), true);
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 (1)
53Rectangle bounds = new(Point.Empty, e.ToolStrip.Size);
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (25)
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); 346Rectangle bounds = new(Point.Empty, item?.Size ?? Size.Empty); 416Rectangle bounds = new(Point.Empty, toolStrip.Size); 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)); 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); 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)); 1566Rectangle bounds = new(Point.Empty, item.Size);
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (2)
827e.Graphics.DrawImage(image, imageRect, new Rectangle(Point.Empty, imageRect.Size), GraphicsUnit.Pixel); 929bounds: new Rectangle(Point.Empty, textSize),
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderEventArgs.cs (2)
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);
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.cs (2)
301Rectangle dropDownButtonBounds = new(Point.Empty, new Size(Math.Min(Width, DropDownButtonWidth), Height)); 307Rectangle splitButtonButtonBounds = new(Point.Empty, new Size(splitButtonButtonWidth, splitButtonButtonHeight));
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackLayout.cs (2)
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 (9)
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); 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));
System\Windows\Forms\Controls\TreeView\TreeView.cs (1)
2817bounds = new Rectangle(textLoc, new Size(textSize.Width, bounds.Height));
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (1)
835Rectangle clientArea = new(Point.Empty, ClientSize);
System\Windows\Forms\Layout\DefaultLayout.cs (1)
98Rectangle newBounds = new(location, newSize);
System\Windows\Forms\Layout\FlowLayout.cs (2)
25Rectangle measureBounds = new(new Point(0, 0), proposedConstraints); 226Rectangle cellBounds = new(location, new Size(requiredSize.Width, rowBounds.Height));
System\Windows\Forms\Panels\Panel.cs (1)
230ControlPaint.PrintBorder(g, new Rectangle(Point.Empty, Size), BorderStyle, Border3DStyle.Sunken);
System\Windows\Forms\Rendering\ControlPaint.cs (2)
508Rectangle partOfImageToDraw = new(Point.Empty, imageRect.Size); 522Rectangle partOfImageToDraw = new(
System\Windows\Forms\Rendering\TextRenderer.cs (1)
287=> DrawTextInternal(dc, text, font, new Rectangle(pt, MaxSize), foreColor, backColor, flags);
System.Windows.Forms.Design (27)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (3)
276ActionPanel.Invalidate(new Rectangle(EditRegionLocation, EditRegionSize), false); 341Rectangle editorBounds = new(Point.Empty, EditRegionSize); 365Rectangle editorBounds = new(Point.Empty, EditRegionSize);
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\Windows\Forms\Design\Behavior\BehaviorService.cs (1)
302return new Rectangle(loc, c.Size);
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (2)
689Rectangle currentBounds = new(_behaviorService.ControlToAdornerWindow(targetControl), targetControl.Size); 1087Rectangle dragBounds = new(_behaviorService.ControlToAdornerWindow(targetControl), targetControl.Size);
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionBehavior.cs (1)
119Rectangle translatedBounds = new(loc, parent.Size);
System\Windows\Forms\Design\ControlDesigner.cs (2)
2133Rectangle controlScreenBounds = new(parent.PointToScreen(Control.Location), Control.Size); 2134Rectangle clientAreaScreenBounds = new(Control.PointToScreen(Point.Empty), Control.ClientSize);
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\DocumentDesigner.cs (1)
471Rectangle translatedBounds = new(loc, ((Control)Component).Size);
System\Windows\Forms\Design\ParentControlDesigner.cs (2)
1042Rectangle translatedBounds = new(loc, ((Control)Component).Size); 1238Rectangle bounds = new((Point)defaultValues["Location"], (Size)defaultValues["Size"]);
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (3)
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
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 (4)
1259Rectangle translatedBounds = new(loc, _miniToolStrip.Size); 1823Rectangle bounds = new(Point.Empty, e.ToolStrip.Size); 1838Rectangle bounds = new(Point.Empty, item.Size); 1934Rectangle bounds = new(Point.Empty, splitButton.Size);