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