26 writes to Size
System.Drawing.Common.Tests (2)
mono\System.Drawing\GraphicsTests.cs (2)
2088rect.Size = new Size(1, 20); 2105rect.Size = new Size(1, 20);
System.Windows.Forms (23)
System\Windows\Forms\Control.cs (2)
5199Size = LayoutUtils.IntersectSizes(new Size(proposedWidth, proposedHeight), maximumSize) 5201newBounds.Size = LayoutUtils.UnionSizes(newBounds.Size, MinimumSize);
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.LayoutOptions.cs (1)
514maxCombinedBounds.Size = LayoutUtils.UnionSizes(maxCombinedBounds.Size, combinedSize);
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (2)
352result.Size = _image.Size; 363result.Size = _image.Size;
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.cs (1)
363specifiedBounds.Size = value;
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (2)
567content.Size = LayoutUtils.UnionSizes(Size.Empty, content.Size); 1808currentBounds.Size = value;
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.ToolStripMenuItemInternalLayout.cs (2)
120imageRect.Size = menu.ImageScalingSize; 127imageRect.Size = image?.Size ?? menu.ImageScalingSize;
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (1)
850upDownEditBounds.Size = new Size(clientArea.Width - _defaultButtonsWidth, clientArea.Height);
System\Windows\Forms\Form.cs (3)
1317bounds.Size = value; 6454_restoredWindowBounds.Size = ClientSize; 6463_restoreBounds.Size = Size;
System\Windows\Forms\Internal\WinFormsUtils.cs (1)
82bounds.Size = new Size(Math.Min(constrainingBounds.Width - 2, bounds.Width),
System\Windows\Forms\Layout\DefaultLayout.cs (3)
506remainingBounds.Size += neededSize; 511remainingBounds.Size += elementPrefSize; 521newElementBounds.Size = control.ApplySizeConstraints(newElementBounds.Size);
System\Windows\Forms\Layout\FlowLayout.cs (1)
33measureBounds.Size = prefSize;
System\Windows\Forms\Layout\LayoutUtils.cs (1)
444rect.Size = FlipSize(rect.Size);
System\Windows\Forms\Rendering\ControlPaint.cs (3)
77result.Size = bounds.Size; 81result.Size = imageSize; 85result.Size = imageSize;
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\ParentControlDesigner.cs (1)
511bounds.Size = GetDefaultSize(newChild);
135 references to Size
System.Drawing.Common.Tests (6)
System\Drawing\TextureBrushTests.cs (6)
96Assert.Equal(rectangle.Size, brushImage.Size); 117Assert.Equal(rectangle.Size, brushImage.Size); 150Assert.Equal(rectangle.Size, brushImage.Size); 171Assert.Equal(rectangle.Size, brushImage.Size); 205Assert.Equal(rectangle.Size, brushImage.Size); 227Assert.Equal(rectangle.Size, brushImage.Size);
System.Windows.Forms (70)
System\Windows\Forms\ActiveX\AxHost.cs (2)
1413if ((b.Size.Equals(DefaultSize)) && (!b.Size.Equals(p)))
System\Windows\Forms\Control.cs (5)
2103return CommonProperties.GetSpecifiedBounds(this).Size; 5178return ApplyBoundsConstraints(0, 0, width, height).Size; 5185return ApplyBoundsConstraints(0, 0, proposedSize.Width, proposedSize.Height).Size; 5201newBounds.Size = LayoutUtils.UnionSizes(newBounds.Size, MinimumSize); 9774Size scaledSize = LayoutUtils.IntersectSizes(rawScaledBounds.Size, maximumSize);
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.LayoutOptions.cs (5)
493Size textSize = GetTextSize(maxBounds.Size); 508Size maxTextSize = LayoutUtils.SubAlignedRegion(maxBounds.Size, ImageSize, textImageRelation); 514maxCombinedBounds.Size = LayoutUtils.UnionSizes(maxCombinedBounds.Size, combinedSize); 595if (textImageRelation == TextImageRelation.ImageBeforeText && layout.ImageBounds.Size.Width != 0) 604if (textImageRelation == TextImageRelation.ImageAboveText && layout.ImageBounds.Size.Height != 0)
System\Windows\Forms\Controls\Labels\LinkLabel.cs (3)
1143CreateTextFormatFlags(clientRectWidthPadding.Size)); 1308CreateTextFormatFlags(clientAreaMinusPadding.Size) 1371CreateTextFormatFlags(clientRectWithPadding.Size));
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (1)
1036return CommonProperties.GetSpecifiedBounds(this).Size;
System\Windows\Forms\Controls\TabControl\TabControl.cs (1)
510return GetTabRect(0).Size;
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (7)
1296return DisplayRectangle.Size; 1363_toolStripOverflowButton.Size = _toolStripOverflowButton.GetPreferredSize(DisplayRectangle.Size - Padding.Size); 3259_toolStripOverflowButton!.Size = _toolStripOverflowButton.GetPreferredSize(DisplayRectangle.Size - Padding.Size); 4218size = LayoutUtils.UnionSizes(size, _toolStripOverflowButton.Bounds.Size); 4223size = LayoutUtils.UnionSizes(size, _toolStripGrip.Bounds.Size); 4295biggestItemSize = LayoutUtils.UnionSizes(biggestItemSize, item.Bounds.Size); 4355biggestItemSize = LayoutUtils.UnionSizes(biggestItemSize, item.Bounds.Size);
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.cs (1)
650Size size = LayoutUtils.DeflateRect(Bounds, Padding).Size;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (3)
552return Screen.GetWorkingArea(Bounds).Size - Padding.Size; 995Rectangle suggestedScreenBounds = new(screenPoint, suggestedBounds.Size); 1006dropDownBounds = new Rectangle(parentClientPoint, suggestedBounds.Size);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (1)
456_textRectangle.Y = LayoutUtils.VAlign(_textRectangle.Size, new Rectangle(Point.Empty, _maxItemSize), ContentAlignment.MiddleCenter).Y;
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (3)
567content.Size = LayoutUtils.UnionSizes(Size.Empty, content.Size); 1804get => Bounds.Size; 2371ParentInternal?.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\ToolStripMenuItem.ToolStripMenuItemInternalLayout.cs (2)
74arrowRect.Y = LayoutUtils.VAlign(arrowRect.Size, _ownerItem.ClientBounds, ContentAlignment.MiddleCenter).Y; 130imageRect.Y = LayoutUtils.VAlign(imageRect.Size, _ownerItem.ClientBounds, ContentAlignment.MiddleCenter).Y;
System\Windows\Forms\Controls\ToolStrips\ToolStripOverflow.cs (1)
141biggestItemSize = LayoutUtils.UnionSizes(biggestItemSize, item.Bounds.Size);
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (1)
769e.Graphics.DrawImage(image, imageRect, new Rectangle(Point.Empty, imageRect.Size), GraphicsUnit.Pixel);
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (2)
797e.Graphics.DrawImage(image, imageRect, new Rectangle(Point.Empty, imageRect.Size), GraphicsUnit.Pixel); 877Size textSize = LayoutUtils.FlipSize(textRect.Size);
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackLayout.cs (5)
40Size overflowButtonSize = toolStrip.OverflowButton.AutoSize ? toolStrip.OverflowButton.GetPreferredSize(_displayRectangle.Size) : toolStrip.OverflowButton.Size; 86Size itemSize = item.AutoSize ? item.GetPreferredSize(_displayRectangle.Size) : item.Size; 136Size itemSize = item.AutoSize ? item.GetPreferredSize(_displayRectangle.Size) : item.Size; 365Size toolStripPreferredSize = _displayRectangle.Size; 584Size itemSize = item.AutoSize ? item.GetPreferredSize(_displayRectangle.Size) : item.Size;
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemRenderer.cs (1)
279Rectangle bounds = new(Point.Empty, e.GripBounds.Size);
System\Windows\Forms\Form.cs (4)
504Size = CommonProperties.GetSpecifiedBounds(this).Size; 1318value = WindowsFormsUtils.ConstrainToScreenWorkingAreaBounds(bounds).Size; 5004Size restoredSize = _restoredWindowBounds.Size; 6795Size virtualScreen = SystemInformation.VirtualScreen.Size;
System\Windows\Forms\Layout\DefaultLayout.cs (8)
60Size newSize = LayoutUtils.UnionSizes(bounds.Size, prefSize); 400Size elementSize = GetVerticalDockedSize(element, remainingBounds.Size, measureOnly); 413Size elementSize = GetVerticalDockedSize(element, remainingBounds.Size, measureOnly); 426Size elementSize = GetHorizontalDockedSize(element, remainingBounds.Size, measureOnly); 439Size elementSize = GetHorizontalDockedSize(element, remainingBounds.Size, measureOnly); 457Size elementSize = remainingBounds.Size; 521newElementBounds.Size = control.ApplySizeConstraints(newElementBounds.Size); 583desiredSize = element.Bounds.Size;
System\Windows\Forms\Layout\FlowLayout.ElementProxy.cs (1)
73public virtual Size SpecifiedSize => CommonProperties.GetSpecifiedBounds(_element!).Size;
System\Windows\Forms\Layout\LayoutUtils.cs (2)
277return Align(Stretch(fitThis, withinThis.Size, anchorStyles), withinThis, anchorStyles); 444rect.Size = FlipSize(rect.Size);
System\Windows\Forms\Layout\TableLayout.cs (4)
105Size containerSize = container.DisplayRectangle.Size - new Size(cellBorderWidth, cellBorderWidth); 162Size containerSize = container.DisplayRectangle.Size - new Size(cellBorderWidth * 2, cellBorderWidth * 2); 869: CommonProperties.GetSpecifiedBounds(element).Size; 1268Rectangle elementBounds = LayoutUtils.AlignAndStretch(GetElementSize(element, cellBounds.Size), cellBounds, anchorStyles);
System\Windows\Forms\Printing\PrintPreviewControl.cs (2)
622Size controlPhysicalSize = PixelsToPhysical(rect.Size, _screenDPI); 794(bool horizontalScrollNeeded, bool verticalScrollNeeded) = IsScrollNeeded(availableRect.Size);
System\Windows\Forms\Rendering\ControlPaint.cs (4)
77result.Size = bounds.Size; 476Rectangle partOfImageToDraw = new(Point.Empty, imageRect.Size); 492imageRect.Size); 1369RECT rcCheck = new(rectangle.Size);
System.Windows.Forms.Design (8)
System\ComponentModel\Design\DesignerActionUI.cs (1)
656Rectangle rectGlyph = new(glyphLocationScreenCoord, glyph.Bounds.Size);
System\Windows\Forms\Design\DesignBindingPicker.cs (1)
1863Rectangle rect = new(ClientRectangle.Location, ClientRectangle.Size);
System\Windows\Forms\Design\DesignerFrame.cs (1)
466Rectangle invalidateRect = new(overlayControl.PointToClient(screenRectangle.Location), screenRectangle.Size);
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (2)
970Rectangle bounds = new(startingPoint, Table.DisplayRectangle.Size); 1076Rectangle bounds = new(loc, Table.DisplayRectangle.Size);
System\Windows\Forms\Design\ToolStripTemplateNode.cs (3)
897_centerTextBox.Size = _miniToolStrip.DisplayRectangle.Size - _centerTextBox.Margin.Size; 1384_centerLabel.Size = _miniToolStrip.DisplayRectangle.Size - _centerLabel.Margin.Size; 1404_addItemButton.Size = _miniToolStrip.DisplayRectangle.Size - _addItemButton.Margin.Size;
System.Windows.Forms.Design.Tests (1)
System\Windows\Forms\Design\InheritanceUITests.cs (1)
100glyphRect.Size.Should().Be(glyph.Size);
System.Windows.Forms.Tests (45)
System\Windows\Forms\AccessibleObjects\ProgressBarAccessibleObjectTests.cs (3)
24Assert.Equal(ownerControl.ClientSize, accessibilityObject.Bounds.Size); 49Assert.Equal(Rectangle.Empty.Size, accessibilityObject.Bounds.Size);
System\Windows\Forms\AccessibleObjects\TrackBar.TrackBarAccessibleObjectTests.cs (3)
25Assert.Equal(ownerControl.Size, accessibilityObject.Bounds.Size); 50Assert.Equal(Rectangle.Empty.Size, accessibilityObject.Bounds.Size);
System\Windows\Forms\ScrollableControlTests.cs (3)
2344Assert.Equal(expectedDisplayRectangleSize, control.DisplayRectangle.Size); 2416Assert.Equal(expectedDisplayRectangleSize, control.DisplayRectangle.Size); 2419Assert.Equal(new Rectangle(expectedDisplayRectangleLocation, child.ExpectedSize.Size), child.Bounds);
System\Windows\Forms\TabPageTests.cs (8)
2213Assert.Equal(expected.Size, control.ClientSize); 2216Assert.Equal(expected.Size, control.Size); 2243Assert.Equal(expected.Size, control.ClientSize); 2246Assert.Equal(expected.Size, control.Size); 4815Assert.Equal(expected.Size, control.ClientSize); 4818Assert.Equal(expected.Size, control.Size); 4845Assert.Equal(expected.Size, control.ClientSize); 4848Assert.Equal(expected.Size, control.Size);
System\Windows\Forms\ToolStripDropDownTests.cs (1)
116Assert.Equal(Screen.GetWorkingArea(new Rectangle(0, 0, 100, 25)).Size - new Size(2, 4), control.MaxItemSize);
System\Windows\Forms\ToolStripItemTests.cs (10)
14560Assert.Equal(bounds.Size, item.Size); 14568Assert.Equal(bounds.Size, item.Size); 14598Assert.Equal(bounds.Size, item.Size); 14608Assert.Equal(bounds.Size, item.Size); 14652Assert.Equal(bounds.Size, item.Size); 14665Assert.Equal(bounds.Size, item.Size); 14726Assert.Equal(bounds.Size, item.Size); 14736Assert.Equal(bounds.Size, item.Size); 14787Assert.Equal(bounds.Size, item.Size); 14800Assert.Equal(bounds.Size, item.Size);
System\Windows\Forms\ToolStripSeparatorTests.cs (8)
1380Assert.Equal(bounds.Size, item.Size); 1388Assert.Equal(bounds.Size, item.Size); 1418Assert.Equal(bounds.Size, item.Size); 1428Assert.Equal(bounds.Size, item.Size); 1548Assert.Equal(bounds.Size, item.Size); 1558Assert.Equal(bounds.Size, item.Size); 1602Assert.Equal(bounds.Size, item.Size); 1612Assert.Equal(bounds.Size, item.Size);
System\Windows\Forms\ToolStripTests.cs (9)
2313Assert.Equal(expected.Size, control.MaxItemSize); 6705Assert.Equal(new Rectangle(expectedItem1Location, oldBounds1.Size), item1.Bounds); 6706Assert.Equal(new Rectangle(expectedItem2Location, oldBounds2.Size), item2.Bounds); 6757Assert.Equal(new Rectangle(expectedItem1Location, oldBounds1.Size), item1.Bounds); 6758Assert.Equal(new Rectangle(expectedItem2Location, oldBounds2.Size), item2.Bounds); 7020Assert.Equal(new Rectangle(location, oldBounds.Size), item.Bounds); 7027Assert.Equal(new Rectangle(location, oldBounds.Size), item.Bounds); 7069Assert.Equal(new Rectangle(location, oldBounds.Size), item.Bounds); 7079Assert.Equal(new Rectangle(location, oldBounds.Size), item.Bounds);
System.Windows.Forms.UI.IntegrationTests (5)
ButtonTests.cs (4)
117var originalFormSize = form.DisplayRectangle.Size; 141var originalFormSize = form.DisplayRectangle.Size; 167var originalFormSize = form.DisplayRectangle.Size; 197var originalFormSize = form.DisplayRectangle.Size;
MonthCalendarTests.cs (1)
178return cell.Bounds.Location + (cell.Bounds.Size / 2);