141 writes to Height
System.Windows.Forms (127)
System\Windows\Forms\ActiveX\AxHost.cs (2)
1084
sz.
Height
= (int)pcont.Y;
1097
sz.
Height
= phm.Y;
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (1)
702
pSizel->
Height
= pt.Y;
System\Windows\Forms\Control.cs (1)
9841
size.
Height
= (int)Math.Round(size.Height * y);
System\Windows\Forms\Controls\Buttons\Button.cs (1)
102
requiredSize.
Height
+= 9;
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (1)
952
proposedSize.
Height
= 0;
System\Windows\Forms\Controls\Buttons\CheckBox.cs (1)
288
size.
Height
= Math.Max(size.Height + 5, _flatSystemStyleMinimumHeight);
System\Windows\Forms\Controls\Buttons\RadioButton.cs (1)
259
size.
Height
= ScaleHelper.IsScalingRequirementMet
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (2)
400
preferredSize.
Height
+= borderAndPaddingHeights + marginHeights + 2 * DATAGRIDVIEWBUTTONCELL_verticalTextMargin;
404
preferredSize.
Height
= Math.Max(preferredSize.Height, borderAndPaddingHeights + IconMarginHeight * 2 + s_iconsHeight);
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (8)
664
checkBoxSize.
Height
-= 3;
668
checkBoxSize.
Height
-= 2;
736
preferredSize.
Height
+= borderWidths.Y;
749
preferredSize.
Height
= Math.Max(preferredSize.Height,
1171
checkBoxSize.
Height
-= 3;
1175
checkBoxSize.
Height
-= 2;
1186
checkBoxSize.
Height
-= 3;
1191
checkBoxSize.
Height
-= 2;
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (6)
622
preferredSize.
Height
= Math.Max(preferredSize.Height, glyphSize.Height);
623
preferredSize.
Height
= Math.Max(preferredSize.Height, 1);
664
preferredSize.
Height
= Math.Max(preferredSize.Height, s_sortGlyphHeight);
668
preferredSize.
Height
= Math.Max(preferredSize.Height, 1);
685
preferredSize.
Height
+= 2 * VerticalMargin + borderAndPaddingHeights;
698
preferredSize.
Height
+= rectThemeMargins.Y + rectThemeMargins.Height;
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (5)
1192
preferredSize.
Height
= 0;
1211
preferredSize.
Height
+= 6;
1215
preferredSize.
Height
+= 8;
1218
preferredSize.
Height
+= borderAndPaddingHeights;
1222
preferredSize.
Height
= Math.Max(preferredSize.Height, borderAndPaddingHeights + IconMarginHeight * 2 + s_iconsHeight);
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (3)
512
preferredSize.
Height
= 0;
528
preferredSize.
Height
+= borderAndPaddingHeights;
532
preferredSize.
Height
= Math.Max(preferredSize.Height, borderAndPaddingHeights + IconMarginHeight * 2 + s_iconsHeight);
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (3)
654
preferredSize.
Height
+= VerticalTextMarginTop + VerticalTextMarginBottom + borderAndPaddingHeights;
657
preferredSize.
Height
+= VerticalTextMarginBottom;
663
preferredSize.
Height
= Math.Max(preferredSize.Height, borderAndPaddingHeights + IconMarginHeight * 2 + s_iconsHeight);
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (2)
497
preferredSize.
Height
+= verticalTextMarginTop + DATAGRIDVIEWTEXTBOXCELL_verticalTextMarginBottom + borderAndPaddingHeights;
501
preferredSize.
Height
= Math.Max(preferredSize.Height, borderAndPaddingHeights + IconMarginHeight * 2 + s_iconsHeight);
System\Windows\Forms\Controls\DataGridView\DataGridViewUtilities.cs (4)
274
preferredSize.
Height
+= 2 * VerticalTextMargin;
293
preferredSize.
Height
= Math.Max(preferredSize.Height,
298
preferredSize.
Height
+= borderAndPaddingHeights;
338
sizeConstraint.
Height
= sizeCell.Height;
System\Windows\Forms\Controls\Labels\Label.cs (3)
1009
bordersAndPadding.
Height
+= 6; // taken from Everett.PreferredHeight
1014
bordersAndPadding.
Height
+= 3; // taken from Everett.PreferredHeight
1041
proposedSize.
Height
= 0;
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (5)
1212
_dimensions.
Height
= 1;
1217
_dimensions.
Height
= (nRows < 1) ? 1 : nRows;
1235
minSize.
Height
= (calendarHeight + InsertHeightSize) * _dimensions.Height - InsertHeightSize + todayHeight;
1249
minSize.
Height
+= _extraPadding;
1788
_dimensions.
Height
= y;
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (1)
2830
size.
Height
= Math.Max(0, yNew);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\HelpPane.cs (1)
152
size.
Height
= Math.Max(0, size.Height - 2 * _borderSize);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (2)
1864
size.
Height
= sizeWindow.Height;
1875
size.
Height
-= 2;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (3)
300
newSize.
Height
+= s_resizeBarSize;
625
size.
Height
+= (linkHeight + (DropDownHolderBorder * 2));
631
size.
Height
+= s_resizeBarSize;
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (1)
433
scrollBarPadding.
Height
+= SystemInformation.HorizontalScrollBarHeight;
System\Windows\Forms\Controls\TextBox\TextBox.cs (1)
407
scrollBarPadding.
Height
+= SystemInformation.GetHorizontalScrollBarHeightForDpi(_deviceDpi);
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (2)
832
bordersAndPadding.
Height
+= 2;
853
textSize.
Height
= Math.Max(textSize.Height, FontHeight);
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (1)
306
proposedSize.
Height
= int.MaxValue;
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (7)
2245
proposedSize.
Height
= int.MaxValue;
2274
maxSize.
Height
= Math.Max(0, defaultSize.Height);
2291
maxSize.
Height
= Math.Max(maxSize.Height, itemMargin.Vertical + prefItemSize.Height);
2349
maxSize.
Height
+= itemMargin.Vertical + preferredSize.Height;
2370
maxSize.
Height
+= overflowItemMargin.Vertical + overflowItem.Bounds.Height;
2374
maxSize.
Height
+= 2; // add Padding to the bottom if not Overflow.
2381
maxSize.
Height
+= gripMargin.Vertical + toolStrip.Grip.GripThickness;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownButton.ToolStripDropDownButtonInternalLayout.cs (1)
42
preferredSize.
Height
+= DropDownArrowRect.Height + _dropDownArrowPadding.Vertical;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (11)
299
menuItemTextSize.
Height
= Math.Max(menuItemTextSize.Height, shortcutTextSize.Height);
304
maxTextSize.
Height
= Math.Max(maxTextSize.Height, menuItemTextSize.Height);
314
maxImageSize.
Height
= Math.Max(maxImageSize.Height, imageSize.Height);
320
maxCheckSize.
Height
= Math.Max(checkedImageSize.Height, maxCheckSize.Height);
325
maxNonMenuItemSize.
Height
= Math.Max(item.Bounds.Height, maxNonMenuItemSize.Height);
330
_maxItemSize.
Height
= Math.Max(maxTextSize.Height + _textPadding.Vertical, Math.Max(maxCheckSize.Height + _checkPadding.Vertical, maxArrowSize.Height + _arrowPadding.Vertical));
335
_maxItemSize.
Height
= Math.Max(maxImageSize.Height + _imagePadding.Vertical, _maxItemSize.Height);
341
maxTextSize.
Height
= _maxItemSize.Height - _textPadding.Vertical;
342
maxImageSize.
Height
= _maxItemSize.Height - _imagePadding.Vertical;
343
maxCheckSize.
Height
= _maxItemSize.Height - _checkPadding.Vertical;
454
_maxItemSize.
Height
+= _maxItemSize.Height % 2;
System\Windows\Forms\Controls\ToolStrips\ToolStripGrip.cs (1)
98
preferredSize.
Height
= constrainingSize.Height;
System\Windows\Forms\Controls\ToolStrips\ToolStripOverflowButton.cs (1)
82
preferredSize.
Height
= Math.Min(constrainingSize.Height, s_maxSize);
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelCell.cs (3)
181
_maxSize.
Height
+= growBy;
278
constrainingSize.
Height
= ToolStripPanelRow.Bounds.Height;
280
preferredSize.
Height
= constrainingSize.Height;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.cs (1)
680
preferredSize.
Height
= DisplayRectangle.Height;
System\Windows\Forms\Controls\ToolStrips\ToolStripScrollButton.cs (1)
126
preferredSize.
Height
= (Label.Image is not null) ? Label.Image.Height + 4 : 0;
System\Windows\Forms\Controls\ToolStrips\ToolStripSeparator.cs (1)
277
constrainingSize.
Height
= SeparatorHeight;
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackLayout.cs (1)
334
itemSize.
Height
= Math.Max(_displayRectangle.Height - itemMargin.Vertical, 0);
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (3)
200
_webBrowserBaseChangingSize.
Height
= height;
1119
sz.
Height
= (int)pcont.Y;
1131
sz.
Height
= phm.Y;
System\Windows\Forms\Design\ComponentEditorForm.cs (1)
359
_maxSize.
Height
= pageSize.Height;
System\Windows\Forms\Dialogs\ThreadExceptionDialog.cs (2)
222
textSize.
Height
+= _scaledExceptionMessageVerticalPadding;
230
textSize.
Height
= _scaledMaxHeight;
System\Windows\Forms\Form.cs (5)
1225
minimumSize.
Height
= value.Height;
1342
maximumSize.
Height
= value.Height;
3037
correctClientSize.
Height
+= SystemInformation.HorizontalScrollBarHeight;
3067
correct.
Height
+= SystemInformation.HorizontalScrollBarHeight;
4552
desiredSize.
Height
= (int)(Size.Height * autoScaleFactor.Height);
System\Windows\Forms\Layout\DefaultLayout.cs (8)
44
proposedConstraints.
Height
= bounds.Height;
500
neededSize.
Height
= 0;
559
newSize.
Height
= remainingSize.Height;
563
newSize.
Height
= Math.Max(newSize.Height, remainingSize.Height);
678
preferredSizeForAnchoring.
Height
-= containerPadding.Top;
1137
prefSize.
Height
= Math.Max(prefSize.Height, elementSpace.Bottom);
1168
prefSize.
Height
= Math.Max(prefSize.Height, anchorInfo is null ? bounds.Bottom : bounds.Bottom + anchorInfo.Bottom);
1172
prefSize.
Height
= anchorDest.Height < 0
System\Windows\Forms\Layout\FlowLayout.cs (4)
94
layoutSize.
Height
+= rowSize.Height;
208
prefSize.
Height
= 0;
214
prefSize.
Height
= elementProxy.MinimumSize.Height;
253
rowSize.
Height
= Math.Max(rowSize.Height, requiredSize.Height);
System\Windows\Forms\Layout\LayoutUtils.cs (7)
52
largestSize.
Height
= Math.Max(largestSize.Height, textSize.Height);
133
size.
Height
= int.MaxValue;
366
stretchedSize.
Height
= withinThis.Height;
400
currentSize.
Height
+= contentSize.Height;
405
currentSize.
Height
= Math.Max(currentSize.Height, contentSize.Height);
456
(size.
Height
, size.Width) = (size.Width, size.Height);
579
currentSize.
Height
-= contentSize.Height;
System\Windows\Forms\Layout\TableLayout.cs (4)
109
containerSize.
Height
= Math.Max(containerSize.Height, 1);
166
containerSize.
Height
= Math.Max(containerSize.Height, 1);
179
proposedConstraints.
Height
= Math.Max(proposedConstraints.Height, 1);
647
preferredSize.
Height
= InflateRows(containerInfo, proposedConstraints, expandLastElementWidth, measureOnly);
System\Windows\Forms\Rendering\TextExtensions.cs (1)
241
proposedSize.
Height
= 1;
System\Windows\Forms\Scrolling\ScrollableControl.cs (2)
343
_scrollMargin.
Height
+= Padding.Bottom;
365
_scrollMargin.
Height
+= current.Size.Height;
System\Windows\Forms\ToolTip\ToolTip.cs (1)
2076
currentTooltipSize.
Height
= rect.Height;
System.Windows.Forms.Design (9)
System\Windows\Forms\Design\CommandSet.cs (3)
2348
itemSize.
Height
= primarySize.Height;
2431
size.
Height
= ((size.Height + (grid.Height / 2)) / grid.Height) * grid.Height;
3356
gridSize.
Height
= 8;
System\Windows\Forms\Design\ComponentTray.cs (1)
2192
minDrag.
Height
= Math.Max(minDrag.Height, minDblClick.Height);
System\Windows\Forms\Design\ControlDesigner.cs (1)
1381
minDrag.
Height
= Math.Max(minDrag.Height, minDblClick.Height);
System\Windows\Forms\Design\DesignerOptions.cs (2)
37
value.
Height
= MinGridSize;
47
value.
Height
= MaxGridSize;
System\Windows\Forms\Design\DesignerUtils.cs (1)
147
s_minDragSize.
Height
= Math.Max(minDrag.Height, minDblClick.Height);
System\Windows\Forms\Design\FormDocumentDesigner.cs (1)
116
size.
Height
+= SystemInformation.HorizontalScrollBarHeight;
System.Windows.Forms.Tests (2)
System\Windows\Forms\AccessibleObjects\MonthCalendar.CalendarAccessibleObjectTests.cs (2)
348
CalendarDimensions = new Size { Width = 2,
Height
= 2 }
390
CalendarDimensions = new Size { Width = 2,
Height
= 2 }
WindowsFormsIntegration (3)
System\Windows\Integration\HostUtils.cs (3)
45
if (size.Height == 0) { size.
Height
= int.MaxValue; }
53
if (size.Height == 0 || size.Height == 1) { size.
Height
= int.MaxValue; }
65
size.
Height
= 0;
958 references to Height
PresentationFramework-SystemDrawing (2)
SystemDrawingExtension.cs (2)
83
height = bitmapData.Size.
Height
;
100
int bitmapheight = metafile.Size.
Height
;
PresentationUI (3)
MS\Internal\Documents\RMPublishingDialog.cs (2)
924
buttonAddUser.Size.
Height
,
925
buttonAddUser.Size.
Height
);
MS\Internal\Documents\RMPublishingDialog.RightsTable.cs (1)
1036
cellBounds.Y + (cellBounds.Height - boxSize.
Height
) / 2);
System.ComponentModel.TypeConverter (2)
System\Drawing\SizeConverter.cs (2)
76
intConverter.ConvertToString(context, culture, size.
Height
)
85
return new InstanceDescriptor(ctor, new object[] { size.Width, size.
Height
});
System.Drawing.Common.Tests (34)
mono\System.Drawing.Imaging\BmpCodecTests.cs (5)
58
Assert.Equal(183, bmp.Size.
Height
);
124
Assert.Equal(183, bmp.Size.
Height
);
190
Assert.Equal(183, bmp.Size.
Height
);
376
Assert.Equal(183, bmp.Size.
Height
);
507
Assert.Equal(60, bmp.Size.
Height
);
mono\System.Drawing.Imaging\GifCodecTests.cs (1)
55
Assert.Equal(100, bmp.Size.
Height
);
mono\System.Drawing.Imaging\IconCodecTests.cs (6)
92
Assert.Equal(16, bmp.Size.
Height
);
240
Assert.Equal(32, bmp.Size.
Height
);
445
Assert.Equal(48, bmp.Size.
Height
);
667
Assert.Equal(64, bmp.Size.
Height
);
925
Assert.Equal(96, bmp.Size.
Height
);
1859
Assert.Equal(16, bmp.Size.
Height
);
mono\System.Drawing.Imaging\JpegCodecTests.cs (2)
57
Assert.Equal(100, bmp.Size.
Height
);
184
Assert.Equal(100, bmp.Size.
Height
);
mono\System.Drawing.Imaging\PngCodecTests.cs (3)
63
Assert.Equal(384, bmp.Size.
Height
);
265
Assert.Equal(100, bmp.Size.
Height
);
387
Assert.Equal(384, bmp.Size.
Height
);
mono\System.Drawing.Imaging\TiffCodecTests.cs (1)
57
Assert.Equal(183, bmp.Size.
Height
);
System\Drawing\BufferedGraphicsContextTests.cs (6)
35
using BufferedGraphics bufferedGraphics = context.Allocate(graphics, new Rectangle(0, 0, context.MaximumBuffer.Width - 1, context.MaximumBuffer.
Height
- 1));
47
using BufferedGraphics bufferedGraphics = context.Allocate(graphics, new Rectangle(0, 0, context.MaximumBuffer.Width + 1, context.MaximumBuffer.
Height
+ 1));
84
using (BufferedGraphics bufferedGraphics = context.Allocate(hdc, new Rectangle(0, 0, context.MaximumBuffer.Width - 1, context.MaximumBuffer.
Height
- 1)))
106
using (BufferedGraphics bufferedGraphics = context.Allocate(hdc, new Rectangle(0, 0, context.MaximumBuffer.Width + 1, context.MaximumBuffer.
Height
+ 1)))
150
Rectangle largeRectangle = new(0, 0, context.MaximumBuffer.Width + 1, context.MaximumBuffer.
Height
+ 1);
165
Rectangle largeRectangle = new(0, 0, context.MaximumBuffer.Width + 1, context.MaximumBuffer.
Height
+ 1);
System\Drawing\BufferedGraphicsTests.cs (1)
29
BufferedGraphics graphics = context.Allocate(targetGraphics, new Rectangle(0, 0, context.MaximumBuffer.Width + 1, context.MaximumBuffer.
Height
+ 1));
System\Drawing\IconTests.cs (9)
70
using Icon icon = new(Helpers.GetTestBitmapPath(fileName), size.Width, size.
Height
);
72
Assert.Equal(expectedSize.
Height
, icon.Height);
82
Assert.Equal(expectedSize.
Height
, icon.Height);
125
using Icon icon = new(stream, size.Width, size.
Height
);
127
Assert.Equal(expectedSize.
Height
, icon.Height);
138
Assert.Equal(expectedSize.
Height
, icon.Height);
223
using Icon icon = new(sourceIcon, size.Width, size.
Height
);
225
Assert.Equal(expectedSize.
Height
, icon.Height);
237
Assert.Equal(expectedSize.
Height
, icon.Height);
System.Drawing.Primitives (17)
System\Drawing\Point.cs (3)
40
y = sz.
Height
;
113
public static Point Add(Point pt, Size sz) => new Point(unchecked(pt.X + sz.Width), unchecked(pt.Y + sz.
Height
));
118
public static Point Subtract(Point pt, Size sz) => new Point(unchecked(pt.X - sz.Width), unchecked(pt.Y - sz.
Height
));
System\Drawing\PointF.cs (2)
120
public static PointF Add(PointF pt, Size sz) => new PointF(pt.X + sz.Width, pt.Y + sz.
Height
);
125
public static PointF Subtract(PointF pt, Size sz) => new PointF(pt.X - sz.Width, pt.Y - sz.
Height
);
System\Drawing\Rectangle.cs (3)
44
height = size.
Height
;
78
Height = value.
Height
;
259
public void Inflate(Size size) => Inflate(size.Width, size.
Height
);
System\Drawing\Size.cs (9)
47
public static implicit operator SizeF(Size p) => new SizeF(p.Width, p.
Height
);
111
public static bool operator ==(Size sz1, Size sz2) => sz1.Width == sz2.Width && sz1.
Height
== sz2.
Height
;
121
public static explicit operator Point(Size size) => new Point(size.Width, size.
Height
);
151
new Size(unchecked(sz1.Width + sz2.Width), unchecked(sz1.
Height
+ sz2.
Height
));
163
new Size(unchecked(sz1.Width - sz2.Width), unchecked(sz1.
Height
- sz2.
Height
));
187
public override readonly int GetHashCode() => HashCode.Combine(Width,
Height
);
System.Private.Windows.Core (2)
System\Private\Windows\Core\BinaryFormat\BinaryFormatWriter.cs (1)
189
value.
Height
).Write(writer);
Windows\Win32\Foundation\RECT.cs (1)
13
bottom = size.
Height
;
System.Private.Windows.GdiPlus (1)
System\Drawing\IIconExtensions.cs (1)
25
size.
Height
,
System.Windows.Forms (527)
System\Windows\Forms\ActiveX\AxHost.cs (10)
1076
Point phm = new(sz.Width, sz.
Height
);
1090
PointF pcont = new(sz.Width, sz.
Height
);
1189
height = adjustedSize.
Height
;
1219
height = p.
Height
;
1416
b.Height = p.
Height
;
3257
if (setExtent.Width < ocxExtent.Width || setExtent.
Height
< ocxExtent.
Height
)
3259
Bounds = new Rectangle(location.X, location.Y, ocxExtent.Width, ocxExtent.
Height
);
3263
Size newSize = SetExtent(setExtent.Width, setExtent.
Height
);
3266
Bounds = new Rectangle(location.X, location.Y, newSize.Width, newSize.
Height
);
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (6)
489
PInvoke.SetWindowExtEx(hdcDraw, sWindowExt.Width, sWindowExt.
Height
, lpsz: null);
491
PInvoke.SetViewportExtEx(hdcDraw, sViewportExt.Width, sViewportExt.
Height
, lpsz: null);
700
Point pt = PixelToHiMetric(size.Width, size.
Height
);
1692
Size size = new(HiMetricToPixel(pSizel->Width, pSizel->
Height
));
1703
Size adjusted = new(size.Width, size.
Height
);
1705
bounds.Height = adjusted.
Height
;
System\Windows\Forms\Control.cs (7)
359
_height = defaultSize.
Height
;
1177
set => SetClientSizeCore(value.Width, value.
Height
);
3014
set => SetBounds(_x, _y, value.Width, value.
Height
, BoundsSpecified.Size);
5185
return ApplyBoundsConstraints(0, 0, proposedSize.Width, proposedSize.
Height
).Size;
9786
SetBoundsCore(rawScaledBounds.X, rawScaledBounds.Y, scaledSize.Width, scaledSize.
Height
, BoundsSpecified.All);
9841
size.Height = (int)Math.Round(size.
Height
* y);
10655
return _width != s.Width || _height != s.
Height
;
System\Windows\Forms\Control.MetafileDCWrapper.cs (2)
33
if (size.Width < 0 || size.
Height
< 0)
44
_hBitmap = PInvokeCore.CreateBitmap(size.Width, size.
Height
, (uint)planes, (uint)bitsPixel, lpBits: null);
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (2)
950
if (proposedSize.
Height
== 1)
1183
ShowToolTip = (ClientRectangle.Width < preferredSize.Width || ClientRectangle.Height < preferredSize.
Height
);
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.LayoutOptions.cs (9)
123
xCompose(vComposition, checkSize.
Height
, imageSize.
Height
, textSize.
Height
));
154
xDecompose(vComposition, checkSize.
Height
, imageSize.
Height
, proposedSize.
Height
));
499
size = new Size(size.Width + 1, size.
Height
+ 1);
604
if (textImageRelation == TextImageRelation.ImageAboveText && layout.ImageBounds.Size.
Height
!= 0)
671
screen.Graphics.MeasureString(Text, Font, new SizeF(proposedSize.Width, proposedSize.
Height
),
System\Windows\Forms\Controls\Buttons\CheckBox.cs (1)
288
size.Height = Math.Max(size.
Height
+ 5, _flatSystemStyleMinimumHeight);
System\Windows\Forms\Controls\Buttons\RadioButton.cs (2)
260
? Math.Max(size.
Height
+ 5, _flatSystemStyleMinimumHeight)
261
: size.
Height
+ 5;
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (9)
775
_prefHeightCache = (short)(textSize.
Height
+ SystemInformation.BorderSize.
Height
* 8 + Padding.Size.
Height
);
792
_prefHeightCache = (short)(textSize.
Height
* itemCount + SystemInformation.BorderSize.
Height
* 16 + Padding.Size.
Height
);
825
int dyEdit = textExtent.
Height
+ SystemInformation.Border3DSize.
Height
;
837
cyCombo = 2 * fixedFrameBoderSize.
Height
+ dyEdit;
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (13)
402
: dataGridViewCell.GetPreferredSize(rowIndex).
Height
;
479
: dataGridViewCell.GetPreferredSize(rowIndex).
Height
;
1762
: TopLeftHeaderCell.GetPreferredSize(-1).
Height
;
1772
: Math.Max(preferredHeight, Columns[columnIndex].HeaderCell.GetPreferredSize(-1).
Height
);
1827
: TopLeftHeaderCell.GetPreferredSize(-1).
Height
;
1837
: Math.Max(preferredHeight, Columns[columnIndexTmp].HeaderCell.GetPreferredSize(-1).
Height
);
5790
&& Math.Abs(dgvcme.Y - _lastMouseClickInfo.Y) <= hotDoubleClickZone.
Height
/ 2)
8983
int bordersAndPaddingHeight = 2 * (BorderWidth + Padding.Size.
Height
);
9016
int preferredHeight = Math.Min(minimumHeight + Rows.GetRowsHeight(DataGridViewElementStates.Visible), proposedConstraints.
Height
);
12704
|| Math.Abs(_ptMouseDownGridCoord.Y - ptGridCoord.Y) >= s_dragSize.
Height
)
18821
Invalidate(new Rectangle(new Point(-pt.X, ColumnHeadersHeight), new Size(-step, ClientSize.
Height
)));
18832
new Size(step, ClientSize.
Height
)));
18846
new Size(ClientSize.Width, ClientSize.
Height
- (pt.Y - rect.Bottom) - step)));
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (6)
324
constraintSize.
Height
- borderAndPaddingHeights - marginHeights - 2 * DATAGRIDVIEWBUTTONCELL_verticalTextMargin > 0)
331
constraintSize.
Height
- borderAndPaddingHeights - marginHeights - 2 * DATAGRIDVIEWBUTTONCELL_verticalTextMargin,
367
flags).
Height
);
404
preferredSize.Height = Math.Max(preferredSize.
Height
, borderAndPaddingHeights + IconMarginHeight * 2 + s_iconsHeight);
757
valBounds.Inflate(-SystemInformation.Border3DSize.Width, -SystemInformation.Border3DSize.
Height
);
885
valBounds.Height > 2 * SystemInformation.Border3DSize.
Height
+ 1)
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (13)
1683
if (constraintSize.Width < 0 || constraintSize.
Height
< 0)
1690
if (constraintSize.
Height
== 0)
1701
if (constraintSize.
Height
== 0)
2290
return GetPreferredSize(screen, dataGridViewCellStyle, rowIndex, new Size(width, 0)).
Height
;
2330
return size.
Height
;
2554
return requiredSize.
Height
;
2580
if (textOneLineSize.Width / textOneLineSize.
Height
<= maxRatio)
2586
float maxWidth = textOneLineSize.Width * textOneLineSize.Width / (float)textOneLineSize.
Height
/ maxRatio * 1.1F;
2592
if (textSize.Width / textSize.
Height
<= maxRatio || textSize.Width > (int)maxWidth)
2634
if (oneLineSize.
Height
>= maxHeight || (flags & TextFormatFlags.SingleLine) != 0)
2648
if (textSize.
Height
> maxHeight || textSize.Width > (int)maxWidth)
2659
Debug.Assert(textSize.
Height
<= maxHeight);
3957
return requiredHeight <= maxBounds.
Height
&& !widthTruncated;
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (15)
682
preferredSize = new Size(0, checkBoxSize.
Height
+ borderAndPaddingHeights + 2 * DATAGRIDVIEWCHECKBOXCELL_margin);
689
checkBoxSize.
Height
+ borderAndPaddingHeights + 2 * DATAGRIDVIEWCHECKBOXCELL_margin);
749
preferredSize.Height = Math.Max(preferredSize.
Height
,
1199
if (valBounds.Width >= checkBoxSize.Width && valBounds.Height >= checkBoxSize.
Height
&& (paint || computeContentBounds))
1220
checkBoxY = valBounds.Bottom - checkBoxSize.
Height
;
1224
checkBoxY = valBounds.Top + (valBounds.Height - checkBoxSize.
Height
) / 2;
1237
new Rectangle(checkBoxX, checkBoxY, checkBoxSize.Width, checkBoxSize.
Height
),
1241
resultBounds = new Rectangle(checkBoxX, checkBoxY, checkBoxSize.Width, checkBoxSize.
Height
);
1256
checkBoxSize.
Height
,
1266
checkBoxSize.
Height
,
1271
resultBounds = new Rectangle(checkBoxX, checkBoxY, checkBoxSize.Width, checkBoxSize.
Height
);
1278
Rectangle checkBounds = new(checkBoxX, checkBoxY, checkBoxSize.Width, checkBoxSize.
Height
);
1336
Rectangle fullSize = new(checkBoxX - 1, checkBoxY - 1, checkBoxSize.Width + 3, checkBoxSize.
Height
+ 3);
1384
Rectangle checkBounds = new(checkBoxX, checkBoxY, checkBoxSize.Width - 1, checkBoxSize.
Height
- 1);
1548
Debug.Assert(valBounds.Width < checkBoxSize.Width || valBounds.Height < checkBoxSize.
Height
, "the bounds are empty");
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (8)
521
Math.Max(1, constraintSize.
Height
- borderAndPaddingHeights - 2 * VerticalMargin),
537
if (constraintSize.
Height
- borderAndPaddingHeights - 2 * VerticalMargin > s_sortGlyphHeight &&
618
flags).
Height
);
622
preferredSize.Height = Math.Max(preferredSize.
Height
, glyphSize.
Height
);
623
preferredSize.Height = Math.Max(preferredSize.
Height
, 1);
664
preferredSize.Height = Math.Max(preferredSize.
Height
, s_sortGlyphHeight);
668
preferredSize.Height = Math.Max(preferredSize.
Height
, 1);
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (3)
538
size.
Height
- borderAndPaddingWidths.Y - borderAndPaddingWidths.Height);
543
dropHeight = Math.Min(GetDropDownButtonHeight(screen, cellStyle), adjustedSize.
Height
- 2);
1222
preferredSize.Height = Math.Max(preferredSize.
Height
, borderAndPaddingHeights + IconMarginHeight * 2 + s_iconsHeight);
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (3)
463
int imgHeightAllowed = constraintSize.
Height
- borderAndPaddingHeights;
475
int icoHeightAllowed = constraintSize.
Height
- borderAndPaddingHeights;
532
preferredSize.Height = Math.Max(preferredSize.
Height
, borderAndPaddingHeights + IconMarginHeight * 2 + s_iconsHeight);
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (3)
568
int maxHeight = constraintSize.
Height
- borderAndPaddingHeights - VerticalTextMarginTop - VerticalTextMarginBottom;
626
MeasureTextSize(graphics, formattedString, cellStyle.Font!, flags).
Height
);
663
preferredSize.Height = Math.Max(preferredSize.
Height
, borderAndPaddingHeights + IconMarginHeight * 2 + s_iconsHeight);
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (2)
1302
preferredRowThickness = Math.Max(preferredRowThickness, HeaderCell.GetPreferredSize(rowIndex).
Height
);
1320
preferredCellThickness = dataGridViewCell.GetPreferredSize(rowIndex).
Height
;
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (4)
214
preferredHeight = txtEditingControl.PreferredSize.
Height
;
425
Math.Max(1, constraintSize.
Height
- borderAndPaddingHeights - DATAGRIDVIEWTEXTBOXCELL_verticalTextMarginTopWithWrapping - DATAGRIDVIEWTEXTBOXCELL_verticalTextMarginBottom),
472
MeasureTextSize(graphics, formattedString, cellStyle.Font!, flags).
Height
);
501
preferredSize.Height = Math.Max(preferredSize.
Height
, borderAndPaddingHeights + IconMarginHeight * 2 + s_iconsHeight);
System\Windows\Forms\Controls\DataGridView\DataGridViewUtilities.cs (12)
168
int preferredWidth = 0, allowedHeight = constraintSize.
Height
- borderAndPaddingHeights;
241
minHeightContent = DataGridViewCell.MeasureTextSize(graphics, val, cellStyle.Font!, flags).
Height
;
293
preferredSize.Height = Math.Max(preferredSize.
Height
,
336
if (sizeConstraint.
Height
> sizeCell.
Height
)
338
sizeConstraint.Height = sizeCell.
Height
;
408
ptTextLocation.Y = cellBounds.Y + (cellBounds.Height - sizeText.
Height
) / 2;
413
ptTextLocation.Y = cellBounds.Y + (cellBounds.Height - sizeText.
Height
) / 2;
418
ptTextLocation.Y = cellBounds.Y + (cellBounds.Height - sizeText.
Height
) / 2;
423
ptTextLocation.Y = cellBounds.Bottom - sizeText.
Height
;
428
ptTextLocation.Y = cellBounds.Bottom - sizeText.
Height
;
433
ptTextLocation.Y = cellBounds.Bottom - sizeText.
Height
;
System\Windows\Forms\Controls\DateTimePicker\DateTimePicker.cs (1)
750
height += SystemInformation.BorderSize.
Height
* 4 + 3;
System\Windows\Forms\Controls\GroupBox\GroupBox.cs (1)
167
Math.Max(size.
Height
- _fontHeight - padding.Vertical, 0));
System\Windows\Forms\Controls\GroupBox\GroupBoxRenderer.cs (2)
189
textBounds.Height = measuredBounds.
Height
;
292
textBounds.Height = measuredBounds.
Height
;
System\Windows\Forms\Controls\ImageList\ImageList.cs (14)
162
if (value.
Height
<= 0 || value.
Height
> s_maxImageHeight)
164
throw new ArgumentOutOfRangeException(nameof(value), value, string.Format(SR.InvalidBoundArgument, "ImageSize.Height", value.
Height
, 1, s_maxImageHeight));
167
if (_imageSize.Width != value.Width || _imageSize.
Height
!= value.
Height
)
169
_imageSize = new Size(value.Width, value.
Height
);
328
if (size.
Height
!= _imageSize.
Height
)
516
public void Draw(Graphics g, int x, int y, int index) => Draw(g, x, y, _imageSize.Width, _imageSize.
Height
, index);
627
int offset = bmpData.Stride * _imageSize.
Height
* index;
631
result = new Bitmap(_imageSize.Width, _imageSize.
Height
, PixelFormat.Format32bppArgb);
632
targetData = result.LockBits(new Rectangle(0, 0, _imageSize.Width, _imageSize.
Height
), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
659
result = new Bitmap(_imageSize.Width, _imageSize.
Height
);
674
_imageSize.
Height
,
System\Windows\Forms\Controls\ImageList\ImageList.ImageCollection.cs (1)
399
if (value.Height != _owner.ImageSize.
Height
)
System\Windows\Forms\Controls\ImageList\ImageList.NativeImageList.cs (1)
38
himl = PInvoke.ImageList_Create(imageSize.Width, imageSize.
Height
, flags, InitialCapacity, GrowBy);
System\Windows\Forms\Controls\Labels\Label.cs (9)
642
public virtual int PreferredHeight => PreferredSize.
Height
;
891
yLoc = (r.Y + r.Height - 4) - pointImageSize.
Height
;
899
yLoc = r.Y + (r.Height - pointImageSize.
Height
) / 2;
902
return new Rectangle(xLoc, yLoc, pointImageSize.Width, pointImageSize.
Height
);
1039
if (proposedSize.
Height
== 1)
1083
new SizeF(0, proposedConstraints.
Height
) :
1084
new SizeF(proposedConstraints.Width, proposedConstraints.
Height
);
1273
_showToolTip = (clientRect.Width < preferredSize.Width || clientRect.Height < preferredSize.
Height
);
1395
height = preferredSize.
Height
;
System\Windows\Forms\Controls\Labels\LinkLabel.cs (4)
584
textSize.
Height
);
988
_showToolTip = clientRect.Width < preferredSize.Width || clientRect.Height < preferredSize.
Height
;
1075
if (requiredSize.
Height
< focusRectangle.Height)
1077
focusRectangle.Height = requiredSize.
Height
;
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (3)
604
Size = new Size(oldSize.Width + 1, oldSize.
Height
);
750
height += SystemInformation.BorderSize.
Height
* 4 + 3;
2327
Rectangle rect = new(0, 0, Size.Width - 1, Size.
Height
- 1);
System\Windows\Forms\Controls\ListView\DrawListViewItemEventArgs.cs (1)
106
resultBounds = new Rectangle(originalBounds.X, originalBounds.Y, textSize.Width, textSize.
Height
);
System\Windows\Forms\Controls\ListView\ListView.cs (2)
1670
if (value.
Height
<= 0 || value.Width <= 0)
6899
Rectangle rect = new(0, 0, Size.Width - 1, Size.
Height
- 1);
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (8)
282
SetCalendarDimensions(value.Width, value.
Height
);
1199
int todayHeight = textExtent.
Height
+ 4; // The constant 4 is from the comctl32 MonthCalendar source code
1200
int calendarHeight = minSize.
Height
;
1235
minSize.Height = (calendarHeight + InsertHeightSize) * _dimensions.
Height
- InsertHeightSize + todayHeight;
1279
return preferredSize.
Height
;
1673
if (height > max.
Height
)
1675
height = max.
Height
;
1785
if (_dimensions.Width != x || _dimensions.
Height
!= y)
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (2)
368
float ratio = Math.Min(ClientRectangle.Width / (float)imageSize.Width, ClientRectangle.Height / (float)imageSize.
Height
);
370
result.Height = (int)(imageSize.
Height
* ratio);
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (1)
4108
if (e.Y <= 1 || (size.
Height
- e.Y) <= 1)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CommandsPane.cs (1)
62
return new Rectangle(4, 4, size.Width - 8, size.
Height
- 8);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\HelpPane.cs (5)
79
int height = _titleLabel.Size.
Height
;
93
height += (size.
Height
* 2) + padding;
152
size.Height = Math.Max(0, size.
Height
- 2 * _borderSize);
158
Math.Min(_lineHeight, size.
Height
),
165
Math.Max(0, size.
Height
- _lineHeight - (ScaleHelper.IsScalingRequirementMet ? LogicalToDeviceUnits(1) : 1)),
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (17)
951
return new Bitmap(size.Width, size.
Height
);
1428
if (rectScreen.Y + rectScreen.Height < (size.
Height
+ location.Y + EditTextBox.Height))
1430
location.Y -= size.
Height
;
1454
_dropDownHolder.SetBounds(location.X, location.Y, size.Width, size.
Height
);
1864
size.Height = sizeWindow.
Height
;
1975
boundsScroll.Height = sizeWindow.
Height
- 2;
2006
rect.Height = Size.
Height
- rect.Y - 1;
2121
Invalidate(new Rectangle(left, 0, Size.Width - left, Size.
Height
));
2210
if ((Size.Width > doubleOffset) && (Size.
Height
> doubleOffset))
2213
ControlPaint.DrawFocusRectangle(g, new Rectangle(_offset2Units, _offset2Units, Size.Width - doubleOffset, Size.
Height
- doubleOffset));
2359
Rectangle clearRect = new(1, 1, Size.Width - 2, Size.
Height
- 2);
2597
Math.Abs(screenPoint.Y - _rowSelectPos.Y) < SystemInformation.DoubleClickSize.
Height
)
3347
if (yPosition < Size.
Height
)
3350
Rectangle clearRect = new(1, yPosition, Size.Width - 2, Size.
Height
- yPosition - 1);
3358
g.DrawRectangle(borderPen, 0, 0, sizeWindow.Width - 1, sizeWindow.
Height
- 1);
4208
int maxRows = (int)Math.Ceiling(((double)GetOurSize().
Height
) / (1 + RowHeight));
4423
_visibleRows = (int)Math.Ceiling(((double)size.
Height
) / (1 + RowHeight));
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (2)
435
newBounds.Height = Math.Max(s_minDropDownSize.
Height
, _dragBaseRect.Height + (dragPoint.Y - _dragStart.Y));
445
if ((_dragBaseRect.Height - delta) > s_minDropDownSize.
Height
)
System\Windows\Forms\Controls\Splitter\Splitter.cs (1)
676
_maxSize = clientSize.
Height
- dockHeight - _minExtra;
System\Windows\Forms\Controls\TabControl\TabControl.cs (3)
520
if (value.Width < 0 || value.
Height
< 0)
939
PInvokeCore.SendMessage(this, PInvoke.TCM_SETITEMSIZE, 0, PARAM.FromLowHigh(_itemSize.Width, _itemSize.
Height
));
1521
Size = new Size(size.Width + 1, size.
Height
);
System\Windows\Forms\Controls\TextBox\MaskedTextBox.cs (1)
2899
Rectangle rect = new(0, 0, Size.Width - 1, Size.
Height
- 1);
System\Windows\Forms\Controls\TextBox\TextBox.cs (1)
826
Rectangle rect = new(0, 0, Size.Width - 1, Size.
Height
- 1);
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (2)
803
height += SystemInformation.GetBorderSizeForDpi(_deviceDpi).
Height
* 4 + 3;
853
textSize.Height = Math.Max(textSize.
Height
, FontHeight);
System\Windows\Forms\Controls\ToolStrips\CachedItemHdcInfo.cs (3)
25
|| _cachedHDCSize.
Height
< bitmapSize.
Height
)
34
_cachedItemBitmap = PInvokeCore.CreateCompatibleBitmap(toolStripHDC, bitmapSize.Width, bitmapSize.
Height
);
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (7)
90
return new Padding(1, 3, 1, DefaultSize.
Height
);
212
int gripHeight = Math.Min(DefaultSize.
Height
, statusStripSize.
Height
);
216
return new Rectangle(0, statusStripSize.
Height
- gripHeight, GripWidth, gripHeight);
220
return new Rectangle(statusStripSize.Width - GripWidth, statusStripSize.
Height
- gripHeight, GripWidth, gripHeight);
304
if (proposedSize.
Height
== 1)
376
noMansLand.Y += ClientSize.
Height
+ 1;
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (8)
2243
if (proposedSize.
Height
== 1)
2274
maxSize.Height = Math.Max(0, defaultSize.
Height
);
2291
maxSize.Height = Math.Max(maxSize.
Height
, itemMargin.Vertical + prefItemSize.
Height
);
2349
maxSize.Height += itemMargin.Vertical + preferredSize.
Height
;
3556
item.Size.
Height
,
3574
item.Size.
Height
,
4508
cursorLocation.Y += Cursor.Size.
Height
- currentCursor.HotSpot.Y;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownButton.ToolStripDropDownButtonInternalLayout.cs (2)
77
int heightOfDropDown = s_dropDownArrowSize.
Height
+ _dropDownArrowPadding.Vertical;
82
_dropDownArrowRect = new Rectangle(0, options.Client.Bottom + _dropDownArrowPadding.Top, _ownerItem.Bounds.Width - 1, s_dropDownArrowSize.
Height
);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (24)
299
menuItemTextSize.Height = Math.Max(menuItemTextSize.
Height
, shortcutTextSize.
Height
);
304
maxTextSize.Height = Math.Max(maxTextSize.
Height
, menuItemTextSize.
Height
);
314
maxImageSize.Height = Math.Max(maxImageSize.
Height
, imageSize.
Height
);
320
maxCheckSize.Height = Math.Max(checkedImageSize.
Height
, maxCheckSize.
Height
);
325
maxNonMenuItemSize.Height = Math.Max(item.Bounds.Height, maxNonMenuItemSize.
Height
);
330
_maxItemSize.Height = Math.Max(maxTextSize.
Height
+ _textPadding.Vertical, Math.Max(maxCheckSize.
Height
+ _checkPadding.Vertical, maxArrowSize.
Height
+ _arrowPadding.Vertical));
335
_maxItemSize.Height = Math.Max(maxImageSize.
Height
+ _imagePadding.Vertical, _maxItemSize.
Height
);
339
maxArrowSize = new Size(_arrowSize, _maxItemSize.
Height
);
341
maxTextSize.Height = _maxItemSize.
Height
- _textPadding.Vertical;
342
maxImageSize.Height = _maxItemSize.
Height
- _imagePadding.Vertical;
343
maxCheckSize.Height = _maxItemSize.
Height
- _checkPadding.Vertical;
364
_checkRectangle = LayoutUtils.Align(maxCheckSize, new Rectangle(nextPoint.X, nextPoint.Y, maxCheckSize.Width, _maxItemSize.
Height
), ContentAlignment.MiddleCenter);
369
_imageRectangle = LayoutUtils.Align(maxImageSize, new Rectangle(nextPoint.X, nextPoint.Y, maxImageSize.Width, _maxItemSize.
Height
), ContentAlignment.MiddleCenter);
380
_checkRectangle = LayoutUtils.Align(maxCheckSize, new Rectangle(nextPoint.X, nextPoint.Y, checkAndImageMarginWidth, _maxItemSize.
Height
), ContentAlignment.MiddleCenter);
399
_checkRectangle = LayoutUtils.Align(LayoutUtils.UnionSizes(maxCheckSize, maxImageSize), new Rectangle(nextPoint.X, nextPoint.Y, checkAndImageMarginWidth - 1, _maxItemSize.
Height
), ContentAlignment.MiddleCenter);
454
_maxItemSize.Height += _maxItemSize.
Height
% 2;
803
Point downLocation = new(1, height - downSize.
Height
);
System\Windows\Forms\Controls\ToolStrips\ToolStripGrip.cs (4)
96
if (preferredSize.
Height
> constrainingSize.
Height
)
98
preferredSize.Height = constrainingSize.
Height
;
149
if (deltaY >= s_dragSize.
Height
)
System\Windows\Forms\Controls\ToolStrips\ToolStripOverflowButton.cs (1)
82
preferredSize.Height = Math.Min(constrainingSize.
Height
, s_maxSize);
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelCell.cs (9)
160
if (MaximumSize.
Height
>= Control.PreferredSize.
Height
)
169
if (MaximumSize.
Height
+ growBy >= Control.PreferredSize.
Height
)
171
int freed = Control.PreferredSize.
Height
- MaximumSize.
Height
;
179
if (MaximumSize.
Height
+ growBy < Control.PreferredSize.
Height
)
280
preferredSize.Height = constrainingSize.
Height
;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.cs (4)
561
if (cachedBounds.Height > minSize.
Height
)
563
spaceToFree -= (cachedBounds.Height - minSize.
Height
);
565
cachedBounds.Height = (spaceToFree < 0) ? minSize.
Height
+ -spaceToFree : minSize.
Height
;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.VerticalRowManager.cs (2)
94
return totalSize.
Height
< DisplayRectangle.Height;
444
int controlToDragWidth = (toolStripToDrag.AutoSize) ? toolStripToDrag.PreferredSize.
Height
: toolStripToDrag.Height;
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (4)
878
using Bitmap textBmp = new(textSize.Width, textSize.
Height
, PixelFormat.Format32bppPArgb);
1036
Bitmap disabledBitmap = new(size.Width, size.
Height
);
1040
new Rectangle(0, 0, size.Width, size.
Height
),
1041
0, 0, size.Width, size.
Height
,
System\Windows\Forms\Controls\ToolStrips\ToolStripSeparator.cs (1)
282
return new Size(SeparatorThickness, constrainingSize.
Height
);
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackLayout.cs (17)
137
int overflowWidth = (OverflowRequired) ? OverflowButtonSize.
Height
: 0;
139
currentHeight += itemSize.
Height
+ item.Margin.Vertical;
194
_noMansLand.Y += ToolStrip.ClientSize.
Height
+ 1;
301
alignedRightItems = (alignedRightItems == Rectangle.Empty) ? new Rectangle(x, y, itemSize.Width, itemSize.
Height
)
302
: Rectangle.Union(alignedRightItems, new Rectangle(x, y, itemSize.Width, itemSize.
Height
));
314
alignedLeftItems = (alignedLeftItems == Rectangle.Empty) ? new Rectangle(x, y, itemSize.Width, itemSize.
Height
)
315
: Rectangle.Union(alignedLeftItems, new Rectangle(x, y, itemSize.Width, itemSize.
Height
));
377
bool needOverflow = toolStrip.CanOverflow && ((OverflowRequired) || (OverflowSpace >= OverflowButtonSize.
Height
));
436
y = lastBottom - (itemMargin.Bottom + itemSize.
Height
);
438
alignedRightItems = (alignedRightItems == Rectangle.Empty) ? new Rectangle(x, y, itemSize.Width, itemSize.
Height
)
439
: Rectangle.Union(alignedRightItems, new Rectangle(x, y, itemSize.Width, itemSize.
Height
));
445
lastTop = y + itemSize.
Height
+ itemMargin.Bottom;
446
alignedLeftItems = (alignedLeftItems == Rectangle.Empty) ? new Rectangle(x, y, itemSize.Width, itemSize.
Height
)
447
: Rectangle.Union(alignedLeftItems, new Rectangle(x, y, itemSize.Width, itemSize.
Height
));
591
freedSpace += (horizontal) ? itemSize.Width + itemMargin.Horizontal : itemSize.
Height
+ itemMargin.Vertical;
600
spaceNeeded += (horizontal) ? OverflowButtonSize.Width : OverflowButtonSize.
Height
;
604
OverflowSpace += (horizontal) ? itemSize.Width + itemMargin.Horizontal : itemSize.
Height
+ itemMargin.Vertical;
System\Windows\Forms\Controls\TrackBar\TrackBar.cs (2)
786
int maxTickCount = (Orientation == Orientation.Horizontal ? Size.Width : Size.
Height
) / 2;
1146
int size = Orientation == Orientation.Horizontal ? Size.Width : Size.
Height
;
System\Windows\Forms\Controls\TreeView\TreeNode.cs (1)
632
visible = (rc.bottom > 0 && rc.right > 0 && rc.top < size.
Height
&& rc.left < size.Width);
System\Windows\Forms\Controls\TreeView\TreeView.cs (1)
3151
Rectangle rect = new(0, 0, Size.Width - 1, Size.
Height
- 1);
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (1)
344
height += SystemInformation.BorderSize.
Height
* 4 + 3;
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.cs (3)
59
int half_height = Size.
Height
/ 2;
259
int half_height = ClientSize.
Height
/ 2;
318
if (half_height != (ClientSize.
Height
+ 1) / 2)
System\Windows\Forms\Controls\WebBrowser\HtmlWindow.cs (2)
201
ResizeTo(value.Width, value.
Height
);
392
htmlWindow.Value->resizeTo(size.Width, size.
Height
).ThrowOnFailure();
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (4)
788
extent = SetExtent(extent.Width, extent.
Height
);
791
Bounds = new Rectangle(location.X, location.Y, extent.Width, extent.
Height
);
1112
Point phm = new(sz.Width, sz.
Height
);
1125
PointF pcont = new(sz.Width, sz.
Height
);
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.WebBrowserBaseNativeWindow.cs (1)
53
wp->cy = s.
Height
;
System\Windows\Forms\Design\ComponentEditorForm.cs (4)
236
_maxSize.Width, _maxSize.
Height
);
357
if (pageSize.
Height
> _maxSize.
Height
)
359
_maxSize.Height = pageSize.
Height
;
System\Windows\Forms\Design\ComponentEditorForm.PageSelector.cs (2)
128
rc2.top = rc.top + (((rc.bottom - rc.top) - size.
Height
) >> 1);
129
rc2.bottom = rc2.top + size.
Height
;
System\Windows\Forms\Dialogs\ThreadExceptionDialog.cs (4)
228
if (textSize.
Height
> _scaledMaxHeight)
234
int buttonTop = Math.Max(textSize.
Height
, _scaledMaxTextHeight) + _scaledPaddingHeight;
265
_scaledMessageTopPadding + (_scaledMaxTextHeight - Math.Min(textSize.
Height
, _scaledMaxTextHeight)) / 2,
266
textSize.Width, textSize.
Height
);
System\Windows\Forms\ErrorProvider\ErrorProvider.ControlItem.cs (3)
233
y = _control.Top + (_control.Height - size.
Height
) / 2;
237
y = _control.Bottom - size.
Height
;
241
return new Rectangle(x, y, size.Width, size.
Height
);
System\Windows\Forms\ErrorProvider\ErrorProvider.IconRegion.cs (3)
54
using BufferScope<byte> bits = new(widthInBytes * size.
Height
);
59
for (int y = 0; y < size.
Height
; y++)
72
_region.Intersect(new Rectangle(0, 0, size.Width, size.
Height
));
System\Windows\Forms\Form.cs (44)
1198
if (value.Width < 0 || value.
Height
< 0)
1223
if (minimumSize.
Height
> value.
Height
)
1225
minimumSize.Height = value.
Height
;
1241
if (!value.IsEmpty && (size.Width > value.Width || size.
Height
> value.
Height
))
1243
Size = new Size(Math.Min(size.Width, value.Width), Math.Min(size.
Height
, value.
Height
));
1311
if (value.Width < 0 || value.
Height
< 0)
1340
if (maximumSize.
Height
< value.
Height
)
1342
maximumSize.Height = value.
Height
;
1358
if (size.Width < value.Width || size.
Height
< value.
Height
)
1360
Size = new Size(Math.Max(size.Width, value.Width), Math.Max(size.
Height
, value.
Height
));
1373
Size.
Height
,
2992
float percY = AdjustScale(newVar.
Height
/ ((float)baseVar.
Height
));
3071
bounds.Height = correct.
Height
;
3081
if (correctClientSize.
Height
!= currentClient.Height)
3083
int delta = correctClientSize.
Height
- currentClient.Height;
3622
cp.Height = correct.
Height
;
3870
p.Y = (ownerRect.top + ownerRect.bottom - s.
Height
) / 2;
3875
else if (p.Y + s.
Height
> screenRect.Y + screenRect.Height)
3877
p.Y = screenRect.Y + screenRect.Height - s.
Height
;
4212
form.SetBounds(new Rectangle(Left, Top, adjustedSize.Width, adjustedSize.
Height
), BoundsSpecified.None);
4411
new Rectangle(size.Width - SizeGripSize, size.
Height
- SizeGripSize, SizeGripSize, SizeGripSize));
4419
size.
Height
- SizeGripSize,
4552
desiredSize.Height = (int)(Size.
Height
* autoScaleFactor.Height);
4579
size->cy = desiredSize.
Height
;
5012
_formStateEx[s_formStateExWindowBoundsHeightIsClientSize] == 1 ? restoredSize.
Height
: _restoredWindowBounds.Height,
5228
if (height > max.
Height
)
5230
height = max.
Height
;
5248
if (height < min.
Height
)
5250
height = min.
Height
;
5309
if (x != ClientSize.Width || y != ClientSize.
Height
)
6781
mmi->ptMinTrackSize.Y = minTrack.
Height
;
6796
if (minTrack.
Height
> virtualScreen.
Height
)
6813
mmi->ptMaxTrackSize.Y = Math.Max(maxTrack.
Height
, minTrackWindowSize.
Height
);
6911
point.Y >= (clientSize.
Height
- SizeGripSize) &&
6912
clientSize.
Height
>= SizeGripSize)
System\Windows\Forms\Input\Cursor.cs (9)
225
return (nint)PInvokeCore.CopyCursor(this, sz.Width, sz.
Height
, IMAGE_FLAGS.LR_DEFAULTCOLOR);
280
imageHeight = cursorSize.
Height
;
293
targetHeight = cursorSize.
Height
;
304
&& imageWidth == cursorSize.Width && imageHeight == cursorSize.
Height
)
311
drawHeight = cursorSize.
Height
* targetHeight / imageHeight;
319
&& cursorSize.Width <= targetWidth && cursorSize.
Height
<= targetHeight
320
&& cursorSize.Width == imageWidth && cursorSize.
Height
== imageHeight)
327
drawHeight = cursorSize.
Height
;
425
picSize.
Height
,
System\Windows\Forms\Layout\CommonProperties.cs (2)
208
bounds.Height = Math.Min(bounds.Height, value.
Height
);
232
bounds.Height = Math.Max(bounds.Height, value.
Height
);
System\Windows\Forms\Layout\Containers\SplitContainer.cs (2)
1266
if (DesignMode && Height != DefaultSize.
Height
&& value + Panel2MinSize + SplitterWidth > Height)
1295
if (DesignMode && Height != DefaultSize.
Height
&& value + Panel1MinSize + SplitterWidth > Height)
System\Windows\Forms\Layout\DefaultLayout.cs (22)
58
if (bounds.Width < prefSize.Width || bounds.Height < prefSize.
Height
)
84
Debug.Assert(CommonProperties.GetAutoSizeMode(element) == AutoSizeMode.GrowAndShrink || (newSize.
Height
>= oldBounds.Height && newSize.Width >= oldBounds.Width),
96
location.Y -= newSize.
Height
- oldBounds.Height;
401
Rectangle newElementBounds = new(remainingBounds.X, remainingBounds.Y, elementSize.Width, elementSize.
Height
);
414
Rectangle newElementBounds = new(remainingBounds.X, remainingBounds.Bottom - elementSize.
Height
, elementSize.Width, elementSize.
Height
);
427
Rectangle newElementBounds = new(remainingBounds.X, remainingBounds.Y, elementSize.Width, elementSize.
Height
);
440
Rectangle newElementBounds = new(remainingBounds.Right - elementSize.Width, remainingBounds.Y, elementSize.Width, elementSize.
Height
);
458
Rectangle newElementBounds = new(remainingBounds.X, remainingBounds.Y, elementSize.Width, elementSize.
Height
);
556
Size newSize = xGetDockedSize(element, /* constraints = */ new Size(1, remainingSize.
Height
));
559
newSize.Height = remainingSize.
Height
;
563
newSize.Height = Math.Max(newSize.
Height
, remainingSize.
Height
);
566
Debug.Assert((measureOnly && (newSize.
Height
>= remainingSize.
Height
)) || (newSize.
Height
== remainingSize.
Height
),
586
Debug.Assert(desiredSize.Width >= 0 && desiredSize.
Height
>= 0, "Error detected in xGetDockSize: Element size was negative.");
1137
prefSize.Height = Math.Max(prefSize.
Height
, elementSpace.Bottom);
1168
prefSize.Height = Math.Max(prefSize.
Height
, anchorInfo is null ? bounds.Bottom : bounds.Bottom + anchorInfo.Bottom);
1173
? Math.Max(prefSize.
Height
, elementSpace.Bottom + anchorDest.Height)
1174
: Math.Max(prefSize.
Height
, anchorDest.Bottom);
System\Windows\Forms\Layout\FlowLayout.cs (12)
28
if (prefSize.Width > proposedConstraints.Width || prefSize.
Height
> proposedConstraints.
Height
)
76
Rectangle measureBounds = new(displayRect.X, displayRect.Y, displayRect.Width, displayRect.Height - layoutSize.
Height
);
87
layoutSize.
Height
+ displayRect.Y,
89
rowSize.
Height
);
94
layoutSize.Height += rowSize.
Height
;
187
Size elementConstraints = new(int.MaxValue, rowBounds.Height - elementProxy.Margin.Size.
Height
);
212
if (prefSize.
Height
< elementProxy.MinimumSize.
Height
)
214
prefSize.Height = elementProxy.MinimumSize.
Height
;
253
rowSize.Height = Math.Max(rowSize.
Height
, requiredSize.
Height
);
System\Windows\Forms\Layout\LayoutUtils.cs (32)
52
largestSize.Height = Math.Max(largestSize.
Height
, textSize.
Height
);
131
if (size.
Height
== 0)
209
Math.Max(a.
Height
, b.
Height
));
216
Math.Min(a.
Height
, b.
Height
));
326
withinThis.Y += withinThis.Height - alignThis.
Height
;
330
withinThis.Y += (withinThis.Height - alignThis.
Height
) / 2;
333
withinThis.Height = alignThis.
Height
;
342
withinThis.Y += withinThis.Height - alignThis.
Height
;
346
withinThis.Y += (withinThis.Height - alignThis.
Height
) / 2;
349
withinThis.Height = alignThis.
Height
;
358
(anchorStyles & VerticalAnchorStyles) == VerticalAnchorStyles ? withinThis.
Height
: stretchThis.
Height
);
364
if (stretchedSize.
Height
> withinThis.
Height
)
366
stretchedSize.Height = withinThis.
Height
;
400
currentSize.Height += contentSize.
Height
;
405
currentSize.Height = Math.Max(currentSize.
Height
, contentSize.
Height
);
456
(size.Height, size.Width) = (size.Width, size.
Height
);
495
return (size.Width == 0 || size.
Height
== 0);
500
return ((size1.Width >= size2.Width) && (size1.
Height
>= size2.
Height
));
519
region1.Height = specifiedContent.
Height
;
520
region2.Y += specifiedContent.
Height
;
521
region2.Height -= specifiedContent.
Height
;
524
region1.Y += bounds.Height - specifiedContent.
Height
;
525
region1.Height = specifiedContent.
Height
;
526
region2.Height -= specifiedContent.
Height
;
579
currentSize.Height -= contentSize.
Height
;
System\Windows\Forms\Layout\LayoutUtils.MeasureTextCache.cs (2)
63
&& (sizeCache.PreferredSize.
Height
<= proposedConstraints.
Height
))
System\Windows\Forms\Layout\TableLayout.ContainerInfo.cs (1)
374
if (proposedConstraints.
Height
== 0 || proposedConstraints.Width == 0)
System\Windows\Forms\Layout\TableLayout.cs (10)
109
containerSize.Height = Math.Max(containerSize.
Height
, 1);
166
containerSize.Height = Math.Max(containerSize.
Height
, 1);
179
proposedConstraints.Height = Math.Max(proposedConstraints.
Height
, 1);
231
if (rows.Length != 0 && totalSpace.
Height
> usedSpace.
Height
)
233
rows[^1].MinSize += totalSpace.
Height
- usedSpace.
Height
;
821
if (dontHonorConstraint && (proposedConstraints.
Height
< short.MaxValue))
856
int minHeight = GetElementSize(element, new Size(currentWidth - margin.Horizontal, 0)).
Height
+ margin.Vertical;
863
return DistributeStyles(containerInfo.CellBorderWidth, containerInfo.RowStyles, containerInfo.Rows, proposedConstraints.
Height
, dontHonorConstraint);
System\Windows\Forms\OLE\DataObject.Composition.WinFormsToNativeAdapter.cs (2)
174
HBITMAP compatibleBitmap = PInvokeCore.CreateCompatibleBitmap(screenDC, bitmap.Size.Width, bitmap.Size.
Height
);
183
bitmap.Size.
Height
,
System\Windows\Forms\Printing\PrintPreviewControl.cs (19)
417
internal double VerticalViewSize => InsideRectangle.Height * 100.0 / VirtualSize.
Height
;
487
double zoomY = ((double)controlPhysicalSize.
Height
- Border * (_rows + 1)) / (_rows * pageSize.
Height
);
491
_imageSize = new Size((int)(_zoom * pageSize.Width), (int)(_zoom * pageSize.
Height
));
493
int virtualY = (_imageSize.
Height
* _rows) + Border * (_rows + 1);
627
Math.Max(0, (rect.Height - _virtualSize.
Height
) / 2));
656
double zoomY = ((double)controlPhysicalSize.
Height
- Border * (_rows + 1))
657
/ (_rows * pageSize.
Height
);
661
_imageSize = new Size((int)(_zoom * pageSize.Width), (int)(_zoom * pageSize.
Height
));
670
maxImageHeight = Math.Max(maxImageHeight, imagePixels.
Height
);
672
pageRenderArea[imageIndex - StartPage] = new Rectangle(x, y, imagePixels.Width, imagePixels.
Height
);
752
new(PixelsToPhysical(pixels.Width, dpi.X), PixelsToPhysical(pixels.
Height
, dpi.Y));
758
new(PhysicalToPixels(physical.Width, dpi.X), PhysicalToPixels(physical.
Height
, dpi.Y));
833
virtualDimension: _virtualSize.
Height
,
855
bool vertical = _virtualSize.
Height
> displaySize.
Height
&& displaySize.
Height
> _hScrollBar.Height;
864
vertical = _virtualSize.
Height
> (displaySize.
Height
- _hScrollBar.Height);
System\Windows\Forms\Rendering\ControlPaint.cs (17)
101
float yRatio = bounds.Height / (float)imageSize.
Height
;
109
result.Height = (int)((imageSize.
Height
* xRatio) + .5);
226
graphics.FillRectangle(brush, 0, 0, size.Width, size.
Height
);
227
graphics.DrawImage(bitmap, 0, 0, size.Width, size.
Height
);
295
return (IntPtr)PInvokeCore.CreateBitmap(size.Width, size.
Height
, nPlanes: 1, nBitCount: 1, pBits);
323
PInvokeCore.BitBlt(targetDC, x: 0, y: 0, size.Width, size.
Height
, sourceDC, x1: 0, y1: 0, (ROP_CODE)0x220326);
1040
rc.top -= sz.
Height
;
1041
rc.bottom += sz.
Height
;
1513
if (pixelsBetweenDots.Width <= 0 || pixelsBetweenDots.
Height
<= 0)
1520
|| s_gridSize.
Height
!= pixelsBetweenDots.
Height
|| invert != s_gridInvert)
1535
int height = ((idealSize / pixelsBetweenDots.
Height
) + 1) * pixelsBetweenDots.
Height
;
1542
for (int y = 0; y < height; y += pixelsBetweenDots.
Height
)
1641
new Rectangle(0, 0, imageSize.Width, imageSize.
Height
),
1642
0, 0, imageSize.Width, imageSize.
Height
,
1654
0, 0, imageSize.Width, imageSize.
Height
,
System\Windows\Forms\Rendering\TextExtensions.cs (2)
239
if (proposedSize.
Height
<= 0)
252
if (proposedSize.
Height
== int.MaxValue && dt.HasFlag(DRAW_TEXT_FORMAT.DT_SINGLELINE))
System\Windows\Forms\Scrolling\ScrollableControl.cs (12)
103
if (value.Width < 0 || value.
Height
< 0)
108
SetAutoScrollMargin(value.Width, value.
Height
);
221
if (AutoScrollMinSize.Width != 0 && AutoScrollMinSize.
Height
!= 0)
224
displayRectangle.Height = Math.Max(displayRectangle.Height, AutoScrollMinSize.
Height
);
365
_scrollMargin.Height += current.Size.
Height
;
378
maxY = _userAutoScrollMinSize.
Height
+ _scrollMargin.
Height
;
394
if (layoutBounds.
Height
> maxY)
397
maxY = layoutBounds.
Height
;
462
int ctlBottom = -display.Y + bounds.Y + bounds.Height + _scrollMargin.
Height
;
858
int yMargin = _scrollMargin.
Height
;
963
if (x != _requestedScrollMargin.Width || y != _requestedScrollMargin.
Height
)
System\Windows\Forms\SystemInformation.cs (1)
462
return new Rectangle(0, 0, size.Width, size.
Height
);
System\Windows\Forms\ToolTip\ToolTip.cs (8)
1495
Point optimalPoint = GetOptimalToolTipPosition(tool, toolRectangle, bubbleSize.Width, bubbleSize.
Height
);
1944
if (moveToLocation.Y + tipSize.
Height
> screen.WorkingArea.Bottom)
1946
moveToLocation.Y = screen.WorkingArea.Bottom - tipSize.
Height
;
1955
tipSize.
Height
,
2074
if (rect.Height > currentTooltipSize.
Height
)
2113
currentTooltipSize.
Height
,
2187
if (wp->y + wp->cy + currentCursor.Size.
Height
- currentCursor.HotSpot.Y > screen.WorkingArea.Bottom)
2193
wp->y = cursorPos.Y + currentCursor.Size.
Height
- currentCursor.HotSpot.Y;
System.Windows.Forms.Design (141)
System\ComponentModel\Design\ByteViewer.cs (1)
549
int rows = (ClientSize.
Height
- 2 * (BORDER_GAP + INSET_GAP)) / CELL_HEIGHT;
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (1)
575
button.Inflate(-SystemInformation.BorderSize.Width * 2, -SystemInformation.BorderSize.
Height
* 2);
System\ComponentModel\Design\DesignerActionPanel.cs (9)
256
if (rectangleAnchor.Bottom + sizePanel.
Height
> rectScreen.Bottom)
259
if (rectangleAnchor.Top - sizePanel.
Height
< rectScreen.Top)
268
if (rectangleAnchor.Top - sizePanel.
Height
< rectScreen.Top)
271
if (rectangleAnchor.Bottom + sizePanel.
Height
> rectScreen.Bottom)
301
y = rectangleAnchor.Top - sizePanel.
Height
- EDGE_SPACE;
319
y = rectangleAnchor.Bottom - sizePanel.
Height
;
337
y = rectangleAnchor.Top - sizePanel.
Height
- EDGE_SPACE;
382
_lineHeights.Add(size.
Height
);
383
yPos += size.
Height
;
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (6)
176
int buttonHeight = EditRegionSize.
Height
- EditorLineButtonPadding * 2 - 1;
291
int width = EditRegionSize.
Height
- EditorLineSwatchPadding * 2;
353
if (rectScreen.Bottom < (dropDownSize.
Height
+ editorLocation.Y + editorBounds.Height))
355
editorLocation.Y -= dropDownSize.
Height
+ 1;
377
if (rectScreen.Bottom < (dropDownSize.
Height
+ editorLocation.Y + editorBounds.Height))
379
editorLocation.Y -= dropDownSize.
Height
+ 1;
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.FlyoutDialog.cs (1)
37
int height = Math.Max(_hostedControl.Height, SystemInformation.MinimizedWindowSize.
Height
);
System\ComponentModel\Design\DesignerActionPanel.PanelHeaderLine.cs (4)
68
_subtitleLabel.Location = new Point(LineLeftMargin, top + PanelHeaderVerticalPadding * 2 + titleSize.
Height
);
73
int newHeight = (subtitleSize.IsEmpty ? (titleSize.
Height
+ 2 * PanelHeaderVerticalPadding) : (titleSize.
Height
+ subtitleSize.
Height
+ 3 * PanelHeaderVerticalPadding));
System\ComponentModel\Design\DesignerActionPanel.TextBoxPropertyLine.cs (2)
94
int textBoxPreferredHeight = _textBox.GetPreferredSize(new Size(int.MaxValue, int.MaxValue)).
Height
;
116
EditControl.Height = _editRegionSize.
Height
- TextBoxLineInnerPadding * 2 - 1;
System\ComponentModel\Design\DesignerActionUI.DesignerActionToolStripDropDown.cs (2)
169
if (Size.Width != ctrl.Size.Width || Size.
Height
!= ctrl.Size.
Height
)
System\ComponentModel\Design\MultilineStringEditor.MultilineStringEditorUI.cs (2)
173
ClientSize = new Size(ClientSize.Width + requestedDelta, MinimumSize.
Height
);
417
new RectangleF(0.0f, 0.0f, ClientSize.Width, ClientSize.
Height
),
System\Drawing\Design\ColorEditor.ColorUI.cs (2)
89
Size = new Size(size.Width + 2 * CMARGIN, size.
Height
+ 2 * CMARGIN + rectItemSize.Height);
316
_pal.Size.
Height
- rectItemSize.Height + 2 * CMARGIN);
System\Drawing\Design\CursorEditor.CursorUI.cs (1)
23
ItemHeight = Math.Max(4 + Cursors.Default.Size.
Height
, Font.Height);
System\Windows\Forms\Design\AnchorEditor.AnchorUI.cs (1)
73
int YBORDER = SystemInformation.Border3DSize.
Height
;
System\Windows\Forms\Design\Behavior\ContainerSelectorBehavior.cs (2)
178
if (delta.Width >= DesignerUtils.MinDragSize.Width / 2 || delta.
Height
>= DesignerUtils.MinDragSize.
Height
/ 2)
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (3)
147
int yDelta = controlLocation.Y % _parentGridSize.
Height
;
158
if (yDelta > _parentGridSize.
Height
/ 2)
160
offset.Y = _parentGridSize.
Height
- yDelta;
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (10)
123
int yDelta = controlBounds.Bottom % _parentGridSize.
Height
;
124
if (yDelta > _parentGridSize.
Height
/ 2)
126
rect.Height += _parentGridSize.
Height
- yDelta;
135
int yDelta = controlBounds.Top % _parentGridSize.
Height
;
136
if (yDelta > _parentGridSize.
Height
/ 2)
138
rect.Y += _parentGridSize.
Height
- yDelta;
139
rect.Height -= _parentGridSize.
Height
- yDelta;
150
rect.Height = Math.Max(rect.Height, _parentGridSize.
Height
);
492
if (Math.Abs(_initialPoint.X - mouseLoc.X) > DesignerUtils.MinDragSize.Width / 2 || Math.Abs(_initialPoint.Y - mouseLoc.Y) > DesignerUtils.MinDragSize.
Height
/ 2)
549
int minHeight = Math.Max(targetControl.MinimumSize.
Height
, MINSIZE);
System\Windows\Forms\Design\CommandSet.cs (31)
855
moveOffsetY *= snapSize.
Height
;
1043
loc.Y = primaryLocation.Y + primarySize.
Height
- size.
Height
;
1051
loc.Y = primarySize.
Height
/ 2 + primaryLocation.Y - size.
Height
/ 2;
1199
delta = loc.Y % gridSize.
Height
;
1200
if (delta < (gridSize.
Height
/ 2))
1206
loc.Y += (gridSize.
Height
- delta);
1308
if (loc.Y + size.
Height
> bottom)
1309
bottom = loc.Y + size.
Height
;
1324
int centerOfParentY = (viewParent.ClientSize.
Height
) / 2;
2348
itemSize.Height = primarySize.
Height
;
2431
size.Height = ((size.
Height
+ (grid.
Height
/ 2)) / grid.
Height
) * grid.
Height
;
2433
loc.Y = (loc.Y / grid.
Height
) * grid.
Height
;
2617
total += curSize.
Height
;
2703
: (lastSize.
Height
+ lastLoc.Y - curLoc.Y - total) / (selectedObjects.Length - 1);
2833
curLoc.Y = lastLoc.Y + lastSize.
Height
;
2839
curLoc.Y -= grid.
Height
* (n - primaryIndex);
2845
curLoc.Y += grid.
Height
* (primaryIndex - n);
2854
curLoc.Y += grid.
Height
* (n - primaryIndex);
2858
curLoc.Y -= grid.
Height
* (primaryIndex - n);
2863
curLoc.Y = lastLoc.Y + lastSize.
Height
+ nEqualDelta;
3266
if (max.Y < loc.Y + size.
Height
)
3268
max.Y = loc.Y + size.
Height
;
3291
Point parentOffset = new(parentSize.Width / 2, parentSize.
Height
/ 2);
3380
groupEndY = parentOffset.Y + gridSize.
Height
;
3383
if (groupEndX > parentSize.Width || groupEndY > parentSize.
Height
)
System\Windows\Forms\Design\ComponentTray.cs (8)
1997
rc.Height = _cyIcon + 2 * WhiteSpace + sz.
Height
+ 4 * _borderWidth;
2002
rc.Height = Math.Max(_cyIcon, sz.
Height
) + 4 * _borderWidth;
2192
minDrag.Height = Math.Max(minDrag.
Height
, minDblClick.
Height
);
2197
Math.Abs(_mouseDragLast.Y - newPt.Y) < minDrag.
Height
))
2422
if (Math.Abs(bounds.X - x) > parentGridSize.Width || Math.Abs(bounds.Y - y) > parentGridSize.
Height
)
2452
_cyIcon = SystemInformation.IconSize.
Height
;
2458
_cyIcon = sz.
Height
;
System\Windows\Forms\Design\ControlCommandSet.cs (2)
645
if ((primaryControlsize.Width <= 0) || (primaryControlsize.
Height
<= 0))
699
moveOffsetY *= snapSize.
Height
;
System\Windows\Forms\Design\ControlDesigner.cs (7)
1381
minDrag.Height = Math.Max(minDrag.
Height
, minDblClick.
Height
);
1386
Math.Abs(_mouseDragLast.Y - y) < minDrag.
Height
))
2251
Rectangle imageRect = new(marginX, marginY, glyphSize.Width, glyphSize.
Height
);
2260
Math.Max(SystemInformation.ToolWindowCaptionHeight - SystemInformation.BorderSize.
Height
- 2, Control.Font.Height),
2340
&& y >= _lastClickMessagePositionY - dblClick.
Height
2341
&& y <= _lastClickMessagePositionY + dblClick.
Height
)
System\Windows\Forms\Design\DesignBindingPicker.cs (1)
457
ScaleHelper.ScaleToPercent(_initialSize.
Height
, scalePercent));
System\Windows\Forms\Design\DesignerFrame.cs (1)
166
_designer!.Location = new Point(selectionSize.Width, selectionSize.
Height
);
System\Windows\Forms\Design\DesignerOptions.cs (2)
35
if (value.
Height
< MinGridSize)
45
if (value.
Height
> MaxGridSize)
System\Windows\Forms\Design\DesignerUtils.cs (7)
147
s_minDragSize.Height = Math.Max(minDrag.
Height
, minDblClick.
Height
);
198
g.DrawLine(pen, 1, imageSize.
Height
- 1, imageSize.Width - 2, imageSize.
Height
- 1);
199
g.DrawLine(pen, 0, 1, 0, imageSize.
Height
- 2);
200
g.DrawLine(pen, imageSize.Width - 1, 1, imageSize.Width - 1, imageSize.
Height
- 2);
205
g.DrawRectangle(pen, i, i, imageSize.Width - (2 + i), imageSize.
Height
- (2 + i));
System\Windows\Forms\Design\FormDocumentDesigner.cs (2)
276
float percY = newVar.
Height
/ ((float)baseVar.Height);
428
int clientHeight = form.ClientSize.
Height
;
System\Windows\Forms\Design\InheritanceUI.cs (1)
37
s_inheritanceGlyphRect = new Rectangle(0, 0, size.Width, size.
Height
);
System\Windows\Forms\Design\ParentControlDesigner.cs (19)
253
if (value.Width < MinGridSize || value.
Height
< MinGridSize ||
254
value.Width > MaxGridSize || value.
Height
> MaxGridSize)
424
loc.Offset(GridSize.Width, GridSize.
Height
);
497
bounds.Y = selectedControl.Location.Y + GridSize.
Height
;
507
bounds.Height = size.
Height
;
534
bounds.Y += offset.
Height
;
919
int parentHeight = parent.ClientSize.
Height
;
969
if (size.Width <= 0 || size.
Height
<= 0)
1139
Point halfGrid = new(gridSize.Width / 2, gridSize.
Height
/ 2);
1159
updatedRect.Y = (dragRect.Y / gridSize.
Height
) * gridSize.
Height
;
1164
updatedRect.Y += gridSize.
Height
;
1173
updatedRect.Height = ((dragRect.Y + dragRect.Height) / gridSize.
Height
) * gridSize.
Height
- updatedRect.Y;
1179
if (updatedRect.Height < gridSize.
Height
)
1180
updatedRect.Height = gridSize.
Height
;
1861
Size minControlSize = new(DesignerUtils.MinDragSize.Width * 2, DesignerUtils.MinDragSize.
Height
* 2);
1867
if (offset.Height < minControlSize.
Height
)
1869
offset.Height = minControlSize.
Height
;
System\Windows\Forms\Design\SelectionUIHandler.cs (6)
72
containerRect.Inflate(snapSize.Width, snapSize.
Height
);
326
if (targetHeight < minSize.
Height
)
328
targetHeight = minSize.
Height
;
502
if (heightProp is not null && !heightProp.IsReadOnly && size.
Height
!= (int)heightProp.GetValue(components[i])!)
511
controls[i].Height = size.
Height
;
650
Height = sz.
Height
;
System\Windows\Forms\Design\SelectionUIService.cs (1)
632
Math.Abs(screenCoord.Y - _mouseDragAnchor.Y) < minDragSize.
Height
)
System\Windows\Forms\Design\ShortcutKeysEditor.ShortcutKeysUI.cs (1)
232
Size = new Size(Size.Width + _resetButton.Size.Width - resetButtonSize.Width, Size.
Height
);
System\Windows\Forms\Design\TabOrder.cs (1)
258
convertedRectangle.Height = sz.
Height
+ 2;
System\Windows\Forms\Design\ToolStripEditorManager.cs (1)
142
private void UpdateSize() => Size = new Size(_wrappedEditor.Size.Width, _wrappedEditor.Size.
Height
);
System\Windows\Forms\Design\ToolStripItemBehavior.cs (2)
991
parentDesigner.DragBoxFromMouseDown = _dragBoxFromMouseDown = new Rectangle(new Point(mouseLoc.X - (dragSize.Width / 2), mouseLoc.Y - (dragSize.
Height
/ 2)), dragSize);
1014
ownerItemDesigner._dragBoxFromMouseDown = _dragBoxFromMouseDown = new Rectangle(new Point(mouseLoc.X - (dragSize.Width / 2), mouseLoc.Y - (dragSize.
Height
/ 2)), dragSize);
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (1)
1181
if (_toolStripAdornerWindowService is not null && (dropDown.Width < _dropDownSizeToInvalidate.Width || dropDown.Size.
Height
< _dropDownSizeToInvalidate.Height))
System.Windows.Forms.Design.Tests (2)
System\Windows\Forms\Design\InheritedPropertyDescriptorTests.cs (2)
18
size.
Height
.Should().Be(0);
22
size.
Height
.Should().Be(120);
System.Windows.Forms.Primitives (8)
System\Windows\Forms\Internals\ScaleHelper.cs (8)
164
if (desiredSize.Width % originalSize.Width == 0 && desiredSize.
Height
% originalSize.
Height
== 0)
171
else if (desiredSize.Width < originalSize.Width && desiredSize.
Height
< originalSize.
Height
)
177
Bitmap scaledBitmap = new(desiredSize.Width, desiredSize.
Height
, bitmap.PixelFormat);
184
RectangleF sourceBounds = new(0, 0, bitmap.Size.Width, bitmap.Size.
Height
);
185
RectangleF destinationBounds = new(0, 0, desiredSize.Width, desiredSize.
Height
);
303
: new(ScaleToDpi(logicalSize.Width, dpi), ScaleToDpi(logicalSize.
Height
, dpi));
System.Windows.Forms.Primitives.Tests (3)
Interop\Ole32\IPictureTests.cs (3)
27
Assert.Equal(arrow.Size.
Height
, GdiHelper.HimetricToPixelY(height));
44
Assert.Equal(bitmap.Size.
Height
, GdiHelper.HimetricToPixelY(height));
63
Assert.Equal(bitmap.Size.
Height
, GdiHelper.HimetricToPixelY((int)variant.data.uintVal));
System.Windows.Forms.Tests (188)
DpiHelperTests.cs (1)
26
(int)Math.Round(value.
Height
* (ScaleHelper.InitialSystemDpi / (double)ScaleHelper.OneHundredPercentLogicalDpi)));
System\Windows\Forms\AccessibleObjects\ComboBox.ComboBoxItemAccessibleObjectTests.cs (2)
396
comboBox.Size = new Size(100, comboBox.Size.
Height
);
458
comboBox.Size = new Size(100, comboBox.Size.
Height
);
System\Windows\Forms\AccessibleObjects\DataGridViewAccessibleObjectTests.cs (1)
155
int expectedHeight = dataGridView.Size.
Height
;
System\Windows\Forms\ButtonTests.cs (8)
1341
Assert.Equal(new Size(75, minSize.
Height
+ 6 + 9), size);
1346
Assert.Equal(new Size(75, minSize.
Height
+ 6 + 9), size);
1637
Assert.Equal(new Size(75, minSize.
Height
+ 13 + 8), size);
1642
Assert.Equal(new Size(75, minSize.
Height
+ 13 + 8), size);
1685
Assert.Equal(new Size(75, minSize.
Height
+ 13 + 6), size);
1690
Assert.Equal(new Size(75, minSize.
Height
+ 13 + 6), size);
1733
Assert.Equal(new Size(75, minSize.
Height
+ 13 + 6), size);
1738
Assert.Equal(new Size(75, minSize.
Height
+ 13 + 6), size);
System\Windows\Forms\CheckBoxTests.cs (1)
98
Assert.True(control.PreferredSize.
Height
> 0);
System\Windows\Forms\ComboBox.ComboBoxChildListUiaProviderTests.cs (1)
111
comboBox.Size = new Size(expectedWidth, comboBox.Size.
Height
);
System\Windows\Forms\ControlTests.Methods.cs (19)
9781
control.SetClientSizeCore(value.Width, value.
Height
);
9791
control.SetClientSizeCore(value.Width, value.
Height
);
9815
control.SetClientSizeCore(value.Width, value.
Height
);
9823
Assert.Equal(expectedSize.
Height
, control.Bottom);
9825
Assert.Equal(expectedSize.
Height
, control.Height);
9831
control.SetClientSizeCore(value.Width, value.
Height
);
9839
Assert.Equal(expectedSize.
Height
, control.Bottom);
9841
Assert.Equal(expectedSize.
Height
, control.Height);
9863
control.SetClientSizeCore(value.Width, value.
Height
);
9871
Assert.Equal(expectedSize.
Height
, control.Bottom);
9873
Assert.Equal(expectedSize.
Height
, control.Height);
9882
control.SetClientSizeCore(value.Width, value.
Height
);
9890
Assert.Equal(expectedSize.
Height
, control.Bottom);
9892
Assert.Equal(expectedSize.
Height
, control.Height);
10119
Size expected = new(clientSize.Width + 4, clientSize.
Height
+ 4);
10399
Assert.True(control.ClientSize.
Height
>= 0);
10409
Assert.True(control.Size.
Height
> 0);
10432
Assert.True(control.ClientSize.
Height
>= 0);
10442
Assert.True(control.Size.
Height
>= 0);
System\Windows\Forms\ControlTests.Properties.cs (34)
3388
Assert.Equal(expectedSize.
Height
, control.Bottom);
3390
Assert.Equal(expectedSize.
Height
, control.Height);
3404
Assert.Equal(expectedSize.
Height
, control.Bottom);
3406
Assert.Equal(expectedSize.
Height
, control.Height);
3451
Assert.Equal(expectedSize.
Height
, control.Bottom);
3453
Assert.Equal(expectedSize.
Height
, control.Height);
3470
Assert.Equal(expectedSize.
Height
, control.Bottom);
3472
Assert.Equal(expectedSize.
Height
, control.Height);
11113
Assert.Equal(new Rectangle(0, 0, value.Width, value.
Height
), control.ClientRectangle);
11114
Assert.Equal(new Rectangle(0, 0, value.Width, value.
Height
), control.DisplayRectangle);
11119
Assert.Equal(value.
Height
, control.Bottom);
11121
Assert.Equal(value.
Height
, control.Height);
11122
Assert.Equal(new Rectangle(0, 0, value.Width, value.
Height
), control.Bounds);
11132
Assert.Equal(new Rectangle(0, 0, value.Width, value.
Height
), control.ClientRectangle);
11133
Assert.Equal(new Rectangle(0, 0, value.Width, value.
Height
), control.DisplayRectangle);
11138
Assert.Equal(value.
Height
, control.Bottom);
11140
Assert.Equal(value.
Height
, control.Height);
11141
Assert.Equal(new Rectangle(0, 0, value.Width, value.
Height
), control.Bounds);
11325
Assert.Equal(value.
Height
, control.Bottom);
11327
Assert.Equal(value.
Height
, control.Height);
11328
Assert.Equal(new Rectangle(0, 0, value.Width, value.
Height
), control.Bounds);
11344
Assert.Equal(value.
Height
, control.Bottom);
11346
Assert.Equal(value.
Height
, control.Height);
11347
Assert.Equal(new Rectangle(0, 0, value.Width, value.
Height
), control.Bounds);
11434
Assert.Equal(new Rectangle(0, 0, value.Width, value.
Height
), control.ClientRectangle);
11435
Assert.Equal(new Rectangle(0, 0, value.Width, value.
Height
), control.DisplayRectangle);
11440
Assert.Equal(value.
Height
, control.Bottom);
11442
Assert.Equal(value.
Height
, control.Height);
11443
Assert.Equal(new Rectangle(0, 0, value.Width, value.
Height
), control.Bounds);
11454
Assert.Equal(new Rectangle(0, 0, value.Width, value.
Height
), control.ClientRectangle);
11455
Assert.Equal(new Rectangle(0, 0, value.Width, value.
Height
), control.DisplayRectangle);
11460
Assert.Equal(value.
Height
, control.Bottom);
11462
Assert.Equal(value.
Height
, control.Height);
11463
Assert.Equal(new Rectangle(0, 0, value.Width, value.
Height
), control.Bounds);
System\Windows\Forms\CursorsTests.cs (1)
55
Assert.True(hotSpot.Y >= 0 && hotSpot.Y <= cursor.Size.
Height
);
System\Windows\Forms\CursorTests.cs (4)
233
Assert.True(hotSpot.Y >= 0 && hotSpot.Y <= cursor.Size.
Height
);
368
yield return new object[] { new Rectangle(0, 0, Cursors.Default.Size.Width, Cursors.Default.Size.
Height
) };
369
yield return new object[] { new Rectangle(1, 0, Cursors.Default.Size.Width, Cursors.Default.Size.
Height
) };
370
yield return new object[] { new Rectangle(0, 2, 3, Cursors.Default.Size.
Height
) };
System\Windows\Forms\DataGridViewTextBoxEditingControlTests.cs (2)
14
private static readonly int s_preferredHeight = Control.DefaultFont.Height + SystemInformation.BorderSize.
Height
* 4 + 3;
99
Assert.True(control.PreferredSize.
Height
> 0);
System\Windows\Forms\Design\ComponentEditorFormTests.cs (5)
32
Assert.True(control.AutoScaleBaseSize.
Height
> 0);
56
Assert.Equal(new Rectangle(0, 0, control.ClientSize.Width, control.ClientSize.
Height
), control.ClientRectangle);
57
Assert.Equal(new Size(control.ClientSize.Width, control.ClientSize.
Height
), control.ClientSize);
79
Assert.Equal(new Rectangle(0, 0, control.ClientSize.Width, control.ClientSize.
Height
), control.DisplayRectangle);
131
Assert.True(control.PreferredSize.
Height
> 0);
System\Windows\Forms\FormTests.cs (4)
30
Assert.True(control.AutoScaleBaseSize.
Height
> 0);
54
Assert.Equal(new Rectangle(0, 0, control.ClientSize.Width, control.ClientSize.
Height
), control.ClientRectangle);
56
Assert.True(control.ClientSize.
Height
> 0);
133
Assert.True(control.PreferredSize.
Height
> 0);
System\Windows\Forms\HScrollBarTests.cs (4)
44
Assert.True(control.ClientSize.
Height
> 0);
59
Assert.True(control.DefaultSize.
Height
> 0);
93
Assert.True(control.PreferredSize.
Height
> 0);
105
Assert.True(control.Size.
Height
> 0);
System\Windows\Forms\LabelTests.cs (1)
89
Assert.True(control.PreferredSize.
Height
> 0);
System\Windows\Forms\ListBoxTests.cs (5)
100
Assert.Equal(Control.DefaultFont.Height + SystemInformation.BorderSize.
Height
* 4 + 3, control.PreferredHeight);
2050
int extra = SystemInformation.BorderSize.
Height
* 4 + 3;
2079
int extra = SystemInformation.BorderSize.
Height
* 4 + 3;
4849
Assert.Equal(control.PreferredHeight, result.
Height
);
4882
Assert.Equal(control.PreferredHeight + 6, result.
Height
);
System\Windows\Forms\MdiClientTests.cs (6)
544
Assert.Equal(value.
Height
, control.Bottom);
546
Assert.Equal(value.
Height
, control.Height);
547
Assert.Equal(new Rectangle(0, 0, value.Width, value.
Height
), control.Bounds);
563
Assert.Equal(value.
Height
, control.Bottom);
565
Assert.Equal(value.
Height
, control.Height);
566
Assert.Equal(new Rectangle(0, 0, value.Width, value.
Height
), control.Bounds);
System\Windows\Forms\MenuStripTests.cs (1)
119
Assert.True(control.PreferredSize.
Height
> 0);
System\Windows\Forms\MonthCalendarTests.cs (9)
49
Assert.True(control.ClientSize.
Height
> 0);
68
Assert.True(control.DefaultSize.
Height
> 0);
105
Assert.True(control.PreferredSize.
Height
> 0);
127
Assert.True(control.Size.
Height
> 0);
648
Assert.True(calendar.CalendarDimensions.
Height
is > 0 and <= 12);
655
Assert.True(calendar.CalendarDimensions.
Height
is > 0 and <= 12);
706
Assert.True(calendar.CalendarDimensions.
Height
is > 0 and <= 12);
716
Assert.True(calendar.CalendarDimensions.
Height
is > 0 and <= 12);
2434
Assert.True(size.
Height
>= 153);
System\Windows\Forms\RichTextBoxTests.cs (3)
22
private static readonly int s_preferredHeight = Control.DefaultFont.Height + SystemInformation.BorderSize.
Height
* 4 + 3;
106
Assert.True(control.PreferredSize.
Height
> 0);
107
Assert.Equal(control.PreferredSize.
Height
, control.PreferredHeight);
System\Windows\Forms\SplitterPanelTests.cs (10)
829
Assert.Equal(new Rectangle(0, 0, value.Width, value.
Height
), control.ClientRectangle);
830
Assert.Equal(new Rectangle(0, 0, value.Width, value.
Height
), control.DisplayRectangle);
835
Assert.Equal(value.
Height
, control.Bottom);
837
Assert.Equal(value.
Height
, control.Height);
838
Assert.Equal(new Rectangle(0, 0, value.Width, value.
Height
), control.Bounds);
848
Assert.Equal(new Rectangle(0, 0, value.Width, value.
Height
), control.ClientRectangle);
849
Assert.Equal(new Rectangle(0, 0, value.Width, value.
Height
), control.DisplayRectangle);
854
Assert.Equal(value.
Height
, control.Bottom);
856
Assert.Equal(value.
Height
, control.Height);
857
Assert.Equal(new Rectangle(0, 0, value.Width, value.
Height
), control.Bounds);
System\Windows\Forms\StatusStripTests.cs (1)
118
Assert.True(control.PreferredSize.
Height
> 0);
System\Windows\Forms\SystemInformationTests.cs (24)
50
Assert.True(size.
Height
>= 0);
67
Assert.True(size.
Height
>= 0);
76
Assert.True(size.
Height
>= 0);
138
Assert.True(size.
Height
>= 0);
161
Assert.True(size.
Height
>= 0);
170
Assert.True(size.
Height
>= 0);
195
Assert.True(size.
Height
>= 0);
259
Assert.True(size.
Height
>= 32);
268
Assert.True(size.
Height
>= 0);
405
Assert.True(size.
Height
>= 0);
420
Assert.True(size.
Height
>= 0);
429
Assert.True(size.
Height
>= 0);
438
Assert.True(size.
Height
>= 0);
477
Assert.True(size.
Height
>= 0);
486
Assert.True(size.
Height
>= 0);
495
Assert.True(size.
Height
> 0);
504
Assert.True(size.
Height
> 0);
542
Assert.True(size.
Height
>= 0);
629
Assert.True(size.
Height
> 0);
638
Assert.True(size.
Height
> 0);
681
Assert.True(size.
Height
> 0);
690
Assert.True(size.
Height
> 0);
705
Assert.True(size.
Height
> 0);
822
Assert.True(size.
Height
>= 0);
System\Windows\Forms\TabControlTests.cs (3)
1447
Assert.True(size.
Height
> 0);
1463
Assert.True(size.
Height
> 0);
1546
Assert.True(size.
Height
> 0);
System\Windows\Forms\TextRendererTests.cs (6)
406
Assert.True(result.
Height
> 0);
430
Assert.True(result.
Height
> 0);
462
Assert.True(result.
Height
> 0);
477
Assert.True(result.
Height
> 0);
492
Assert.True(result.
Height
> 0);
507
Assert.True(result.
Height
> 0);
System\Windows\Forms\ToolStripComboBoxTests.cs (3)
389
preferredSize.
Height
.Should().BeGreaterThan(0);
400
preferredSize.
Height
.Should().Be(basePreferredSize.
Height
);
System\Windows\Forms\ToolStripControlHostTests.cs (2)
2214
Assert.Equal(new Rectangle(1, 2, value.Width, value.
Height
), c.Bounds);
2220
Assert.Equal(new Rectangle(1, 2, value.Width, value.
Height
), c.Bounds);
System\Windows\Forms\ToolStripDropDownTests.cs (2)
127
Assert.True(control.PreferredSize.
Height
> 0);
5006
expectedLocation.Offset(nonClientSize.Width - 3, nonClientSize.
Height
- 1);
System\Windows\Forms\ToolStripTests.cs (2)
135
Assert.True(control.PreferredSize.
Height
> 0);
290
Assert.True(control.PreferredSize.
Height
> 0);
System\Windows\Forms\TreeViewTests.cs (1)
40
Assert.Equal(93, control.ClientSize.
Height
);
System\Windows\Forms\UpDownBaseTests.cs (12)
719
yield return new object[] { BorderStyle.Fixed3D, new Size(122, Control.DefaultFont.Height + SystemInformation.BorderSize.
Height
* 4 + 3) };
720
yield return new object[] { BorderStyle.FixedSingle, new Size(122, Control.DefaultFont.Height + SystemInformation.BorderSize.
Height
* 4 + 3) };
725
yield return new object[] { BorderStyle.Fixed3D, new Size(123, Control.DefaultFont.Height + SystemInformation.BorderSize.
Height
* 4 + 3) };
726
yield return new object[] { BorderStyle.FixedSingle, new Size(121, Control.DefaultFont.Height + SystemInformation.BorderSize.
Height
* 4 + 3) };
740
Assert.Equal(expectedPreferredSize.
Height
, control.PreferredHeight);
747
Assert.Equal(expectedPreferredSize.
Height
, control.PreferredHeight);
756
yield return new object[] { BorderStyle.Fixed3D, 0, 0, new Size(122, Control.DefaultFont.Height + SystemInformation.BorderSize.
Height
* 4 + 3) };
757
yield return new object[] { BorderStyle.FixedSingle, 0, 1, new Size(122, Control.DefaultFont.Height + SystemInformation.BorderSize.
Height
* 4 + 3) };
762
yield return new object[] { BorderStyle.Fixed3D, 0, 0, new Size(123, Control.DefaultFont.Height + SystemInformation.BorderSize.
Height
* 4 + 3) };
763
yield return new object[] { BorderStyle.FixedSingle, 1, 1, new Size(123, Control.DefaultFont.Height + SystemInformation.BorderSize.
Height
* 4 + 3) };
783
Assert.Equal(expectedPreferredSize.
Height
, control.PreferredHeight);
793
Assert.Equal(expectedPreferredSize.
Height
, control.PreferredHeight);
System\Windows\Forms\VScrollBarTests.cs (4)
43
Assert.True(control.ClientSize.
Height
> 0);
58
Assert.True(control.DefaultSize.
Height
> 0);
92
Assert.True(control.PreferredSize.
Height
> 0);
104
Assert.True(control.Size.
Height
> 0);
Text\FontMetrics.cs (1)
69
Assert.Equal(height, extent.
Height
);
TextBoxBaseTests.cs (3)
16
private static readonly int s_preferredHeight = Control.DefaultFont.Height + SystemInformation.BorderSize.
Height
* 4 + 3;
5109
Assert.True(result.
Height
>= expectedMinimumHeight);
5115
Assert.True(result.
Height
>= expectedMinimumHeight);
TextBoxTests.cs (2)
13
private static readonly int s_preferredHeight = Control.DefaultFont.Height + SystemInformation.BorderSize.
Height
* 4 + 3;
93
Assert.True(control.PreferredSize.
Height
> 0);
System.Windows.Forms.UI.IntegrationTests (14)
ButtonTests.cs (7)
131
Assert.Equal(originalFormSize.
Height
, form.DisplayRectangle.Height);
154
Assert.True(form.DisplayRectangle.Height > originalFormSize.
Height
);
181
Assert.Equal(originalFormSize.
Height
, form.DisplayRectangle.Height);
210
Assert.True(form.DisplayRectangle.Height > originalFormSize.
Height
);
216
Assert.Equal(originalFormSize.
Height
- originalButtonPosition.Bottom, form.DisplayRectangle.Height - button.DisplayRectangle.Bottom);
262
int verticalResolution = primaryMonitor.
Height
;
298
int verticalResolution = primaryMonitor.
Height
;
DragDropTests.cs (1)
722
e.Y - (dragSize.
Height
/ 2)),
Infra\ControlTestBase.cs (2)
186
(int)Math.Ceiling((65535.0 / (primaryMonitor.
Height
- 1)) * point.Y));
194
TestOutputHelper.WriteLine($"Screen resolution of ({primaryMonitor.Width}, {primaryMonitor.
Height
}) translates mouse to ({virtualPoint.X}, {virtualPoint.Y}).");
Infra\ScreenRecordService.cs (2)
483
WritePngUInt32(stream, buffer, crc, checked((uint)size.
Height
));
487
WritePngUInt32(stream, buffer, crc, checked((uint)offset.
Height
));
MDITests.cs (2)
29
int childFormMinimizedYPositionFromBottom = form.ClientSize.
Height
- childForm.Top;
32
Assert.Equal(childFormMinimizedYPositionFromBottom, form.ClientSize.
Height
- childForm.Top);
WindowsFormsIntegration (12)
System\Windows\Integration\Convert.cs (2)
236
Size returnSize = new Size((double)size.Width, (double)size.
Height
);
247
Size returnSize = new Size((double)size.Width, (double)size.
Height
);
System\Windows\Integration\ElementHost.cs (2)
318
int maxHeight = Math.Min(priorMaxSize.
Height
, maxElementSize.
Height
);
System\Windows\Integration\HostUtils.cs (8)
45
if (size.
Height
== 0) { size.Height = int.MaxValue; }
53
if (size.
Height
== 0 || size.
Height
== 1) { size.Height = int.MaxValue; }
63
if (size.
Height
== int.MaxValue)
74
Math.Max(size1.
Height
, size2.
Height
));
81
Math.Min(size1.
Height
, size2.
Height
));
WinFormsControlsTest (2)
ComboBoxesWithScrollBars.cs (1)
27
changeCBHeight_UpDown2.Value = comboBox2.Size.
Height
;
MainForm.cs (1)
295
(int)Math.Ceiling((overarchingFlowLayoutPanel.Controls.Count + 1) / 3.0) * (biggestButton.
Height
+ padding * 2)