659 references to Size
Microsoft.Extensions.AI.Abstractions.Tests (9)
Image\ImageGenerationOptionsTests.cs (8)
42options.ImageSize = new Size(1024, 768); 49Assert.Equal(new Size(1024, 768), options.ImageSize); 57Assert.Equal(new Size(1024, 768), clone.ImageSize); 70ImageSize = new Size(256, 256), 82Assert.Equal(new Size(256, 256), deserialized.ImageSize); 94ImageSize = new Size(512, 512), 104original.ImageSize = new Size(1024, 1024); 111Assert.Equal(new Size(512, 512), clone.ImageSize);
Image\ImageGeneratorTests.cs (1)
108ImageSize = new Size(1024, 768),
Microsoft.Extensions.AI.Integration.Tests (2)
ImageGeneratingChatClientIntegrationTests.cs (2)
332ImageSize = new System.Drawing.Size(512, 512) 350Assert.Equal(new System.Drawing.Size(512, 512), options.ImageSize);
Microsoft.Extensions.AI.OpenAI.Tests (4)
OpenAIConversionTests.cs (1)
332ImageSize = new System.Drawing.Size(1024, 1024),
OpenAIResponseClientTests.cs (3)
5729ImageSize = new(1024, 1024), 5830ImageSize = new(1024, 1024), 5947ImageSize = new(512, 512),
Microsoft.Extensions.AI.Tests (1)
Image\OpenTelemetryImageGeneratorTests.cs (1)
80ImageSize = new(1024, 768),
Microsoft.Private.Windows.Core (3)
_generated\206\Windows.Win32.RECT.g.cs (1)
72 internal readonly global::System.Drawing.Size Size => new global::System.Drawing.Size(this.Width, this.Height);
_generated\217\Windows.Win32.SIZE.g.cs (1)
51 public static implicit operator global::System.Drawing.Size(SIZE value) => new global::System.Drawing.Size(value.cx, value.cy);
System\Private\Windows\Nrbf\SerializationRecordExtensions.cs (1)
101value = new Size(classInfo.GetInt32("width"), classInfo.GetInt32("height"));
Microsoft.VisualBasic.Forms (2)
Microsoft\VisualBasic\MyServices\Internal\ProgressDialog.vb (2)
133LabelInfo.MaximumSize = New Size(300, 0) 206LabelInfo.MaximumSize = New Size(ClientSize.Width - BORDER_SIZE, 0)
PresentationUI (164)
MS\Internal\Documents\Application\DocumentPropertiesDialog.Designer.cs (51)
133this.tableLayoutPanel3.Size = new System.Drawing.Size(362, 437); 143this._tabControl.Size = new System.Drawing.Size(436, 535); 155this._summaryTab.Size = new System.Drawing.Size(324, 355); 205this.tableLayoutPanel1.Size = new System.Drawing.Size(324, 297); 213this._language.Size = new System.Drawing.Size(335, 13); 223this._title.Size = new System.Drawing.Size(335, 13); 232this._titleLabel.Size = new System.Drawing.Size(27, 13); 240this._identifier.Size = new System.Drawing.Size(335, 13); 249this._versionLabel.Size = new System.Drawing.Size(42, 13); 257this._authorLabel.Size = new System.Drawing.Size(38, 13); 265this._statusLabel.Size = new System.Drawing.Size(37, 13); 273this._contentLabel.Size = new System.Drawing.Size(44, 13); 281this._languageLabel.Size = new System.Drawing.Size(55, 13); 289this._subjectLabel.Size = new System.Drawing.Size(43, 13); 297this._version.Size = new System.Drawing.Size(335, 13); 306this._categoryLabel.Size = new System.Drawing.Size(49, 13); 314this._category.Size = new System.Drawing.Size(335, 13); 323this._status.Size = new System.Drawing.Size(335, 13); 332this._content.Size = new System.Drawing.Size(335, 13); 341this._keywordsLabel.Size = new System.Drawing.Size(53, 13); 350this._author.Size = new System.Drawing.Size(335, 13); 359this._subject.Size = new System.Drawing.Size(335, 13); 369this._description.Size = new System.Drawing.Size(335, 101); 380this._keywords.Size = new System.Drawing.Size(335, 28); 391this._identifierLabel.Size = new System.Drawing.Size(47, 13); 400this._descriptionLabel.Size = new System.Drawing.Size(60, 13); 426this._infoTab.Size = new System.Drawing.Size(348, 379); 445this.tableLayoutPanel2.Size = new System.Drawing.Size(314, 355); 477this._size.Size = new System.Drawing.Size(270, 28); 485this._iconPictureBox.Size = new System.Drawing.Size(40, 40); 495this._filename.Size = new System.Drawing.Size(340, 13); 505this._documentType.Size = new System.Drawing.Size(340, 13); 515this._sizeLabel.Size = new System.Drawing.Size(40, 13); 526this._documentDetailBox.Size = new System.Drawing.Size(305, 127); 563this._documentPrintedDate.Size = new System.Drawing.Size(282, 13); 572this._documentModifiedDate.Size = new System.Drawing.Size(282, 13); 581this._documentCreatedDate.Size = new System.Drawing.Size(282, 13); 590this._revision.Size = new System.Drawing.Size(282, 13); 599this._documentPrintedLabel.Size = new System.Drawing.Size(43, 13); 607this._documentModifiedLabel.Size = new System.Drawing.Size(50, 13); 615this._documentCreatedLabel.Size = new System.Drawing.Size(47, 13); 623this._revisionLabel.Size = new System.Drawing.Size(51, 13); 631this._lastSavedLabel.Size = new System.Drawing.Size(79, 13); 639this._lastSaved.Size = new System.Drawing.Size(282, 13); 679this._fileModifiedDate.Size = new System.Drawing.Size(282, 13); 688this._fileAccessedDate.Size = new System.Drawing.Size(282, 13); 697this._fileCreatedLabel.Size = new System.Drawing.Size(47, 13); 705this._fileModifiedLabel.Size = new System.Drawing.Size(50, 13); 713this._fileCreatedDate.Size = new System.Drawing.Size(282, 13); 722this._fileAccessedLabel.Size = new System.Drawing.Size(57, 13); 730this.ClientSize = new System.Drawing.Size(466, 574);
MS\Internal\Documents\CredentialManagerDialog.Designer.cs (5)
69this._mainDialogTableLayoutPanel.Size = new System.Drawing.Size(398, 157); 144this._credListBox.Size = new System.Drawing.Size(299, 82); 152this._instructionLabel.MaximumSize = new System.Drawing.Size(400, 0); 154this._instructionLabel.Size = new System.Drawing.Size(0, 0); 165this.ClientSize = new System.Drawing.Size(409, 168);
MS\Internal\Documents\RequestedSignatureDialog.Designer.cs (14)
65_buttomControlLayoutpanel.Size = new System.Drawing.Size(56, 24); 73_addButton.Size = new System.Drawing.Size(65, 6); 83_cancelButton.Size = new System.Drawing.Size(65, 6); 118_userInputTableLayoutPanel.Size = new System.Drawing.Size(407, 197); 125_dateTimePicker.Size = new System.Drawing.Size(245, 20); 137_requestedLocationTextBox.Size = new System.Drawing.Size(401, 20); 147_signatureAppliedByDateLabel.Size = new System.Drawing.Size(17, 13); 156_requestSignerNameLabel.Size = new System.Drawing.Size(17, 13); 165_requestLocationLabel.Size = new System.Drawing.Size(17, 13); 173_requestedSignerNameTextBox.Size = new System.Drawing.Size(401, 20); 183_intentLabel.Size = new System.Drawing.Size(17, 13); 192_intentComboBox.Size = new System.Drawing.Size(401, 21); 211_mainDialogTableLayoutPanel.Size = new System.Drawing.Size(433, 273); 220ClientSize = new System.Drawing.Size(451, 282);
MS\Internal\Documents\RMEnrollmentPage1.Designer.cs (16)
69_panel1.Size = new System.Drawing.Size(398, 196); 80_flowLayoutPanel2.Size = new System.Drawing.Size(398, 153); 90_flowLayoutPanel3.Size = new System.Drawing.Size(353, 111); 104_flowLayoutPanel4.Size = new System.Drawing.Size(198, 89); 112_label1.MaximumSize = new System.Drawing.Size(400, 0); 114_label1.Size = new System.Drawing.Size(392, 13); 122_label2.MaximumSize = new System.Drawing.Size(400, 0); 124_label2.Size = new System.Drawing.Size(0, 0); 132_label3.MaximumSize = new System.Drawing.Size(400, 0); 134_label3.Size = new System.Drawing.Size(165, 13); 142_privacyLabel.MaximumSize = new System.Drawing.Size(400, 0); 144_privacyLabel.Size = new System.Drawing.Size(89, 13); 154_instructionlabel.Size = new System.Drawing.Size(140, 13); 162_panel2.Size = new System.Drawing.Size(13, 105); 170_pictureBox.Size = new System.Drawing.Size(78, 75); 208ClientSize = new System.Drawing.Size(398, 196);
MS\Internal\Documents\RMEnrollmentPage2.Designer.cs (14)
69this._flowLayoutPanel1.Size = new System.Drawing.Size(548, 43); 101this._flowLayoutPanel2.Size = new System.Drawing.Size(548, 326); 110this._label1.Size = new System.Drawing.Size(322, 13); 122this._flowLayoutPanel3.Size = new System.Drawing.Size(528, 38); 131this._pictureBox1.Size = new System.Drawing.Size(16, 16); 140this._label2.MaximumSize = new System.Drawing.Size(490, 0); 142this._label2.Size = new System.Drawing.Size(490, 26); 157this._tableLayoutPanel1.MinimumSize = new System.Drawing.Size(488, 0); 164this._tableLayoutPanel1.Size = new System.Drawing.Size(488, 234); 173this._networkRadioButton.Size = new System.Drawing.Size(126, 17); 184this._pictureBox2.Size = new System.Drawing.Size(100, 50); 193this._passportRadioButton.Size = new System.Drawing.Size(132, 17); 203this._pictureBox4.Size = new System.Drawing.Size(100, 50); 213this.ClientSize = new System.Drawing.Size(548, 369);
MS\Internal\Documents\RMEnrollmentPage3.Designer.cs (7)
60this.tableLayoutPanel1.Size = new System.Drawing.Size(419, 218); 70this.flowLayoutPanel2.Size = new System.Drawing.Size(413, 27); 79this.label2.Size = new System.Drawing.Size(245, 13); 95this.tableLayoutPanel2.Size = new System.Drawing.Size(413, 135); 105this.label3.Size = new System.Drawing.Size(115, 13); 114this.progressBar1.Size = new System.Drawing.Size(100, 14); 123this.ClientSize = new System.Drawing.Size(419, 218);
MS\Internal\Documents\RMPermissions.Designer.cs (1)
187this.ClientSize = new System.Drawing.Size(196, 155);
MS\Internal\Documents\RMPublishingDialog.cs (2)
506new System.Drawing.Size(totalPadding, totalPadding)); 913System.Drawing.Size imageButtonSize = new System.Drawing.Size(
MS\Internal\Documents\RMPublishingDialog.Designer.cs (14)
93this.radioButtonUnrestricted.Size = new System.Drawing.Size(85, 17); 102this.radioButtonPermissions.Size = new System.Drawing.Size(85, 17); 111this.radioButtonTemplate.Size = new System.Drawing.Size(85, 17); 124this.groupBoxMainContent.Size = new System.Drawing.Size(650, 270); 165this.textBoxUnrestrictedText.Size = new System.Drawing.Size(625, 230); 181this.comboBoxTemplates.Size = new System.Drawing.Size(350, 21); 205this.textBoxUserName.MinimumSize = new System.Drawing.Size(326, 20); 242this.rightsTable.Size = new System.Drawing.Size(635, 150); 268this.textBoxPermissionsContact.Size = new System.Drawing.Size(612, 20); 307this.flowLayoutPanelActions.Size = new System.Drawing.Size(541, 29); 316this.buttonCancel.Size = new System.Drawing.Size(75, 23); 323this.buttonSave.Size = new System.Drawing.Size(75, 23); 330this.buttonSaveAs.Size = new System.Drawing.Size(75, 23); 374this.ClientSize = new System.Drawing.Size(554, 431);
MS\Internal\Documents\SignatureSummaryDialog.cs (12)
237MinimumSize = new Size(IconWidth + SummaryNameTextWidth, 0), 238MaximumSize = new Size(IconWidth + SummaryNameTextWidth, 0), 248MinimumSize = new Size(IntentTextWidth, 0), 249MaximumSize = new Size(IntentTextWidth, 0), 259MinimumSize = new Size(LocaleTextWidth, 0), 260MaximumSize = new Size(LocaleTextWidth, 0), 270MinimumSize = new Size(SignByTextWidth, 0), 271MaximumSize = new Size(SignByTextWidth, 0), 289MaximumSize = new Size(IconWidth + SummaryNameTextWidth, 0), 290MinimumSize = new Size(IconWidth + SummaryNameTextWidth, 0), 300MinimumSize = new Size(IntentTextWidth, 0), 301MaximumSize = new Size(IntentTextWidth, 0),
MS\Internal\Documents\SignatureSummaryDialog.Designer.cs (12)
59_buttonDone.Size = new System.Drawing.Size(75, 23); 82_flowpanelMiddleControls.Size = new System.Drawing.Size(335, 49); 95_flowpanelBottomControls.Size = new System.Drawing.Size(335, 49); 102_buttonSign.Size = new System.Drawing.Size(75, 23); 112_buttonViewCert.Size = new System.Drawing.Size(75, 23); 122_buttonRequestDelete.Size = new System.Drawing.Size(75, 23); 130_buttonRequestAdd.Size = new System.Drawing.Size(75, 23); 143_columnHeaderPanel.Size = new System.Drawing.Size(600, 25); 154_listBoxSummary.Size = new System.Drawing.Size(600, 217); 170_listboxMainPanel.Size = new System.Drawing.Size(602, 272); 179_listboxItemPanel.Size = new System.Drawing.Size(600, 217); 210MinimumSize = new System.Drawing.Size(629, 378);
MS\Internal\Documents\SigningDialog.Designer.cs (16)
66_userInputFlowPanel.Size = new System.Drawing.Size(475, 195); 95_signatureControlInputLayoutTable.Size = new System.Drawing.Size(466, 173); 103_addDigSigCheckBox.Size = new System.Drawing.Size(15, 14); 113_signerlabel.Size = new System.Drawing.Size(0, 0); 123_addDocPropCheckBox.Size = new System.Drawing.Size(15, 14); 132_reasonLabel.Size = new System.Drawing.Size(0, 0); 141_reasonComboBox.Size = new System.Drawing.Size(460, 21); 151_actionlabel.Size = new System.Drawing.Size(0, 0); 160_locationLabel.Size = new System.Drawing.Size(0, 0); 168_locationTextBox.Size = new System.Drawing.Size(460, 20); 190_buttonflowLayoutPanel.Size = new System.Drawing.Size(475, 17); 203_cancelButton.Size = new System.Drawing.Size(36, 6); 217_signButton.Size = new System.Drawing.Size(36, 6); 231_signSaveAsButton.Size = new System.Drawing.Size(36, 6); 249_mainLayoutTable.Size = new System.Drawing.Size(481, 292); 259ClientSize = new System.Drawing.Size(492, 303);
System.ComponentModel.TypeConverter (2)
System\Drawing\SizeConverter.cs (2)
50return new Size(width, height); 100return new Size((int)width, (int)height);
System.Drawing.Common (9)
misc\DpiHelper.cs (1)
176new Size(LogicalToDeviceUnitsX(logicalSize.Width), ScaleToInitialSystemDpi(logicalSize.Height));
System\Drawing\BufferedGraphicsContext.cs (2)
323_bufferSize = new Size(optWidth, optHeight); 332_virtualSize = new Size(width, height);
System\Drawing\Icon.cs (2)
212_iconSize = new Size(bitmap.bmWidth, bitmap.bmHeight); 221_iconSize = new Size(bitmap.bmWidth, bitmap.bmHeight / 2);
System\Drawing\Image.cs (1)
421public Size Size => new(Width, Height);
System\Drawing\Printing\PrinterUnitConvert.cs (1)
41new(Convert(value.Width, fromUnit, toUnit), Convert(value.Height, fromUnit, toUnit));
System\Drawing\ToolboxBitmapAttribute.cs (2)
19private static readonly Size s_largeSize = new(32, 32); 20private static readonly Size s_smallSize = new(16, 16);
System.Drawing.Primitives (9)
System\Drawing\Point.cs (1)
84public static explicit operator Size(Point p) => new Size(p.X, p.Y);
System\Drawing\Rectangle.cs (1)
74readonly get => new Size(Width, Height);
System\Drawing\Size.cs (7)
81public static Size operator /(Size left, int right) => new Size(unchecked(left.width / right), unchecked(left.height / right)); 151new Size(unchecked(sz1.Width + sz2.Width), unchecked(sz1.Height + sz2.Height)); 157new Size(unchecked((int)Math.Ceiling(value.Width)), unchecked((int)Math.Ceiling(value.Height))); 163new Size(unchecked(sz1.Width - sz2.Width), unchecked(sz1.Height - sz2.Height)); 168public static Size Truncate(SizeF value) => new Size(unchecked((int)value.Width), unchecked((int)value.Height)); 174new Size(unchecked((int)Math.Round(value.Width)), unchecked((int)Math.Round(value.Height))); 201new Size(unchecked(size.width * multiplier), unchecked(size.height * multiplier));
System.Private.Windows.Core (3)
_generated\209\Windows.Win32.RECT.g.cs (1)
72 internal readonly global::System.Drawing.Size Size => new global::System.Drawing.Size(this.Width, this.Height);
_generated\220\Windows.Win32.SIZE.g.cs (1)
51 public static implicit operator global::System.Drawing.Size(SIZE value) => new global::System.Drawing.Size(value.cx, value.cy);
System\Private\Windows\Nrbf\SerializationRecordExtensions.cs (1)
101value = new Size(classInfo.GetInt32("width"), classInfo.GetInt32("height"));
System.Private.Windows.Core.TestUtilities (3)
CommonTestHelper.cs (3)
104data.Add(new Size(1, 2)); 109data.Add(new Size(-1, 1)); 110data.Add(new Size(1, -1));
System.Windows.Forms (324)
System\Windows\Forms\ActiveX\AxHost.cs (2)
324return new Size(75, 23); 1120Size size = new(width, height);
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (1)
1703Size adjusted = new(size.Width, size.Height);
System\Windows\Forms\Control.cs (5)
425Size = new Size(width, height); 1270get => new(_clientWidth, _clientHeight); 3100get => new(_width, _height); 5286Size = LayoutUtils.IntersectSizes(new Size(proposedWidth, proposedHeight), maximumSize) 10233Size = SizeFromClientSizeInternal(new(x, y));
System\Windows\Forms\Controls\Buttons\Button.cs (4)
31private Size _systemSize = new(InvalidDimensionValue, InvalidDimensionValue); 250_systemSize = new Size(InvalidDimensionValue, InvalidDimensionValue); 285_systemSize = new Size(InvalidDimensionValue, InvalidDimensionValue); 296_systemSize = new Size(InvalidDimensionValue, InvalidDimensionValue);
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (1)
258protected override Size DefaultSize => new(75, 23);
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.LayoutOptions.cs (6)
121return new Size( 152return new Size( 196Size bordersAndPadding = new(linearBorderAndPadding, linearBorderAndPadding); 201Size checkSize = checkSizeLinear > 0 ? new(checkSizeLinear + 1, checkSizeLinear) : Size.Empty; 204Size textImageInsetSize = new(TextImageInset * 2, TextImageInset * 2); 499size = new Size(size.Width + 1, size.Height + 1);
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\FlatButtonDarkModeRenderer.cs (1)
21private static readonly Size s_corner = new(CornerRadius, CornerRadius);
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\PopupButtonDarkModeRenderer.cs (1)
227path.AddRoundedRectangle(bounds, new Size(radius, radius));
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\SystemButtonDarkModeRenderer.cs (2)
203Rectangle arcRect = new(bounds.Location, new Size(diameter, diameter)); 278path.AddRoundedRectangle(bounds, new Size(radius, radius));
System\Windows\Forms\Controls\Buttons\CheckBox.cs (1)
272protected override Size DefaultSize => new(104, 24);
System\Windows\Forms\Controls\Buttons\CheckBoxRenderer.cs (2)
236return new Size(13, 13); 252return new Size(13, 13);
System\Windows\Forms\Controls\Buttons\RadioButton.cs (1)
237protected override Size DefaultSize => new(104, 24);
System\Windows\Forms\Controls\Buttons\RadioButtonRenderer.cs (1)
265return new Size(13, 13);
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (5)
386return new Size(121, PreferredHeight); 668set => base.MaximumSize = new Size(value.Width, 0); 674set => base.MinimumSize = new Size(value.Width, 0); 779Size textSize = TextRenderer.MeasureText(LayoutUtils.TestString, Font, new Size(short.MaxValue, (int)(FontHeight * 1.25)), TextFormatFlags.SingleLine); 790Size textSize = TextRenderer.MeasureText(LayoutUtils.TestString, Font, new Size(short.MaxValue, (int)(FontHeight * 1.25)), TextFormatFlags.SingleLine);
System\Windows\Forms\Controls\ComboBox\ComboBox.FlatComboAdapter.cs (1)
33_outerBorder = new Rectangle(_clientRect.Location, new Size(_clientRect.Width - 1, _clientRect.Height - 1));
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (1)
2117protected override Size DefaultSize => new(240, 150);
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (5)
9016return new Size(preferredWidth, preferredHeight); 18812Invalidate(new Rectangle(new Point(-pt.X, ColumnHeadersHeight), new Size(-step, ClientSize.Height))); 18823new Size(step, ClientSize.Height))); 18830new Size(-step, ClientSize.Width))); 18837new Size(ClientSize.Width, ClientSize.Height - (pt.Y - rect.Bottom) - step)));
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (5)
284return new Size(-1, -1); 323preferredSize = new Size( 334preferredSize = new Size( 347preferredSize = new Size( 358preferredSize = new Size(
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (14)
1276ScaleHelper.GetIconResourceAsBitmap(typeof(DataGridViewCell), bitmapName, new Size(s_iconsWidth, s_iconsHeight)); 2279return GetPreferredSize(screen, dataGridViewCellStyle, rowIndex, new Size(width, 0)).Height; 2286return new Size(-1, -1); 2298Size constraintSize) => new(-1, -1); 2334return GetPreferredSize(screen, dataGridViewCellStyle, rowIndex, new Size(0, height)).Width; 2341return new Size(-1, -1); 2351return new Size(OwningColumn.Thickness, OwningRow.GetHeight(rowIndex)); 2541Size requiredSize = TextRenderer.MeasureText(text, font, new Size(maxWidth, int.MaxValue), flags); 2565return new Size(0, 0); 2580textSize = TextRenderer.MeasureText(text, font, new Size((int)maxWidth, int.MaxValue), flags); 2609return TextRenderer.MeasureText(text, font, new Size(int.MaxValue, int.MaxValue), flags); 2636textSize = TextRenderer.MeasureText(text, font, new Size((int)maxWidth, maxHeight), flags); 3765editingControl.Size = new Size(editingControlBounds.Width, editingControlBounds.Height); 3851DataGridView.EditingPanel.Size = new Size(wEditingPanel, hEditingPanel);
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (8)
643return new Size(-1, -1); 676preferredSize = new Size(checkBoxSize.Width + borderAndPaddingWidths + 2 * DATAGRIDVIEWCHECKBOXCELL_margin, 0); 682preferredSize = new Size(0, checkBoxSize.Height + borderAndPaddingHeights + 2 * DATAGRIDVIEWCHECKBOXCELL_margin); 688preferredSize = new Size(checkBoxSize.Width + borderAndPaddingWidths + 2 * DATAGRIDVIEWCHECKBOXCELL_margin, 708preferredSize = new Size(checkBoxSize + borderAndPaddingWidths, 0); 714preferredSize = new Size(0, checkBoxSize + borderAndPaddingHeights); 720preferredSize = new Size(checkBoxSize + borderAndPaddingWidths, checkBoxSize + borderAndPaddingHeights); 1202checkBoxSize = new Size(SystemInformation.Border3DSize.Width * 2 + 9, SystemInformation.Border3DSize.Width * 2 + 9);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (10)
486return new Size(-1, -1); 511preferredSize = new Size(0, 0); 516preferredSize = new Size( 527preferredSize = new Size( 557preferredSize = new Size(0, 0); 563glyphSize = new Size(s_sortGlyphWidth + 2 * s_sortGlyphHorizontalMargin, 583preferredSize = new Size( 598preferredSize = new Size( 612preferredSize = new Size( 651preferredSize = new Size(0, 0);
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (2)
537Size adjustedSize = new(size.Width - borderAndPaddingWidths.X - borderAndPaddingWidths.Width, 1167return new Size(-1, -1);
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (4)
349return new Size(-1, -1); 357return new Size(OwningColumn.Thickness, DataGridView.ColumnHeadersHeight); 370return new Size(DataGridView.RowHeadersWidth, OwningRow.GetHeight(rowIndex)); 377return new Size(DataGridView.RowHeadersWidth, DataGridView.ColumnHeadersHeight);
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (10)
403return new Size(-1, -1); 435preferredSize = new Size(0, Math.Min(img.Height, decimal.ToInt32((decimal)img.Height * imgWidthAllowed / img.Width))); 447preferredSize = new Size(0, Math.Min(ico.Height, decimal.ToInt32((decimal)ico.Height * icoWidthAllowed / ico.Width))); 453preferredSize = new Size(0, 1); 470preferredSize = new Size(Math.Min(img.Width, decimal.ToInt32((decimal)img.Width * imgHeightAllowed / img.Height)), 0); 482preferredSize = new Size(Math.Min(ico.Width, decimal.ToInt32((decimal)ico.Width * icoHeightAllowed / ico.Height)), 0); 488preferredSize = new Size(1, 0); 495preferredSize = new Size(img.Width, img.Height); 499preferredSize = new Size(ico.Width, ico.Height); 503preferredSize = new Size(1, 1);
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (5)
541return new Size(-1, -1); 571preferredSize = new Size( 584preferredSize = new Size( 613preferredSize = new Size( 621preferredSize = new Size(
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (3)
84ScaleHelper.GetIconResourceAsBitmap(typeof(DataGridViewHeaderCell), iconName, new Size(s_iconsWidth, s_iconsHeight)); 514return new Size(-1, -1); 855Size maxBounds = new(valBounds.Width - s_iconsWidth - 2 * RowHeaderIconMarginWidth, valBounds.Height);
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (6)
393return new Size(-1, -1); 417preferredSize = new Size( 430preferredSize = new Size( 459preferredSize = new Size( 467preferredSize = new Size( 801DataGridView.EditingControl.Size = new Size(editingControlBounds.Width, editingControlBounds.Height);
System\Windows\Forms\Controls\DataGridView\DataGridViewTopLeftHeaderCell.cs (1)
140return new Size(-1, -1);
System\Windows\Forms\Controls\DataGridView\DataGridViewUtilities.cs (5)
202return new Size(preferredWidth, 0); 255return new Size(0, Math.Max(minHeightIcon, minHeightContent) + borderAndPaddingHeights); 278preferredSize = new Size(0, 1); 322Size sizeRequired = TextRenderer.MeasureText(text, font, new Size(int.MaxValue, int.MaxValue), flags); 329Size sizeCell = new(cellBounds.Width, cellBounds.Height);
System\Windows\Forms\Controls\DateTimePicker\DateTimePicker.cs (2)
452protected override Size DefaultSize => new(200, PreferredHeight); 1022return new Size(width, height);
System\Windows\Forms\Controls\GroupBox\GroupBox.cs (3)
137protected override Size DefaultSize => new(200, 100); 514textSize = hdc.HDC.MeasureText(Text, hfont, new Size(textRectangle.Width, int.MaxValue), (TextFormatFlags)flags); 602Size totalPadding = borderSize + new Size(0, _fontHeight) + Padding.Size;
System\Windows\Forms\Controls\GroupBox\GroupBoxRenderer.cs (2)
185new Size(textBounds.Width, textBounds.Height), 288new Size(textBounds.Width, textBounds.Height),
System\Windows\Forms\Controls\ImageList\ImageList.cs (3)
27private static readonly Size s_defaultImageSize = new(16, 16); 169_imageSize = new Size(value.Width, value.Height); 217_imageSize = new Size(x, y);
System\Windows\Forms\Controls\Labels\Label.cs (4)
316protected override Size DefaultSize => new(100, AutoSize ? PreferredHeight : 23); 837Size preferredSize = (AutoSize) ? PreferredSize : new Size(saveWidth, saveHeight); 1022bordersAndPadding += new Size(2, 2); 1270Size preferredSize = GetPreferredSize(new Size(clientRect.Width, clientRect.Height));
System\Windows\Forms\Controls\Labels\LinkLabel.cs (2)
560Size clientSize = new(clientRectWithPadding.Width, clientRectWithPadding.Height); 985Size preferredSize = GetPreferredSize(new Size(clientRect.Width, clientRect.Height));
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (4)
378return new Size(120, 96); 602Size = new Size(oldSize.Width + 1, oldSize.Height); 766width = SizeFromClientSize(new Size(MaxItemWidth, height)).Width; 774return new Size(width, height) + Padding.Size;
System\Windows\Forms\Controls\ListView\ListView.cs (1)
752return new Size(121, 97);
System\Windows\Forms\Controls\ListView\ListViewItem.IKeyboardToolTip.cs (3)
103_ => new Rectangle(point, new Size(itemBounds.Width, itemBounds.Height)), 114new Size(Math.Min(TextRenderer.MeasureText(item.Text, item.Font).Width, itemBounds.Width), 131return new Rectangle(point, new Size(Math.Min(textWidth, itemBounds.Width), itemBounds.Height));
System\Windows\Forms\Controls\Menus\MenuStrip.cs (2)
68ScaleHelper.ScaleToDpi(new Size(200, 24), DeviceDpi) : 69new Size(200, 24);
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (5)
84private static readonly Size s_defaultSingleMonthSize = new(176, 153); 98private Size _dimensions = new(1, 1); 803return new Size(rect.right, rect.bottom); 1603private void ResetCalendarDimensions() => CalendarDimensions = new Size(1, 1); 1901=> !_dimensions.Equals(new Size(1, 1));
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (1)
220protected override Size DefaultSize => new(100, 50);
System\Windows\Forms\Controls\ProgressBar\ProgressBar.cs (1)
188protected override Size DefaultSize => new(100, 23);
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (4)
100private static readonly Size s_defaultLargeButtonSize = new(32, 32); 101private static readonly Size s_defaultNormalButtonSize = new(16, 16); 545protected override Size DefaultSize => new(130, 130); 2755_gridView.Size = new Size(Size.Width, endSize - _gridView.Location.Y);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridErrorDialog.cs (11)
130Size = new(208, 43), 138Size = new(64, 64), 151Size = new(100, 23), 163Size = new(75, 23), 176Size = new(75, 23), 190Size = new(290, 29), 213Size = new(284, 73), 230Size = new(290, 108), 231MinimumSize = new(279, 50), 255Size = new(273, 100), 269ClientSize = new(299, 113);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\HelpPane.cs (2)
54Size = new(LogicalToDeviceUnits(LogicalDefaultWidth), LogicalToDeviceUnits(LogicalDefaultHeight)); 72Size = new(Width, 1 + value * _lineHeight);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (10)
230? new(SystemInformation.VerticalScrollBarArrowHeightForDpi(DeviceDpiInternal), RowHeight) 231: new(SystemInformation.VerticalScrollBarArrowHeight, RowHeight); 277? new Size(SystemInformation.VerticalScrollBarArrowHeightForDpi(DeviceDpiInternal), RowHeight) 278: new Size(SystemInformation.VerticalScrollBarArrowHeight, RowHeight); 961Size size = new(width, height); 1991Size sizeWindow = new(rect.Width, rect.Height); 4357? new Size(SystemInformation.VerticalScrollBarArrowHeightForDpi(DeviceDpiInternal), RowHeight) 4358: new Size(SystemInformation.VerticalScrollBarArrowHeight, RowHeight); 5170_dropDownButton.Size = new(SystemInformation.VerticalScrollBarArrowHeightForDpi(DeviceDpiInternal), RowHeight); 5174_dropDownButton.Size = new(SystemInformation.VerticalScrollBarArrowHeight, RowHeight);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (3)
41new(SystemInformation.VerticalScrollBarWidth * 4, SystemInformation.HorizontalScrollBarHeight * 4); 297Size newSize = new(2 * DropDownHolderBorder + _currentControl.Width, 2 * DropDownHolderBorder + _currentControl.Height); 600Size size = new(2 * DropDownHolderBorder + control.Width, 2 * DropDownHolderBorder + control.Height);
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (1)
350protected override Size DefaultSize => new(100, 96);
System\Windows\Forms\Controls\Splitter\Splitter.cs (1)
94return new Size(DefaultWidth, DefaultWidth);
System\Windows\Forms\Controls\TabControl\TabControl.cs (2)
233return new Size(200, 100); 1535Size = new Size(size.Width + 1, size.Height);
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (2)
487return new Size(100, PreferredHeight); 826bordersAndPadding += new Size(0, 3);
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (1)
65return new Size(200, 22);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (7)
26private static Size s_onePixel = new(1, 1); 123_imageScalingSize = new Size(s_iconSize, s_iconSize); 540? ScaleHelper.ScaleToDpi(new Size(100, 25), DeviceDpi) 541: new Size(100, 25); 3770_imageScalingSize = new Size(s_iconSize, s_iconSize); 4027CommonProperties.SetMinimumSize(this, new Size(-1, -1)); 4460Size invalidDefaultSize = new(-1, -1);
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.cs (1)
105protected override Size DefaultSize => new(100, 22);
System\Windows\Forms\Controls\ToolStrips\ToolStripContainer.cs (1)
234return new Size(150, 175);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownButton.ToolStripDropDownButtonInternalLayout.cs (1)
13private static readonly Size s_logicalDropDownArrowSize = new(5, 3);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (2)
339maxArrowSize = new Size(_arrowSize, _maxItemSize.Height); 605_defaultImageSize = new(defaultImageSize, defaultImageSize);
System\Windows\Forms\Controls\ToolStrips\ToolStripGrip.cs (2)
82preferredSize = new Size(ParentInternal.Width, GripThickness); 86preferredSize = new Size(GripThickness, ParentInternal.Height);
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (2)
686ScaleHelper.ScaleToDpi(new Size(23, 23), DeviceDpi) : 687new Size(23, 23);
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.ToolStripItemInternalLayout.cs (1)
20private static readonly Size s_invalidSize = new(int.MinValue, int.MinValue);
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (3)
53private static readonly Size s_checkMarkBitmapSize = new(16, 16); 215? ScaleHelper.ScaleToDpi(new Size(32, 19), DeviceDpi) 216: new Size(32, 19);
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.cs (1)
343return new Size(_minAllowedWidth, _minAllowedWidth);
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (2)
21private static readonly Size s_onePix = new(1, 1); 860Rectangle bottomLeftParentHorizontalPixels = new(bottomLeft, new Size(2, 1));
System\Windows\Forms\Controls\ToolStrips\ToolStripProgressBar.cs (2)
75return new Size(100, 15); 240Size = new Size(100, 15)
System\Windows\Forms\Controls\ToolStrips\ToolStripScrollButton.cs (1)
15private static readonly Size s_defaultBitmapSize = new(16, 16);
System\Windows\Forms\Controls\ToolStrips\ToolStripSeparator.cs (5)
54protected override Size DefaultSize => new(SeparatorThickness, SeparatorThickness); 263return new Size(SeparatorThickness, SeparatorThickness); 268return new Size(parent.Width - (parent.Padding.Horizontal - dropDownMenu.ImageMargin.Width), SeparatorThickness); 282return new Size(SeparatorThickness, constrainingSize.Height); 285return new Size(constrainingSize.Width, SeparatorThickness);
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.cs (2)
301Rectangle dropDownButtonBounds = new(Point.Empty, new Size(Math.Min(Width, DropDownButtonWidth), Height)); 307Rectangle splitButtonButtonBounds = new(Point.Empty, new Size(splitButtonButtonWidth, splitButtonButtonHeight));
System\Windows\Forms\Controls\ToolStrips\ToolStripStatusLabel.cs (1)
181return base.GetPreferredSize(constrainingSize) + new Size(4, 4);
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.cs (2)
77protected override Size DefaultSize => new Size(100, 22); 93return new Size(bounds.Width, TextBox.PreferredHeight);
System\Windows\Forms\Controls\TrackBar\TrackBar.cs (1)
200protected override Size DefaultSize => new(104, PreferredDimension);
System\Windows\Forms\Controls\TreeView\TreeView.cs (3)
90s_stateImageSize = new(imageSize, imageSize); 413protected override Size DefaultSize => new(121, 97); 2817bounds = new Rectangle(textLoc, new Size(textSize.Width, bounds.Height));
System\Windows\Forms\Controls\UpDown\DomainUpDown.cs (2)
515width = SizeFromClientSizeInternal(new(width, height)).Width + _upDownButtons.Width; 516return new Size(width, height) + Padding.Size;
System\Windows\Forms\Controls\UpDown\NumericUpDown.cs (2)
825int width = SizeFromClientSizeInternal(new(textWidth, height)).Width + _upDownButtons.Width; 826return new Size(width, height) + Padding.Size;
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (5)
62_upDownButtons.Size = new Size(_defaultButtonsWidth, PreferredHeight); 244protected override Size DefaultSize => new(DefaultControlWidth, PreferredHeight); 284set => base.MaximumSize = new Size(value.Width, 0); 290set => base.MinimumSize = new Size(value.Width, 0); 848upDownEditBounds.Size = new Size(clientArea.Width - _defaultButtonsWidth, clientArea.Height);
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.cs (1)
372if (_cachedBitmap is null || _cachedBitmap.Size != new Size(width, height))
System\Windows\Forms\Controls\WebBrowser\HtmlWindow.cs (1)
197return new(offsetWidth, offsetHeight);
System\Windows\Forms\Controls\WebBrowser\WebBrowser.cs (1)
1125protected override Size DefaultSize => new(250, 250);
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (2)
1078Size sz = new(width, height); 1185protected override Size DefaultSize => new(75, 23);
System\Windows\Forms\Design\ComponentEditorForm.cs (4)
184ImageSize = new Size(16, 16) 253Size size = new(bounds.Width + 3 * (BUTTON_PAD + xFrame) + selectorWidth, 306AutoScaleBaseSize = new Size(5, 14); 341_maxSize = new Size(3 * (BUTTON_WIDTH + BUTTON_PAD), 24 * _pageTypes.Length);
System\Windows\Forms\Dialogs\ThreadExceptionDialog.cs (3)
208Size textSize = new(_scaledMaxWidth - _scaledPaddingWidth, int.MaxValue); 253ClientSize = new Size(width, buttonTop + _scaledButtonTopPadding); 257_pictureBox.Size = new Size(_scaledPictureWidth * 3 / 4, _scaledPictureHeight * 3 / 4);
System\Windows\Forms\Form.cs (6)
445return new Size((int)Math.Round(real.Width), (int)Math.Round(real.Height)); 882protected override Size DefaultSize => new Size(300, 300); 1236Size = new Size(Math.Min(size.Width, value.Width), Math.Min(size.Height, value.Height)); 1353Size = new Size(Math.Max(size.Width, value.Width), Math.Max(size.Height, value.Height)); 3044Size newVar = new((int)Math.Round(newVarF.Width), (int)Math.Round(newVarF.Height)); 4520_dpiFormSizes.Add(e.DeviceDpiNew, new Size(e.SuggestedRectangle.Width, e.SuggestedRectangle.Height));
System\Windows\Forms\Input\Cursor.cs (2)
383return new Size(bitmap.bmWidth, bitmap.bmHeight); 388return new Size(bitmap.bmWidth, bitmap.bmHeight / 2);
System\Windows\Forms\Internal\WinFormsUtils.cs (1)
82bounds.Size = new Size(Math.Min(constrainingBounds.Width - 2, bounds.Width),
System\Windows\Forms\Layout\CommonProperties.cs (6)
32internal static Size DefaultMinimumSize { get; } = new(0, 0); 33internal static Size DefaultMaximumSize { get; } = new(0, 0); 200Debug.Assert(value != GetMaximumSize(element, new Size(-7109, -7107)), 214Debug.Assert(GetMaximumSize(element, new Size(-7109, -7107)) == value, "Error detected setting MaximumSize."); 222Debug.Assert(value != GetMinimumSize(element, new Size(-7109, -7107)), 236Debug.Assert(GetMinimumSize(element, new Size(-7109, -7107)) == value, "Error detected setting MinimumSize.");
System\Windows\Forms\Layout\Containers\SplitContainer.cs (15)
328return new Size(150, 100); 1601Panel1.Size = new Size(0, Panel1.Height); 1602Panel2.Size = new Size(0, Panel2.Height); 1607Panel1.Size = new Size(Panel1.Width, 0); 1608Panel2.Size = new Size(Panel2.Width, 0); 1619Panel1.Size = new Size(_panelSize, Height); 1620Panel2.Size = new Size(Math.Max(Width - _panelSize - SplitterWidthInternal, Panel2MinSize), Height); 1625Panel2.Size = new Size(_panelSize, Height); 1640Panel2.Size = new Size(Math.Max(Width - _splitterDistance - SplitterWidthInternal, Panel2MinSize), Height); 1677Panel1.Size = new Size(Width, _panelSize); 1679Panel2.Size = new Size(Width, Math.Max(Height - panel2Start, Panel2MinSize)); 1685Panel2.Size = new Size(Width, _panelSize); 1704Panel2.Size = new Size(Width, Math.Max(Height - panel2Start, Panel2MinSize)); 2178Panel2.Size = new Size(Width - _splitterDistance - SplitterWidthInternal, Height); 2228Panel2.Size = new Size(Width, Height - panel2Start);
System\Windows\Forms\Layout\DefaultLayout.cs (4)
492Size neededSize = new( 543Size newSize = xGetDockedSize(element, /* constraints = */ new Size(remainingSize.Width, 1)); 560Size newSize = xGetDockedSize(element, /* constraints = */ new Size(1, remainingSize.Height)); 606preferredSize = new Size(-7103, -7105);
System\Windows\Forms\Layout\FlowLayout.cs (3)
187Size elementConstraints = new(int.MaxValue, rowBounds.Height - elementProxy.Margin.Size.Height); 197elementConstraints = LayoutUtils.UnionSizes(new Size(1, 1), elementConstraints); 226Rectangle cellBounds = new(location, new Size(requiredSize.Width, rowBounds.Height));
System\Windows\Forms\Layout\LayoutUtils.cs (6)
13public static readonly Size s_maxSize = new(int.MaxValue, int.MaxValue); 14public static readonly Size s_invalidSize = new(int.MinValue, int.MinValue); 50Size textSize = TextRenderer.MeasureText(obj.ToString(), font, new Size(short.MaxValue, short.MaxValue), TextFormatFlags.SingleLine); 207return new Size( 214return new Size( 356Size stretchedSize = new(
System\Windows\Forms\Layout\TableLayout.cs (7)
105Size containerSize = container.DisplayRectangle.Size - new Size(cellBorderWidth, cellBorderWidth); 119CommonProperties.SetLayoutBounds(containerInfo.Container, new Size(SumStrips(containerInfo.Columns, 0, containerInfo.Columns.Length), 162Size containerSize = container.DisplayRectangle.Size - new Size(cellBorderWidth * 2, cellBorderWidth * 2); 176Size cellBorderSize = new(cellBorderWidth, cellBorderWidth); 726minWidth = GetElementSize(element, new Size(0, constrainingHeight)).Width; 731minWidth = GetElementSize(element, new Size(1, 0)).Width; 856int minHeight = GetElementSize(element, new Size(currentWidth - margin.Horizontal, 0)).Height + margin.Vertical;
System\Windows\Forms\Panels\Panel.cs (1)
145protected override Size DefaultSize => new(200, 100);
System\Windows\Forms\Printing\PrintControllerWithStatusDialog.StatusDialog.cs (4)
40Size = new Size(240, 64), 47Size = ScaleHelper.ScaleToDpi(new Size(75, 23), ScaleHelper.InitialSystemDpi), 72AutoScaleDimensions = new Size(6, 13); 77ClientSize = ScaleHelper.ScaleToDpi(new Size(256, 122), ScaleHelper.InitialSystemDpi);
System\Windows\Forms\Printing\PrintPreviewControl.cs (7)
34private Size _virtualSize = new(1, 1); 60Size = new Size(100, 100); 491_imageSize = new Size((int)(_zoom * pageSize.Width), (int)(_zoom * pageSize.Height)); 494SetVirtualSizeNoInvalidate(PhysicalToPixels(new Size(virtualX, virtualY), _screenDPI)); 661_imageSize = new Size((int)(_zoom * pageSize.Width), (int)(_zoom * pageSize.Height)); 752new(PixelsToPhysical(pixels.Width, dpi.X), PixelsToPhysical(pixels.Height, dpi.Y)); 758new(PhysicalToPixels(physical.Width, dpi.X), PhysicalToPixels(physical.Height, dpi.Y));
System\Windows\Forms\Printing\PrintPreviewDialog.cs (4)
53base.AutoScaleBaseSize = new Size(5, 13); 381protected override Size DefaultMinimumSize => new(375, 250); 910_previewControl.Size = new Size(792, 610); 970ClientSize = new Size(400, 300);
System\Windows\Forms\Rendering\ControlPaint_ModernControlButtonRenderer.cs (2)
100Size radius = new(4, 4); 116Size radius = new(4, 4);
System\Windows\Forms\Rendering\TextRenderer.cs (1)
23internal static Size MaxSize { get; } = new(int.MaxValue, int.MaxValue);
System\Windows\Forms\Scrolling\HScrollBar.cs (1)
24=> new(80, SystemInformation.HorizontalScrollBarHeight);
System\Windows\Forms\Scrolling\ScrollableControl.cs (1)
957_requestedScrollMargin = new Size(x, y);
System\Windows\Forms\Scrolling\VScrollBar.cs (2)
33return new Size( 38return new Size(SystemInformation.VerticalScrollBarWidth, DefaultHeight);
System\Windows\Forms\SystemInformation.cs (5)
101? new(PInvoke.GetCurrentSystemMetrics(SM_CXBORDER, (uint)dpi), 595=> new(PInvokeCore.SystemParametersInfoInt(SPI_GETMOUSEHOVERWIDTH), 770? new Size(data.iSmCaptionWidth, data.iSmCaptionHeight) 785? new Size(data.iMenuWidth, data.iMenuHeight) 815=> new(PInvokeCore.GetSystemMetrics(x), PInvokeCore.GetSystemMetrics(y));
System\Windows\Forms\ToolTip\ToolTip.cs (1)
1542bubbleSize = new Size(result.LOWORD, result.HIWORD);
System\Windows\Forms\UserControl.cs (1)
184return new Size(150, 150);
System.Windows.Forms.Design (113)
System\ComponentModel\Design\BinaryEditor.BinaryUI.cs (2)
185_buttonOK.MinimumSize = new Size(75, 23); 195_buttonSave.MinimumSize = new Size(75, 23);
System\ComponentModel\Design\ByteViewer.cs (2)
442Size = new Size( 562Size = new Size(
System\ComponentModel\Design\CollectionEditor.SplitButton.cs (1)
64return preferredSize + new Size(PushButtonWidth, 0);
System\ComponentModel\Design\DesignerActionPanel.CheckBoxPropertyLine.cs (2)
36Size checkBoxPreferredSize = _checkBox.GetPreferredSize(new Size(int.MaxValue, int.MaxValue)); 43return checkBoxPreferredSize + new Size(LineLeftMargin + LineRightMargin, LineVerticalPadding);
System\ComponentModel\Design\DesignerActionPanel.cs (2)
117MinimumSize = new Size(150, 0); 391return new Size(panelWidth, yPos + BottomPadding);
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (1)
175_button.Size = new Size(buttonHeight, buttonHeight);
System\ComponentModel\Design\DesignerActionPanel.MethodLine.cs (2)
45Size linkLabelSize = _linkLabel.GetPreferredSize(new Size(int.MaxValue, int.MaxValue)); 52return linkLabelSize + new Size(LineLeftMargin + LineRightMargin, LineVerticalPadding);
System\ComponentModel\Design\DesignerActionPanel.PanelHeaderLine.cs (3)
56Size titleSize = _titleLabel.GetPreferredSize(new Size(int.MaxValue, int.MaxValue)); 60subtitleSize = _subtitleLabel.GetPreferredSize(new Size(int.MaxValue, int.MaxValue)); 74return new Size(newWidth + 2, newHeight + 1);
System\ComponentModel\Design\DesignerActionPanel.SeparatorLine.cs (1)
24public override Size LayoutControls(int top, int width, bool measureOnly) => new(MinimumWidth, 1);
System\ComponentModel\Design\DesignerActionPanel.TextBoxPropertyLine.cs (6)
83return LineLeftMargin + _label.GetPreferredSize(new Size(int.MaxValue, int.MaxValue)).Width + TextBoxLineCenterMargin; 94int textBoxPreferredHeight = _textBox.GetPreferredSize(new Size(int.MaxValue, int.MaxValue)).Height; 107_editRegionSize = new Size(EditInputWidth + textBoxWidthBonus, textBoxPreferredHeight + TextBoxLineInnerPadding * 2); 110int labelPreferredWidth = _label.GetPreferredSize(new Size(int.MaxValue, int.MaxValue)).Width; 111_label.Size = new Size(labelPreferredWidth, height); 119return new Size(width, height);
System\ComponentModel\Design\DesignerActionPanel.TextLine.cs (2)
40Size labelSize = _label.GetPreferredSize(new Size(int.MaxValue, int.MaxValue)); 47return labelSize + new Size(LineLeftMargin + LineRightMargin, LineVerticalPadding);
System\ComponentModel\Design\DesignerActionUI.cs (1)
616if ((new Rectangle(glyphCoord, new Size(currentGlyph.Bounds.Width, currentGlyph.Bounds.Height))).Contains(point))
System\ComponentModel\Design\DesignerActionUI.DesignerActionToolStripDropDown.cs (1)
35Size panelSize = CurrentPanel.GetPreferredSize(new Size(150, int.MaxValue));
System\ComponentModel\Design\MultilineStringEditor.MultilineStringEditorUI.cs (4)
173ClientSize = new Size(ClientSize.Width + requestedDelta, MinimumSize.Height); 190return new Size(rect.Width + CaretPadding, rect.Height); 240_minimumSize = new Size( 366_watermarkSize = new Size((int)Math.Ceiling(size.Width), (int)Math.Ceiling(size.Height));
System\Drawing\Design\ColorEditor.ColorPalette.cs (1)
72Size = new Size(
System\Drawing\Design\ColorEditor.ColorUI.cs (1)
89Size = new Size(size.Width + 2 * CMARGIN, size.Height + 2 * CMARGIN + rectItemSize.Height);
System\Drawing\Design\ContentAlignmentEditor.ContentUI.cs (10)
221Size = new Size(pixel_125, pixel_89); 223_topLeft.Size = new Size(pixel_24, pixel_25); 226_topCenter.Size = new Size(pixel_59, pixel_25); 229_topRight.Size = new Size(pixel_24, pixel_25); 232_middleLeft.Size = new Size(pixel_24, pixel_25); 235_middleCenter.Size = new Size(pixel_59, pixel_25); 238_middleRight.Size = new Size(pixel_24, pixel_25); 241_bottomLeft.Size = new Size(pixel_24, pixel_25); 244_bottomCenter.Size = new Size(pixel_59, pixel_25); 247_bottomRight.Size = new Size(pixel_24, pixel_25);
System\Drawing\Design\ToolboxItem.cs (1)
607itemBitmap = new Bitmap(itemBitmap, new Size(s_iconWidth, s_iconHeight));
System\Windows\Forms\Design\AnchorEditor.AnchorUI.cs (6)
87_container.Size = new Size(pixel_90, pixel_90); 91_control.Size = new Size(pixel_30, pixel_30); 95_right.Size = new Size(pixel_30 - XBORDER, pixel_10); 102_left.Size = new Size(pixel_30 - XBORDER, pixel_10); 109_top.Size = new Size(pixel_10, pixel_30 - YBORDER); 116_bottom.Size = new Size(pixel_10, pixel_30 - YBORDER);
System\Windows\Forms\Design\Behavior\ContainerSelectorBehavior.cs (1)
179Size delta = new(Math.Abs(mouseLoc.X - InitialDragPoint.X), Math.Abs(mouseLoc.Y - InitialDragPoint.Y));
System\Windows\Forms\Design\Behavior\DesignerActionGlyph.cs (2)
102ScaleHelper.ScaleToDpi(new Size(IconSize, IconSize), ScaleHelper.InitialSystemDpi)); 107ScaleHelper.ScaleToDpi(new Size(IconSize, IconSize), ScaleHelper.InitialSystemDpi));
System\Windows\Forms\Design\ComponentTray.cs (1)
1706return new Size(8, 8);
System\Windows\Forms\Design\ControlCommandSet.cs (2)
641primaryControlsize += new Size(snappedOffset.X, snappedOffset.Y); 786size += new Size(moveOffsetX, offsetY);
System\Windows\Forms\Design\DataGridViewCellStyleBuilder.cs (2)
47_sampleDataGridViewSelected.Size = new Drawing.Size(100, Font.Height + 9); 48_sampleDataGridView.Size = new Drawing.Size(100, Font.Height + 9);
System\Windows\Forms\Design\DesignBindingPicker.cs (1)
455Size = new Size(
System\Windows\Forms\Design\DesignerOptions.cs (1)
16private Size _gridSize = new(8, 8);
System\Windows\Forms\Design\DesignerToolStripControlHost.cs (1)
32get => new(92, 22);
System\Windows\Forms\Design\DesignerUtils.cs (3)
343AdornmentType.GrabHandle => new Size(s_handleSize, s_handleSize), 344AdornmentType.ContainerSelector or AdornmentType.Maximum => new Size(s_containerGrabHandleSize, s_containerGrabHandleSize), 345_ => new Size(0, 0),
System\Windows\Forms\Design\DockEditor.DockUI.cs (3)
191_none.Size = ScaleHelper.ScaleToDpi(new Size(LogicalNoneWidth, LogicalNoneHeight), dpi); 195_container.Size = ScaleHelper.ScaleToDpi(new Size(LogicalContainerSize, LogicalContainerSize), dpi); 197Size scaledButtonSize = ScaleHelper.ScaleToDpi(new Size(LogicalButtonSize, LogicalButtonSize), dpi);
System\Windows\Forms\Design\FormatControl.cs (5)
351thirdRowLabel.MaximumSize = new Drawing.Size(tableLayoutPanel1.Width, 0); 360tableLayoutPanel1.MinimumSize = new Drawing.Size(tableLayoutPanel1.Width, tableLayoutPanel1.Height); 384nullValueLabel.MinimumSize = new Drawing.Size(minWidth, minHeight); 385secondRowLabel.MinimumSize = new Drawing.Size(minWidth, minHeight); 409explanationLabel.Size = new Drawing.Size(formatGroupBox.Width - 10, 30);
System\Windows\Forms\Design\FormatControl.Designer.cs (4)
93sampleGroupBox.MinimumSize = new System.Drawing.Size(250, 38); 117secondRowLabel.MinimumSize = new System.Drawing.Size(81, 14); 123nullValueLabel.MinimumSize = new System.Drawing.Size(81, 14); 176MinimumSize = new System.Drawing.Size(390, 237);
System\Windows\Forms\Design\FormatStringDialog.cs (4)
177_formatControl1.Size = new Drawing.Size(376, 268); 184_cancelButton.Size = new Drawing.Size(87, 23); 194_okButton.Size = new Drawing.Size(87, 23); 204ClientSize = new Drawing.Size(396, 295);
System\Windows\Forms\Design\FormDocumentDesigner.cs (6)
66return new Size((int)Math.Round(real.Width), (int)Math.Round(real.Height)); 102return new Size(-1, -1); 106Size size = new(-1, -1); 269Size newVar = new((int)Math.Round(newVarF.Width), (int)Math.Round(newVarF.Height)); 443ClientSize = new Size(clientWidth, clientHeight); 483properties["ClientSize"] = TypeDescriptor.CreateProperty(typeof(FormDocumentDesigner), prop, new DefaultValueAttribute(new Size(-1, -1)));
System\Windows\Forms\Design\MaskDesignerDialog.cs (2)
190_btnOK.MinimumSize = new Drawing.Size(75, 23); 199_btnCancel.MinimumSize = new Drawing.Size(75, 23);
System\Windows\Forms\Design\MaskedTextBoxTextEditorDropDown.cs (1)
52Size = new Drawing.Size(100, 52);
System\Windows\Forms\Design\OleDragDropHandler.CfCodeToolboxItem.cs (1)
109defaultValues["Offset"] = new Size(childControl.Bounds.X - bounds.X, childControl.Bounds.Y - bounds.Y);
System\Windows\Forms\Design\OleDragDropHandler.cs (1)
193defaultValues["Size"] = new Size(width, height);
System\Windows\Forms\Design\ParentControlDesigner.cs (6)
218_gridSize = new Size(8, 8); 436Size offset = new(0, 0); 567prop?.SetValue(newChild, new Size(bounds.Width, bounds.Height)); 984return (new Size(75, 23)); 1301defaultValue = new Size(8, 8); 1855Size minControlSize = new(DesignerUtils.MinDragSize.Width * 2, DesignerUtils.MinDragSize.Height * 2);
System\Windows\Forms\Design\SelectionUIHandler.cs (2)
287minSize = new Size(1, 1); 454Size size = new(Math.Max(MinControlWidth, newBounds.Width), Math.Max(MinControlHeight, newBounds.Height));
System\Windows\Forms\Design\SelectionUIService.cs (3)
1193AdornmentType.GrabHandle => new Size(SelectionUIItem.GRABHANDLE_WIDTH, SelectionUIItem.GRABHANDLE_HEIGHT), 1194AdornmentType.ContainerSelector or AdornmentType.Maximum => new Size(ContainerSelectionUIItem.CONTAINER_WIDTH, ContainerSelectionUIItem.CONTAINER_HEIGHT), 1195_ => new Size(0, 0),
System\Windows\Forms\Design\ShortcutKeysEditor.ShortcutKeysUI.cs (1)
232Size = new Size(Size.Width + _resetButton.Size.Width - resetButtonSize.Width, Size.Height);
System\Windows\Forms\Design\StyleEditorForm.cs (5)
212_addButton.MinimumSize = new Size(75, 23); 220_removeButton.MinimumSize = new Size(75, 23); 228_insertButton.MinimumSize = new Size(75, 23); 247_okButton.MinimumSize = new Size(75, 23); 256_cancelButton.MinimumSize = new Size(75, 23);
System\Windows\Forms\Design\ToolStripCollectionEditor.ToolStripItemEditorForm.cs (1)
708imageBounds.Size = new(s_iconWidth, s_iconHeight);
System\Windows\Forms\Design\ToolStripEditorManager.cs (1)
142private void UpdateSize() => Size = new Size(_wrappedEditor.Size.Width, _wrappedEditor.Size.Height);
System\Windows\Forms\Design\ToolStripItemBehavior.cs (1)
960Size dragSize = new(1, 1);
System\Windows\Forms\Design\ToolStripTemplateNode.cs (2)
1635return new Size(Width, s_toolStripTempateHeight); 1639return new Size(Width, s_templateHeight);
System\Windows\Forms\Design\VsPropertyGrid.cs (1)
10private static readonly Size s_defaultIconSize = new(16, 16);
System.Windows.Forms.Primitives (5)
System\Windows\Forms\Internals\ScaleHelper.cs (4)
303: new(ScaleToDpi(logicalSize.Width, dpi), ScaleToDpi(logicalSize.Height, dpi)); 305internal static Size SystemIconSize => new( 310? new( 313: new(16, 16);
System\Windows\Forms\Padding.cs (1)
128public readonly Size Size => new(Horizontal, Vertical);
WindowsFormsIntegration (6)
System\Windows\Integration\Convert.cs (2)
260return new SD.Size(Convert.ToBoundedInt(size.Width), 268return new SD.Size(Convert.ToBoundedInt(size.Width),
System\Windows\Integration\ElementHost.cs (2)
130return new SD.Size(200, 100); 317MaximumSize = HostUtils.ConvertUnboundedToZero(new SD.Size(maxWidth, maxHeight));
System\Windows\Integration\HostUtils.cs (2)
71return new SD.Size( 78return new SD.Size(