23 references to PreferredSize
System.Windows.Forms (23)
winforms\Managed\System\WinForms\ButtonBase.cs (1)
1132
Size preferredSize =
PreferredSize
;
winforms\Managed\System\WinForms\DataGridViewTextBoxCell.cs (1)
266
preferredHeight = txtEditingControl.
PreferredSize
.Height;
winforms\Managed\System\WinForms\Form.cs (1)
4811
Size prefSize = this.
PreferredSize
;
winforms\Managed\System\WinForms\Label.cs (5)
790
get { return
PreferredSize
.Height; }
807
get { return
PreferredSize
.Width; }
1046
Size preferredSize = (AutoSize) ?
PreferredSize
: new Size(saveWidth, saveHeight);
1677
Size preferredSize =
PreferredSize
;
1684
Debug.Assert(!AutoSize || (AutoSize && !SelfSizing) || Size ==
PreferredSize
,
winforms\Managed\System\WinForms\PictureBox.cs (1)
1158
Size =
PreferredSize
;
winforms\Managed\System\WinForms\PropertyGridInternal\PropertyGridView.cs (2)
6048
if (this.Size.Height < this.
PreferredSize
.Height) {
6049
this.Size = new Size(this.Size.Width, this.
PreferredSize
.Height);
winforms\Managed\System\WinForms\TabPage.cs (1)
376
get { return base.
PreferredSize
; }
winforms\Managed\System\WinForms\ToolStripPanel.cs (1)
684
controlArray[i].Size = controlArray[i].
PreferredSize
;
winforms\Managed\System\WinForms\ToolStripPanelCell.cs (8)
149
if (MaximumSize.Height >= Control.
PreferredSize
.Height) {
157
if (MaximumSize.Height + growBy >= Control.
PreferredSize
.Height) {
158
int freed = Control.
PreferredSize
.Height - MaximumSize.Height;
166
if (MaximumSize.Height + growBy < Control.
PreferredSize
.Height) {
179
if (MaximumSize.Width >= Control.
PreferredSize
.Width) {
187
if (MaximumSize.Width + growBy >= Control.
PreferredSize
.Width) {
188
int freed = Control.
PreferredSize
.Width - MaximumSize.Width;
196
if (MaximumSize.Width + growBy < Control.
PreferredSize
.Width) {
winforms\Managed\System\WinForms\ToolStripPanelRow.cs (2)
1311
int controlToDragWidth = (toolStripToDrag.AutoSize) ? toolStripToDrag.
PreferredSize
.Width : toolStripToDrag.Width;
1840
int controlToDragWidth = (toolStripToDrag.AutoSize) ? toolStripToDrag.
PreferredSize
.Height : toolStripToDrag.Height;