Implemented interface member:
method
GetPreferredSize
System.Windows.Forms.Layout.IArrangedElement.GetPreferredSize(System.Drawing.Size)
6 overrides of GetPreferredSize
System.Windows.Forms (6)
System\Windows\Forms\Controls\ToolStrips\ToolStripButton.cs (1)
159
public override Size
GetPreferredSize
(Size constrainingSize)
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.cs (1)
473
public override Size
GetPreferredSize
(Size constrainingSize)
System\Windows\Forms\Controls\ToolStrips\ToolStripOverflowButton.cs (1)
71
public override Size
GetPreferredSize
(Size constrainingSize)
System\Windows\Forms\Controls\ToolStrips\ToolStripSeparator.cs (1)
257
public override Size
GetPreferredSize
(Size constrainingSize)
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.cs (1)
347
public override Size
GetPreferredSize
(Size constrainingSize)
System\Windows\Forms\Controls\ToolStrips\ToolStripStatusLabel.cs (1)
177
public override Size
GetPreferredSize
(Size constrainingSize)
16 references to GetPreferredSize
System.Windows.Forms (10)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (1)
2398
return item.AutoSize ? item.
GetPreferredSize
(Size.Empty) : item.Size;
System\Windows\Forms\Controls\ToolStrips\ToolStripButton.cs (1)
161
Size prefSize = base.
GetPreferredSize
(constrainingSize);
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.cs (1)
477
: base.
GetPreferredSize
(constrainingSize);
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackLayout.cs (5)
86
Size itemSize = item.AutoSize ? item.
GetPreferredSize
(_displayRectangle.Size) : item.Size;
136
Size itemSize = item.AutoSize ? item.
GetPreferredSize
(_displayRectangle.Size) : item.Size;
270
itemSize = item.AutoSize ? item.
GetPreferredSize
(Size.Empty) : item.Size;
412
itemSize = item.AutoSize ? item.
GetPreferredSize
(Size.Empty) : item.Size;
584
Size itemSize = item.AutoSize ? item.
GetPreferredSize
(_displayRectangle.Size) : item.Size;
System\Windows\Forms\Controls\ToolStrips\ToolStripStatusLabel.cs (2)
181
return base.
GetPreferredSize
(constrainingSize) + new Size(4, 4);
185
return base.
GetPreferredSize
(constrainingSize);
System.Windows.Forms.Tests (6)
System\Windows\Forms\ToolStripItemTests.cs (6)
10310
Assert.Equal(new Size(4, 4), item.
GetPreferredSize
(proposedSize));
10313
Assert.Equal(new Size(4, 4), item.
GetPreferredSize
(proposedSize));
10325
Assert.Equal(new Size(4, 4), item.
GetPreferredSize
(proposedSize));
10328
Assert.Equal(new Size(4, 4), item.
GetPreferredSize
(proposedSize));
10340
Assert.Equal(new Size(4, 4), item.
GetPreferredSize
(proposedSize));
10343
Assert.Equal(new Size(4, 4), item.
GetPreferredSize
(proposedSize));