131 references to new
System.Windows.Forms (104)
System\Windows\Forms\Control.cs (2)
8817
PrintToMetaFileRecursive(hDC, lParam, new
Rectangle
(Point.Empty, Size));
8834
Rectangle clientBounds =
new
(clientOffset, ClientSize);
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\SystemButtonDarkModeRenderer.cs (1)
203
Rectangle arcRect =
new
(bounds.Location, new Size(diameter, diameter));
System\Windows\Forms\Controls\Buttons\CheckBoxRenderer.cs (4)
58
Rectangle glyphBounds =
new
(glyphLocation, GetGlyphSize(g, state));
79
Rectangle glyphBounds =
new
(glyphLocation, GetGlyphSize(hdc, state, hwnd));
123
Rectangle glyphBounds =
new
(glyphLocation, GetGlyphSize(g, state, hwnd));
192
Rectangle glyphBounds =
new
(glyphLocation, GetGlyphSize(g, state));
System\Windows\Forms\Controls\Buttons\RadioButtonRenderer.cs (4)
60
Rectangle glyphBounds =
new
(glyphLocation, GetGlyphSize(hdc, state, hwnd));
80
glyphBounds = new
Rectangle
(glyphLocation, GetGlyphSize(hdc, state, hwnd));
130
glyphBounds = new
Rectangle
(glyphLocation, GetGlyphSize(hdc, state, hwnd));
219
glyphBounds = 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)
18812
Invalidate(new
Rectangle
(new Point(-pt.X, ColumnHeadersHeight), new Size(-step, ClientSize.Height)));
18822
Invalidate(new
Rectangle
(new Point(ClientSize.Width - (pt.X - rect.Right) - step, ColumnHeadersHeight),
18829
Invalidate(new
Rectangle
(new Point(0, -pt.Y),
18836
Invalidate(new
Rectangle
(new Point(0, ColumnHeadersHeight),
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (1)
1003
cellBounds = new
Rectangle
(new Point(0, 0), GetSize(rowIndex));
System\Windows\Forms\Controls\DataGridView\DataGridViewUtilities.cs (1)
346
return new
Rectangle
(GetTextLocation(cellBounds, sizeConstraint, flags, cellStyle), sizeConstraint);
System\Windows\Forms\Controls\Labels\Label.cs (1)
1355
ControlPaint.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)),
112
return new
Rectangle
(
131
return new
Rectangle
(point, new Size(Math.Min(textWidth, itemBounds.Width), itemBounds.Height));
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (3)
3873
Rectangle comparisonRect =
new
(point, s_onePixel);
4070
item.SetBounds(new
Rectangle
(location, item.Size));
4510
cursorLocation = WindowsFormsUtils.ConstrainToScreenBounds(new
Rectangle
(cursorLocation, s_onePixel)).Location;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (3)
992
Rectangle suggestedScreenBounds =
new
(screenPoint, suggestedBounds.Size);
1003
dropDownBounds = new
Rectangle
(parentClientPoint, suggestedBounds.Size);
1020
Rectangle dropDownBounds =
new
(Point.Empty, GetSuggestedSize());
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownItem.cs (3)
141
Rectangle ownerItemBounds =
new
(TranslatePoint(Point.Empty, ToolStripPointType.ToolStripItemCoords, ToolStripPointType.ScreenCoords), Size);
379
Rectangle dropDownBounds =
new
(Point.Empty, DropDown.GetSuggestedSize());
384
Rectangle 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;
826
UpScrollButton.SetBounds(new
Rectangle
(upLocation, upSize));
832
DownScrollButton.SetBounds(new
Rectangle
(downLocation, downSize));
System\Windows\Forms\Controls\ToolStrips\ToolStripHighContrastRenderer.cs (8)
135
Rectangle bounds =
new
(Point.Empty, e.Item.Size);
187
Rectangle bounds =
new
(Point.Empty, menuItem.Size);
208
DrawArrow(new ToolStripArrowRenderEventArgs(g, item, new
Rectangle
(Point.Empty, item.Size), arrowColor, ArrowDirection.Down));
258
Rectangle bounds =
new
(Point.Empty, e.ToolStrip.Size);
287
Rectangle bounds =
new
(Point.Empty, e.ToolStrip.Size);
350
Rectangle bounds =
new
(Point.Empty, e.Item.Size);
410
Rectangle bounds =
new
(Point.Empty, e.Item.Size);
442
Rectangle bounds =
new
(Point.Empty, e.Item.Size);
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (1)
2378
ParentInternal?.Invalidate(new
Rectangle
(rectangleLocation, r.Size), true);
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.ToolStripItemAccessibleObject.cs (1)
304
return new
Rectangle
(Owner.ParentInternal.PointToScreen(bounds.Location), bounds.Size);
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.ToolStripItemInternalLayout.cs (1)
99
Rectangle bounds =
new
(Point.Empty, _ownerItem.Size);
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (1)
711
ControlPaint.DrawCaptionButton(g, new
Rectangle
(Point.Empty, image.Size), (CaptionButton)buttonToUse, ButtonState.Flat);
System\Windows\Forms\Controls\ToolStrips\ToolStripProfessionalLowResolutionRenderer.cs (1)
53
Rectangle bounds =
new
(Point.Empty, e.ToolStrip.Size);
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (25)
230
Rectangle bounds =
new
(Point.Empty, item.Size);
248
RenderSeparatorInternal(e.Graphics, e.Item, new
Rectangle
(Point.Empty, e.Item.Size), e.Vertical);
266
Rectangle bounds =
new
(Point.Empty, item.Size);
346
Rectangle bounds =
new
(Point.Empty, item?.Size ?? Size.Empty);
416
Rectangle bounds =
new
(Point.Empty, toolStrip.Size);
545
Rectangle bounds =
new
(Point.Empty, item.Size);
768
e.Graphics.DrawImage(image, imageRect, new
Rectangle
(Point.Empty, imageRect.Size), GraphicsUnit.Pixel);
845
Rectangle bounds =
new
(Point.Empty, toolStrip.Size);
859
Rectangle topLeftParentHorizontalPixels =
new
(topLeft, s_onePix);
860
Rectangle bottomLeftParentHorizontalPixels =
new
(bottomLeft, new Size(2, 1));
1107
Rectangle bounds =
new
(Point.Empty, item.Size);
1133
g.FillRectangle(brush, new
Rectangle
(Point.Empty, control.Size));
1140
Rectangle gradientBounds =
new
(Point.Empty, parent.Size);
1149
g.FillRectangle(b, new
Rectangle
(Point.Empty, control.Size));
1154
Rectangle gradientBounds =
new
(Point.Empty, control.Size);
1173
Rectangle bounds =
new
(Point.Empty, e.ToolStrip.Size);
1182
Rectangle bounds =
new
(Point.Empty, e.ToolStrip.Size);
1194
Rectangle bounds =
new
(Point.Empty, toolStripDropDown.Size);
1216
Rectangle overflowBoundsFill =
new
(Point.Empty, e.Item.Size);
1337
Rectangle bounds =
new
(Point.Empty, e.ToolStrip.Size);
1353
Rectangle topLeftShadowRect =
new
(topLeft, s_onePix);
1357
Rectangle topLeftShadowRect2 =
new
(topLeft, s_onePix);
1361
Rectangle topRightShadowRect =
new
(topRight, s_onePix);
1391
g.FillRectangle(brush, new
Rectangle
(gradientCopyPixel, s_onePix));
1566
Rectangle bounds =
new
(Point.Empty, item.Size);
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (2)
827
e.Graphics.DrawImage(image, imageRect, new
Rectangle
(Point.Empty, imageRect.Size), GraphicsUnit.Pixel);
929
bounds: 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)
109
Rectangle itemBounds =
new
(ToolStrip.PointToClient(ownerItem.TranslatePoint(Point.Empty, ToolStripPointType.ToolStripItemCoords, ToolStripPointType.ScreenCoords)), ownerItem.Size);
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.cs (2)
301
Rectangle dropDownButtonBounds =
new
(Point.Empty, new Size(Math.Min(Width, DropDownButtonWidth), Height));
307
Rectangle splitButtonButtonBounds =
new
(Point.Empty, new Size(splitButtonButtonWidth, splitButtonButtonHeight));
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackLayout.cs (2)
495
Rectangle itemBounds =
new
(itemLocation, itemSize);
517
item.SetBounds(new
Rectangle
(itemLocation, itemSize));
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemDarkModeRenderer.cs (4)
228
Rectangle bounds =
new
(Point.Empty, e.Item.Size);
274
Rectangle bounds =
new
(Point.Empty, e.Item.Size);
321
Rectangle bounds =
new
(Point.Empty, e.Item.Size);
429
Rectangle bounds =
new
(Point.Empty, e.Item.Size);
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemRenderer.cs (9)
331
Rectangle bounds =
new
(Point.Empty, e.GripBounds.Size);
441
vsRenderer.DrawBackground(g, new
Rectangle
(Point.Empty, item.Size));
447
DrawArrow(new ToolStripArrowRenderEventArgs(g, item, new
Rectangle
(Point.Empty, item.Size), arrowColor, ArrowDirection.Down));
474
Rectangle bounds =
new
(Point.Empty, item.Size);
497
Rectangle fillRect =
new
(Point.Empty, item.Size);
543
RenderSeparatorInternal(e.Graphics, e.Item, new
Rectangle
(Point.Empty, e.Item.Size), e.Vertical);
655
Rectangle bounds =
new
(Point.Empty, splitButton.Size);
715
vsRenderer.DrawBackground(g, new
Rectangle
(Point.Empty, item.Size));
727
RenderSmall3DBorderInternal(g, new
Rectangle
(Point.Empty, item.Size), state, (item.RightToLeft == RightToLeft.Yes));
System\Windows\Forms\Controls\TreeView\TreeView.cs (1)
2817
bounds = new
Rectangle
(textLoc, new Size(textSize.Width, bounds.Height));
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (1)
835
Rectangle clientArea =
new
(Point.Empty, ClientSize);
System\Windows\Forms\Layout\DefaultLayout.cs (1)
98
Rectangle newBounds =
new
(location, newSize);
System\Windows\Forms\Layout\FlowLayout.cs (2)
25
Rectangle measureBounds =
new
(new Point(0, 0), proposedConstraints);
226
Rectangle cellBounds =
new
(location, new Size(requiredSize.Width, rowBounds.Height));
System\Windows\Forms\Panels\Panel.cs (1)
230
ControlPaint.PrintBorder(g, new
Rectangle
(Point.Empty, Size), BorderStyle, Border3DStyle.Sunken);
System\Windows\Forms\Rendering\ControlPaint.cs (2)
508
Rectangle partOfImageToDraw =
new
(Point.Empty, imageRect.Size);
522
Rectangle 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)
276
ActionPanel.Invalidate(new
Rectangle
(EditRegionLocation, EditRegionSize), false);
341
Rectangle editorBounds =
new
(Point.Empty, EditRegionSize);
365
Rectangle editorBounds =
new
(Point.Empty, EditRegionSize);
System\ComponentModel\Design\DesignerActionPanel.TextBoxPropertyLine.cs (1)
290
Rectangle editRect =
new
(EditRegionRelativeLocation, EditRegionSize);
System\ComponentModel\Design\DesignerActionUI.cs (2)
616
if ((new
Rectangle
(glyphCoord, new Size(currentGlyph.Bounds.Width, currentGlyph.Bounds.Height))).Contains(point))
656
Rectangle rectGlyph =
new
(glyphLocationScreenCoord, glyph.Bounds.Size);
System\Windows\Forms\Design\Behavior\BehaviorService.cs (1)
302
return new
Rectangle
(loc, c.Size);
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (2)
689
Rectangle currentBounds =
new
(_behaviorService.ControlToAdornerWindow(targetControl), targetControl.Size);
1087
Rectangle dragBounds =
new
(_behaviorService.ControlToAdornerWindow(targetControl), targetControl.Size);
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionBehavior.cs (1)
119
Rectangle translatedBounds =
new
(loc, parent.Size);
System\Windows\Forms\Design\ControlDesigner.cs (2)
2133
Rectangle controlScreenBounds =
new
(parent.PointToScreen(Control.Location), Control.Size);
2134
Rectangle clientAreaScreenBounds =
new
(Control.PointToScreen(Point.Empty), Control.ClientSize);
System\Windows\Forms\Design\DesignBindingPicker.cs (1)
1857
Rectangle rect =
new
(ClientRectangle.Location, ClientRectangle.Size);
System\Windows\Forms\Design\DesignerFrame.cs (1)
463
Rectangle invalidateRect =
new
(overlayControl.PointToClient(screenRectangle.Location), screenRectangle.Size);
System\Windows\Forms\Design\DocumentDesigner.cs (1)
471
Rectangle translatedBounds =
new
(loc, ((Control)Component).Size);
System\Windows\Forms\Design\ParentControlDesigner.cs (2)
1042
Rectangle translatedBounds =
new
(loc, ((Control)Component).Size);
1238
Rectangle bounds =
new
((Point)defaultValues["Location"], (Size)defaultValues["Size"]);
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (3)
964
Rectangle bounds =
new
(startingPoint, Table.DisplayRectangle.Size);
1070
Rectangle bounds =
new
(loc, Table.DisplayRectangle.Size);
1073
Rectangle checkBounds =
new
(controlLoc, Control.ClientSize); // Can't use Control.Size since that will include any scrollbar
System\Windows\Forms\Design\ToolStripDesigner.cs (1)
1352
Rectangle translatedBounds =
new
(loc, ((Control)Component).Size);
System\Windows\Forms\Design\ToolStripItemBehavior.cs (2)
979
parentDesigner.DragBoxFromMouseDown = _dragBoxFromMouseDown = new
Rectangle
(new Point(mouseLoc.X - (dragSize.Width / 2), mouseLoc.Y - (dragSize.Height / 2)), dragSize);
1002
ownerItemDesigner._dragBoxFromMouseDown = _dragBoxFromMouseDown = new
Rectangle
(new Point(mouseLoc.X - (dragSize.Width / 2), mouseLoc.Y - (dragSize.Height / 2)), dragSize);
System\Windows\Forms\Design\ToolStripTemplateNode.cs (4)
1259
Rectangle translatedBounds =
new
(loc, _miniToolStrip.Size);
1823
Rectangle bounds =
new
(Point.Empty, e.ToolStrip.Size);
1838
Rectangle bounds =
new
(Point.Empty, item.Size);
1934
Rectangle bounds =
new
(Point.Empty, splitButton.Size);