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