49 references to Size
System.Windows.Forms (39)
System\Windows\Forms\Controls\Buttons\Button.cs (1)
106Size paddedSize = _systemSize + Padding.Size;
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (1)
961return LayoutUtils.UnionSizes(preferedSize + Padding.Size, MinimumSize);
System\Windows\Forms\Controls\Buttons\CheckBox.cs (1)
289return size + Padding.Size;
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (2)
775_prefHeightCache = (short)(textSize.Height + SystemInformation.BorderSize.Height * 8 + Padding.Size.Height); 792_prefHeightCache = (short)(textSize.Height * itemCount + SystemInformation.BorderSize.Height * 16 + Padding.Size.Height);
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (2)
8981int bordersAndPaddingWidth = 2 * (BorderWidth + Padding.Size.Width); 8982int bordersAndPaddingHeight = 2 * (BorderWidth + Padding.Size.Height);
System\Windows\Forms\Controls\GroupBox\GroupBox.cs (1)
603Size totalPadding = borderSize + new Size(0, _fontHeight) + Padding.Size;
System\Windows\Forms\Controls\Labels\Label.cs (1)
1001Size bordersAndPadding = Padding.Size;
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (1)
776return new Size(width, height) + Padding.Size;
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (1)
1040Size bordersAndPadding = SizeFromClientSize(Size.Empty) + Padding.Size;
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (1)
821Size bordersAndPadding = SizeFromClientSize(Size.Empty) + Padding.Size;
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (2)
311return GetPreferredSizeHorizontal(this, proposedSize) + Padding.Size; 315return GetPreferredSizeVertical(this) + Padding.Size;
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (5)
1365_toolStripOverflowButton.Size = _toolStripOverflowButton.GetPreferredSize(DisplayRectangle.Size - Padding.Size); 2251Size prefSize = LayoutEngine.GetPreferredSize(this, proposedSize - padding.Size); 2261return prefSize + newPadding.Size; 2275Size defaultSize = toolStrip.DefaultSize - toolStrip.Padding.Size; 3261_toolStripOverflowButton!.Size = _toolStripOverflowButton.GetPreferredSize(DisplayRectangle.Size - Padding.Size);
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.cs (2)
476? _control.GetPreferredSize(constrainingSize - Padding.Size) + Padding.Size
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (1)
552return Screen.GetWorkingArea(Bounds).Size - Padding.Size;
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (2)
2348return InternalLayout.GetPreferredSize(constrainingSize - Padding.Size) + Padding.Size;
System\Windows\Forms\Controls\ToolStrips\ToolStripOverflowButton.cs (1)
86return preferredSize + Padding.Size;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.cs (2)
672Size preferredSize = LayoutEngine.GetPreferredSize(this, constrainingSize - Padding.Size) + Padding.Size;
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackDragDropHandler.cs (1)
175bounds.Inflate(_owner.DisplayedItems[i].Margin.Size);
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackLayout.cs (2)
41return overflowButtonSize + toolStrip.OverflowButton.Margin.Size; 372toolStripPreferredSize = ToolStrip.GetPreferredSizeVertical(toolStrip) - toolStrip.Padding.Size;
System\Windows\Forms\Controls\UpDown\DomainUpDown.cs (1)
526return new Size(width, height) + Padding.Size;
System\Windows\Forms\Controls\UpDown\NumericUpDown.cs (1)
830return new Size(width, height) + Padding.Size;
System\Windows\Forms\Layout\ArrangedElement.cs (2)
154Size preferredSize = LayoutEngine.GetPreferredSize(this, constrainingSize - Padding.Size) + Padding.Size;
System\Windows\Forms\Layout\Containers\ContainerControl.cs (1)
686Size totalPadding = borderSize + Padding.Size;
System\Windows\Forms\Layout\FlowLayout.cs (3)
186Size elementConstraints = new(int.MaxValue, rowBounds.Height - elementProxy.Margin.Size.Height); 191elementConstraints.Width = rowBounds.Width - rowSize.Width - elementProxy.Margin.Size.Width; 217Size requiredSize = prefSize + elementProxy.Margin.Size;
System\Windows\Forms\Panels\Panel.cs (1)
156Size totalPadding = borderSize + Padding.Size;
System.Windows.Forms.Design (4)
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (1)
1390bounds.Inflate(wb.Items[i].Margin.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.Tests (6)
System\Windows\Forms\PaddingTests.cs (4)
23Assert.Equal(Size.Empty, padding.Size); 38Assert.Equal(new Size(all * 2, all * 2), padding.Size); 60Assert.Equal(new Size(right + left, top + bottom), padding.Size); 74Assert.Equal(Size.Empty, padding.Size);
TextBoxBaseTests.cs (2)
5047Assert.Equal(expected + padding.Size, control.GetPreferredSize(proposedSize)); 5051Assert.Equal(expected + padding.Size, control.GetPreferredSize(proposedSize));