Base:
method
GetPreferredSize
System.Windows.Forms.Control.GetPreferredSize(System.Drawing.Size)
1 override of GetPreferredSize
System.Windows.Forms.Design (1)
System\ComponentModel\Design\CollectionEditor.SplitButton.cs (1)
59public override Size GetPreferredSize(Size proposedSize)
40 references to GetPreferredSize
System.Windows.Forms.Design (2)
System\ComponentModel\Design\CollectionEditor.SplitButton.cs (1)
61Size preferredSize = base.GetPreferredSize(proposedSize);
System\ComponentModel\Design\DesignerActionPanel.CheckBoxPropertyLine.cs (1)
36Size checkBoxPreferredSize = _checkBox.GetPreferredSize(new Size(int.MaxValue, int.MaxValue));
System.Windows.Forms.Tests (38)
System\Windows\Forms\ButtonBaseTests.cs (4)
5018Assert.Throws<NullReferenceException>(() => control.GetPreferredSize(proposedSize)); 5022Assert.Throws<NullReferenceException>(() => control.GetPreferredSize(proposedSize)); 5045Assert.Throws<NullReferenceException>(() => control.GetPreferredSize(proposedSize)); 5052Assert.Throws<NullReferenceException>(() => control.GetPreferredSize(proposedSize));
System\Windows\Forms\ButtonTests.cs (34)
596Assert.Equal(new Size(75, 24), control.GetPreferredSize(Size.Empty)); 601Assert.Equal(new Size(75, 24), control.GetPreferredSize(Size.Empty)); 697Assert.Equal(oldSize + new Size(14, 9), control.GetPreferredSize(Size.Empty)); 702Assert.Equal(newSize + new Size(14, 9), control.GetPreferredSize(Size.Empty)); 952Assert.Equal(oldSize + new Size(14, 9), control.GetPreferredSize(Size.Empty)); 957Assert.Equal(newSize + new Size(14, 9), control.GetPreferredSize(Size.Empty)); 1204Size size = control.GetPreferredSize(proposedSize); 1209size = control.GetPreferredSize(proposedSize); 1254Size size = control.GetPreferredSize(proposedSize); 1259size = control.GetPreferredSize(proposedSize); 1305Size size = control.GetPreferredSize(proposedSize); 1310size = control.GetPreferredSize(proposedSize); 1340Size size = control.GetPreferredSize(proposedSize); 1345size = control.GetPreferredSize(proposedSize); 1364Size size = control.GetPreferredSize(proposedSize); 1369size = control.GetPreferredSize(proposedSize); 1442Size size = control.GetPreferredSize(proposedSize); 1447size = control.GetPreferredSize(proposedSize); 1521Size size = control.GetPreferredSize(proposedSize); 1526size = control.GetPreferredSize(proposedSize); 1601Size size = control.GetPreferredSize(proposedSize); 1606size = control.GetPreferredSize(proposedSize); 1636Size size = control.GetPreferredSize(proposedSize); 1641size = control.GetPreferredSize(proposedSize); 1660Size size = control.GetPreferredSize(proposedSize); 1665size = control.GetPreferredSize(proposedSize); 1684Size size = control.GetPreferredSize(proposedSize); 1689size = control.GetPreferredSize(proposedSize); 1708Size size = control.GetPreferredSize(proposedSize); 1713size = control.GetPreferredSize(proposedSize); 1732Size size = control.GetPreferredSize(proposedSize); 1737size = control.GetPreferredSize(proposedSize); 1756Size size = control.GetPreferredSize(proposedSize); 1761size = control.GetPreferredSize(proposedSize);