278 writes to Height
System.Drawing.Primitives (3)
System\Drawing\Rectangle.cs (3)
78Height = value.Height; 252Height += 2 * height; 281Height = result.Height;
System.Windows.Forms (219)
System\Windows\Forms\ActiveX\AxHost.cs (1)
1416b.Height = p.Height;
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (1)
1705bounds.Height = adjusted.Height;
System\Windows\Forms\Control.cs (1)
8163rectangle.Height--;
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (1)
397imageBounds.Height++;
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.LayoutOptions.cs (11)
296layout.Focus.Height--; 403layout.CheckArea.Height = field.Height; 415layout.CheckArea.Height = field.Height; 424layout.CheckArea.Height = checkSizeFull; 427layout.Field.Height -= checkSizeFull; 435layout.CheckArea.Height = checkSizeFull; 437layout.Field.Height -= checkSizeFull; 446layout.CheckBounds.Height -= CheckPaddingSize; 582layout.TextBounds.Height = textBottom - layout.TextBounds.Y; 607layout.ImageBounds.Height = Math.Max( 656layout.TextBounds.Height = bottom - layout.TextBounds.Y;
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxBaseAdapter.cs (6)
44bounds.Height--; 56bounds.Height--; 65bounds.Height++; 75bounds.Height++; 176fullSize.Height++; 181fullSize.Height++;
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonBaseAdapter.cs (2)
46bounds.Height--; 86bounds.Height--;
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (1)
2125rectDisplay.Height -= _horizScrollBar.Height;
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (39)
2778clip.Height = _layout.Data.Y + _layout.Data.Height - topEdge - 1; 4377inside.Height = 0; 4391colHeaders.Height = Math.Min(_columnHeadersHeight, colHeaders.Height); 4393insideLeft.Height -= colHeaders.Height; 4469insideLeft.Height--; 5497rectScrollingArea.Height -= emptyBackgroundHeight; 5519rectScrollingArea.Height -= frozenVisibleRowsHeight; 6838rect.Height++; 7078columnRect.Height += height; 8313columnRect.Height += _layout.ColumnHeaders.Height; 10180_layout.Data.Height -= horizScrollBarHeight; 10203_layout.RowHeaders.Height -= horizScrollBarHeight; 10210_layout.Data.Height = oldDataHeight; 10270_layout.Data.Height -= horizScrollBarHeight; 14501rightArea.Height++; 16770gridRect.Height++; 16814focusRect.Height -= change; 16821focusRect.Height += change; 16841edge.Height = 1; 19220rcBelowRows.Height -= _layout.ColumnHeaders.Height; 19225rcBelowRows.Height--; 19229rcBelowRows.Height -= visibleRowsHeight; 19271rcNextRows.Height = gridBounds.Height - rcBelowRows.Height; 19304edge.Height = bounds.Height; 19348bandBounds.Height = cellBounds.Height = _columnHeadersHeight; 19532rc.Height -= columnHeadersHeight; 19591rowBounds.Height = Rows.SharedRow(indexTmp).GetHeight(indexTmp); 19594rowBounds.Height++; 19647rowBounds.Height = Rows.SharedRow(indexTmp).GetHeight(indexTmp); 19650rowBounds.Height++; 19690cellBounds.Height = _columnHeadersHeight; 19891cellBounds.Height++; 19892cellClip.Height++; 26347rowsRect.Height--; 26359rowsRect.Height -= frozenRowsThickness; 26383rowsRect.Height = 1; 29033bottomArea.Height -= bottomArea.Y - topEdge; 29101bottomArea.Height -= bottomArea.Y - topEdge;
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (5)
420s_rectThemeMargins.Height = DATAGRIDVIEWBUTTONCELL_themeMargin - rectContent.Bottom; 683valBounds.Height -= borderWidths.Bottom; 708valBounds.Height -= cellStyle.Padding.Vertical; 964valBounds.Height -= 2 * DATAGRIDVIEWBUTTONCELL_verticalTextMargin; 971valBounds.Height--;
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (7)
854rect.Height = (advancedBorderStyle.Bottom == DataGridViewAdvancedCellBorderStyle.None) ? 0 : 1; 857rect.Height++; 874rect.Height += OwningRow.DividerHeight; 3198bounds.Height -= dividerThickness; 3617rectPadding.Height = cellStyle.Padding.Top; 3620rectPadding.Height = cellStyle.Padding.Bottom; 3807borderAndPaddingWidths.Height += cellStyle.Padding.Bottom;
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (4)
1066valBounds.Height -= borderWidths.Bottom; 1132valBounds.Height -= cellStyle.Padding.Vertical; 1319checkBounds.Height++; 1338fullSize.Height++;
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (5)
768valBounds.Height -= borderWidths.Bottom; 789valBounds.Height -= cellStyle.Padding.Vertical; 851valBounds.Height -= rectThemeMargins.Y + rectThemeMargins.Height; 889valBounds.Height -= cellStyle.Padding.Vertical; 899valBounds.Height -= 2 * VerticalMargin;
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (9)
535borderAndPaddingWidths.Height += cellStyle.Padding.Bottom; 1333rectBottomSection.Height -= 21; 1916valBounds.Height -= borderWidths.Bottom; 1949valBounds.Height -= cellStyle.Padding.Vertical; 2201dropRect.Height++; 2265focusBounds.Height += 2; 2274focusBounds.Height -= 2; 2289valBounds.Height--; 2311textBounds.Height -= verticalTextMarginTop;
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (2)
390s_rectThemeMargins.Height = ThemeMargin - rectContent.Bottom; 541bounds.Height -= borderWidths.Bottom;
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (2)
748valBounds.Height -= borderWidths.Bottom; 772imageBounds.Height -= cellStyle.Padding.Vertical;
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (5)
908valBounds.Height -= borderWidths.Bottom; 935valBounds.Height -= cellStyle.Padding.Vertical; 945valBounds.Height -= VerticalTextMarginTop + VerticalTextMarginBottom; 948valBounds.Height -= VerticalTextMarginBottom; 1002focusBounds.Height += 2;
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.DataGridViewRowAccessibleObject.cs (2)
78rowRect.Height = 0; 82rowRect.Height = rowRectBottom - rowRect.Top;
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (5)
650valBounds.Height -= borderWidths.Bottom; 670valBounds.Height -= cellStyle.Padding.Vertical; 722valBounds.Height -= rectThemeMargins.X + rectThemeMargins.Width; 754valBounds.Height -= cellStyle.Padding.Vertical; 844valBounds.Height -= 2 * VerticalTextMargin;
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (6)
195editingControlBounds.Height = Math.Max(0, editingControlBounds.Height - DATAGRIDVIEWTEXTBOXCELL_verticalTextOffsetTop); 201editingControlBounds.Height++; 207editingControlBounds.Height = Math.Max(0, editingControlBounds.Height - DATAGRIDVIEWTEXTBOXCELL_verticalTextOffsetBottom); 673valBounds.Height -= borderWidths.Bottom; 703valBounds.Height -= cellStyle.Padding.Vertical; 726valBounds.Height -= verticalTextMarginTop + DATAGRIDVIEWTEXTBOXCELL_verticalTextMarginBottom;
System\Windows\Forms\Controls\DataGridView\DataGridViewTopLeftHeaderCell.cs (3)
237valBounds.Height -= borderWidths.Bottom; 293valBounds.Height -= cellStyle.Padding.Vertical; 302valBounds.Height -= 2 * DATAGRIDVIEWTOPLEFTHEADERCELL_verticalTextMargin;
System\Windows\Forms\Controls\GroupBox\GroupBoxRenderer.cs (4)
189textBounds.Height = measuredBounds.Height; 209boxBounds.Height -= font.Height / 2; 233clipMiddle.Height -= (textBounds.Bottom - boxBounds.Top); 292textBounds.Height = measuredBounds.Height;
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (1)
1463bounds.Height = _requestedHeight;
System\Windows\Forms\Controls\ListBoxes\ListBox.ItemAccessibleObject.cs (1)
74bounds.Height = visibleArea.Bottom - bounds.Top;
System\Windows\Forms\Controls\ListView\DrawListViewColumnHeaderEventArgs.cs (2)
104r.Height -= 1; 110r.Height -= 1;
System\Windows\Forms\Controls\ListView\ListView.cs (2)
5012rectInvalid.Height += rectInvalid.Y; 5022rectInvalid.Height += ClientRectangle.Bottom - rectInvalid.Bottom;
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (1)
370result.Height = (int)(imageSize.Height * ratio);
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (1)
1887rectangle.Height = s_cyDivider;
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.SnappableControl.cs (1)
42r.Height--;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\DropDownButton.DropDownButtonAdapter.cs (1)
50inside.Height -= 3;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (2)
1618rect.Height += 2; 1857rectPaint.Height--;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (5)
616rect.Height = propertyGridViewBottom - pt.Y; 1906rect.Height = RowHeight; 1975boundsScroll.Height = sizeWindow.Height - 2; 2006rect.Height = Size.Height - rect.Y - 1; 4373rect.Height -= 1;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (2)
435newBounds.Height = Math.Max(s_minDropDownSize.Height, _dragBaseRect.Height + (dragPoint.Y - _dragStart.Y)); 448newBounds.Height = _dragBaseRect.Height - delta;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridToolStripButton.cs (1)
33bounds.Height -= 1;
System\Windows\Forms\Controls\Splitter\Splitter.cs (4)
403bounds.Height = value; 407bounds.Height = value; 565r.Height = minWeight; 573r.Height = minWeight;
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (3)
745rect.Height -= gripheight; 4179gripRectangle.Height = displayRect.Height; 4196gripRectangle.Height = Grip.GripThickness;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownButton.ToolStripDropDownButtonInternalLayout.cs (1)
79options.Client.Height -= heightOfDropDown;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (2)
97rect.Height -= UpScrollButton.Height + UpScrollButton.Margin.Vertical + DownScrollButton.Height + DownScrollButton.Margin.Vertical; 136_imageMarginBounds.Height = Height;
System\Windows\Forms\Controls\ToolStrips\ToolStripHighContrastRenderer.cs (1)
340bounds.Height -= 1;
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.ToolStripMenuItemInternalLayout.cs (1)
97checkRectangle.Height = imageHeight;
System\Windows\Forms\Controls\ToolStrips\ToolStripOverflowButton.cs (1)
96bounds.Height = ParentInternal.Height;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.cs (1)
1030bounds.Height = ParentInternal.DisplayRectangle.Height;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelCell.cs (1)
323bounds.Height -= spaceToFree;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.cs (1)
565cachedBounds.Height = (spaceToFree < 0) ? minSize.Height + -spaceToFree : minSize.Height;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.HorizontalRowManager.cs (2)
59dragBounds.Height += dragBounds.Y - y; 67dragBounds.Height += (nextRowBounds.Height >> 2) + Row.Margin.Bottom + ToolStripPanel.RowsInternal[index + 1].Margin.Top;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.VerticalRowManager.cs (3)
36displayRect.Height = ToolStripPanel.ParentInternal.DisplayRectangle.Height - (ToolStripPanel.Margin.Vertical + ToolStripPanel.Padding.Vertical) - Row.Margin.Vertical; 40displayRect.Height = raftingDisplayRectangle.Height - Row.Margin.Vertical; 71dragBounds.Height += Row.Margin.Vertical + ToolStripPanel.Padding.Vertical + 5;
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (6)
699bounds.Height -= 4; /*shrink to accomodate 1PX line*/ 978beginGradient.Height = firstGradientWidth; 979endGradient.Height = secondGradientWidth + 1; 1009endGradient.Height -= 1; 1236overflowBoundsFill.Height = _overflowButtonWidth; 1465bounds.Height = Math.Max(0, bounds.Height - 6);
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemRenderer.cs (5)
250bounds.Height -= 1; 290bounds.Height = ((bounds.Height - 2/*number of pixels for border*/) / 4) * 4; // make sure height is an even interval of 4. 322bounds.Height = 3; 585bounds.Height -= 1; 662bounds.Height -= 1;
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (3)
551backRect.Height += 2; 566backRect.Height++; 572backRect.Height++;
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.cs (2)
146rect.Height /= 2; 185rectUp.Height /= 2;
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.UpDownButtonsAccessibleObject.DirectionButtonAccessibleObject.cs (1)
38bounds.Height /= 2;
System\Windows\Forms\Design\ComponentEditorForm.cs (1)
264bounds.Height = BUTTON_HEIGHT;
System\Windows\Forms\Form.cs (4)
3071bounds.Height = correct.Height; 3084bounds.Height += delta; 5198_restoredWindowBounds.Height = height; 5221_restoreBounds.Height = height;
System\Windows\Forms\Layout\CommonProperties.cs (3)
208bounds.Height = Math.Min(bounds.Height, value.Height); 232bounds.Height = Math.Max(bounds.Height, value.Height); 316originalBounds.Height = height;
System\Windows\Forms\Layout\Containers\SplitContainer.cs (4)
1380r.Height = Height; 1399r.Height = SplitterWidthInternal; 1574_splitterRect.Height = Height; 1581_splitterRect.Height = SplitterWidthInternal;
System\Windows\Forms\Layout\DefaultLayout.cs (2)
407remainingBounds.Height -= element.Bounds.Height; 419remainingBounds.Height -= element.Bounds.Height;
System\Windows\Forms\Layout\LayoutUtils.cs (8)
333withinThis.Height = alignThis.Height; 349withinThis.Height = alignThis.Height; 377rect.Height += padding.Vertical; 386rect.Height -= padding.Vertical; 519region1.Height = specifiedContent.Height; 521region2.Height -= specifiedContent.Height; 525region1.Height = specifiedContent.Height; 526region2.Height -= specifiedContent.Height;
System\Windows\Forms\Layout\TableLayout.cs (2)
1264cellBounds.Height = Math.Max(cellBounds.Height, 1); 1273elementBounds.Height = Math.Min(cellBounds.Height, elementBounds.Height);
System\Windows\Forms\Printing\PrintPreviewControl.cs (3)
431rect.Height = Math.Max(0, rect.Height - 1); 445rect.Height -= _hScrollBar.Height; 699box.Height--;
System\Windows\Forms\Rendering\ControlPaint.cs (4)
109result.Height = (int)((imageSize.Height * xRatio) + .5); 118result.Height = bounds.Height; 1418rectangle.Height--; 1503rectangle.Height--;
System\Windows\Forms\Rendering\TextExtensions.cs (1)
93bounds.Height -= bounds.Y;
System\Windows\Forms\Scrolling\ScrollableControl.cs (7)
206rect.Height = _displayRect.Height; 224displayRectangle.Height = Math.Max(displayRectangle.Height, AutoScrollMinSize.Height); 293display.Height = client.Height; 316fullClient.Height += SystemInformation.HorizontalScrollBarHeight; 320minClient.Height -= SystemInformation.HorizontalScrollBarHeight; 503clientToBe.Height -= SystemInformation.HorizontalScrollBarHeight; 1052_displayRect.Height = height;
System.Windows.Forms.Design (56)
System\Drawing\Design\ColorEditor.ColorPalette.cs (2)
126rect.Height = s_cellSizeY; 366Height = s_cellSizeY,
System\Drawing\Design\ColorEditor.ColorUI.cs (1)
312rectTabControl.Height -= rectTabControl.Y;
System\Drawing\Design\IconEditor.cs (1)
129rectangle.Height = icon.Height;
System\Drawing\Design\ImageEditor.cs (1)
178r.Height--;
System\Windows\Forms\Design\Behavior\NoResizeSelectionBorderGlyph.cs (1)
48hitBounds.Height += DesignerUtils.s_selectionBorderHitArea - DesignerUtils.s_selectionBorderSize;
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (7)
126rect.Height += _parentGridSize.Height - yDelta; 130rect.Height -= yDelta; 139rect.Height -= _parentGridSize.Height - yDelta; 144rect.Height += yDelta; 150rect.Height = Math.Max(rect.Height, _parentGridSize.Height); 679bounds.Height = Math.Max(minHeight, baseBounds.Height + pixelHeight); 697bounds.Height = Math.Max(minHeight, baseBounds.Height + yOffset);
System\Windows\Forms\Design\Behavior\SelectionBorderGlyph.cs (2)
46hitBounds.Height += DesignerUtils.s_selectionBorderHitArea - DesignerUtils.s_selectionBorderSize; 57hitBounds.Height += DesignerUtils.s_selectionBorderHitArea - DesignerUtils.s_selectionBorderSize;
System\Windows\Forms\Design\ComponentTray.cs (6)
1208_mouseDragWorkspace.Height = Math.Abs(end.Y - start.Y); 1343Height = Math.Abs(e.Y - _mouseDragStart.Y) 1997rc.Height = _cyIcon + 2 * WhiteSpace + sz.Height + 4 * _borderWidth; 2002rc.Height = Math.Max(_cyIcon, sz.Height) + 4 * _borderWidth; 2278rc.Height -= 2 * _borderWidth; 2294rc.Height -= _cyIcon;
System\Windows\Forms\Design\ControlDesigner.cs (2)
2249borderRectangle.Height -= 2; 2256textRect.Height -= (textRect.Y + marginY + penThickness);
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (1)
993bounds.Height -= 2 * OWNERDRAWITEMIMAGEBUFFER;
System\Windows\Forms\Design\DesignerUtils.cs (2)
492bounds.Height += 2 * offset; 496bounds.Height += 2 * offset;
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (3)
215bounds.Height -= 1; 222bounds.Height += margin.Vertical; 322_childInfo[controlIndex].MarginBounds.Height = size.Size;
System\Windows\Forms\Design\GroupBoxDesigner.cs (1)
81rectangle.Height++;
System\Windows\Forms\Design\OleDragDropHandler.cs (1)
416rectangle.Height = 5;
System\Windows\Forms\Design\PanelDesigner.cs (1)
40rc.Height--;
System\Windows\Forms\Design\ParentControlDesigner.cs (9)
507bounds.Height = size.Height; 1096adjustedRect.Height = dragRect.Height; 1173updatedRect.Height = ((dragRect.Y + dragRect.Height) / gridSize.Height) * gridSize.Height - updatedRect.Y; 1180updatedRect.Height = gridSize.Height; 1869offset.Height = minControlSize.Height; 1923_mouseDragOffset.Height = y - _mouseDragBase.Y; 1943_mouseDragOffset.Height += offset.Y; 1956_mouseDragOffset.Height = -_mouseDragOffset.Height; 2042paintRect.Height++;
System\Windows\Forms\Design\PictureBoxDesigner.cs (1)
54rc.Height--;
System\Windows\Forms\Design\SelectionUIHandler.cs (4)
77containerRect.Height = screen.Height; 108b.Height = bounds[i].Height; 362newBounds.Height = tempNewBounds.Height; 367newBounds.Height = tempNewBounds.Height;
System\Windows\Forms\Design\SelectionUIService.cs (5)
681_mouseDragOffset.Height = _mouseDragAnchor.Y - screenCoord.Y; 685_mouseDragOffset.Height = screenCoord.Y - _mouseDragAnchor.Y; 695delta.Height -= old.Height; 1082newOffset = offset with { Width = 0, Height = 0 }; 1086newOffset.Width = newOffset.Height = 0;
System\Windows\Forms\Design\SplitterDesigner.cs (1)
28rectangle.Height--;
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (1)
850rc.Height--;
System\Windows\Forms\Design\TabOrder.cs (1)
258convertedRectangle.Height = sz.Height + 2;
System\Windows\Forms\Design\ToolStripItemBehavior.cs (1)
163bounds.Height--;
System\Windows\Forms\Design\ToolStripPanelDesigner.cs (1)
243rc.Height--;
1210 references to Height
PresentationUI (6)
MS\Internal\Documents\RMPublishingDialog.RightsTable.cs (1)
1036cellBounds.Y + (cellBounds.Height - boxSize.Height) / 2);
MS\Internal\Documents\SignatureSummaryDialog.cs (5)
660bounds.Height - CellPadding.Top - CellPadding.Bottom 670bounds.Height - CellPadding.Top - CellPadding.Bottom 678bounds.Height - CellPadding.Top - CellPadding.Bottom 705bounds.Height - CellPadding.Top - CellPadding.Bottom 713bounds.Height - CellPadding.Top - CellPadding.Bottom
System.ComponentModel.TypeConverter (2)
System\Drawing\RectangleConverter.cs (2)
78intConverter.ConvertToString(context, culture, rect.Height) 90rect.X, rect.Y, rect.Width, rect.Height});
System.Drawing.Common.Tests (108)
mono\System.Imaging\MetafileTest.cs (2)
71Assert.Equal(4127, header.Bounds.Height); 194Assert.Equal(0, mh.Bounds.Height);
System\Drawing\BitmapTests.cs (4)
375Assert.Equal(rectangle.Height, clone.Height); 381for (int y = 0; y < rectangle.Height; y++) 411Assert.Equal(rectangle.Height, clone.Height); 1069Assert.Equal(rectangle.Height, data.Height);
System\Drawing\Imaging\ImageAttributesTests.cs (94)
70using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 77graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, clone); 94using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 99graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 103graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 147using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 152graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 157graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 171using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 179graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 183graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 187graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 202using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 210graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 273using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 281graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 298using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 308graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 312graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 316graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 342using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 348graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 365using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 371graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 392using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 398graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 421using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 427graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 482using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 487graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 495using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 500graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 508using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 513graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 537using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 543graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 551using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 557graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 581using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 586graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 594using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 599graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 607using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 612graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 638using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 645graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 669using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 676graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 684using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 692graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 717using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 726graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 734using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 743graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 751using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 760graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 785using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 792graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 800using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 807graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 815using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 821graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 848using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 855graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 863using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 870graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 904using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 910graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 930using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 936graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 960using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 966graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 1009using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 1016graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 1024using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 1031graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 1056using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 1062graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 1122using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 1130graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 1138using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 1146graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 1171using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 1176graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 1184using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 1189graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 1197using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 1202graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 1248using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 1254graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 1262using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 1268graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 1307using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height); 1322using Bitmap bitmap = new(_rectangle.Width, _rectangle.Height);
System\Drawing\RegionTests.cs (8)
1342Assert.Equal(expected, region.IsVisible(rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height)); 1343Assert.Equal(expected, region.IsVisible((float)rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height)); 1344Assert.Equal(expected, region.IsVisible(rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, s_graphic)); 1345Assert.Equal(expected, region.IsVisible(rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, disposedGraphics)); 1346Assert.Equal(expected, region.IsVisible(rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, null)); 1347Assert.Equal(expected, region.IsVisible((float)rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, s_graphic)); 1348Assert.Equal(expected, region.IsVisible((float)rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, disposedGraphics)); 1349Assert.Equal(expected, region.IsVisible((float)rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, null));
System.Drawing.Primitives (18)
System\Drawing\Rectangle.cs (17)
74readonly get => new Size(Width, Height); 146public readonly int Bottom => unchecked(Y + Height); 150/// or a <see cref='System.Drawing.Rectangle.Height'/> of 0. 167left.X == right.X && left.Y == right.Y && left.Width == right.Width && left.Height == right.Height; 223public readonly bool Contains(int x, int y) => X <= x && x < X + Width && Y <= y && y < Y + Height; 237(Y <= rect.Y) && (rect.Y + rect.Height <= Y + Height); 239public override readonly int GetHashCode() => HashCode.Combine(X, Y, Width, Height); 281Height = result.Height; 293int y2 = Math.Min(a.Y + a.Height, b.Y + b.Height); 308(rect.Y < Y + Height) && (Y < rect.Y + rect.Height); 318int y2 = Math.Max(a.Y + a.Height, b.Y + b.Height); 343public override readonly string ToString() => $"{{X={X},Y={Y},Width={Width},Height={Height}}}";
System\Drawing\RectangleF.cs (1)
323public static implicit operator RectangleF(Rectangle r) => new RectangleF(r.X, r.Y, r.Width, r.Height);
System.Private.Windows.Core (1)
System\Private\Windows\Core\BinaryFormat\BinaryFormatWriter.cs (1)
170value.Height).Write(writer);
System.Windows.Forms (755)
System\Windows\Forms\Accessibility\AccessibleObject.cs (3)
1062height = BoundingRectangle.Height, 1702*pcyHeight = bounds.Height; 1715*pcyHeight = bounds.Height;
System\Windows\Forms\Accessibility\LabelEditUiaTextProvider.cs (1)
201=> rect.IsEmpty || rect.Width <= 0 || rect.Height <= 0;
System\Windows\Forms\ActiveX\AxHost.cs (2)
1201if (oldBounds.X == x && oldBounds.Y == y && oldBounds.Width == width && oldBounds.Height == height) 1215if (width != oldBounds.Width || height != oldBounds.Height)
System\Windows\Forms\Control.cs (11)
1011set => SetBounds(value.X, value.Y, value.Width, value.Height, BoundsSpecified.All); 4905if (targetBounds.Width <= 0 || targetBounds.Height <= 0 4917int height = Math.Min(Height, targetBounds.Height); 5305int sh = bounds.Height; 5335int localHeight = bounds.Height - adornmentsBeforeDpiChange.Height; 8165e.Graphics.DrawRectangle(pen, rectangle.X, rectangle.Y, rectangle.Width - 1, rectangle.Height - 1); 8234rectangle.Height); 10073height = adjustedBounds.Height; 11748if (doubleBuffered && (clip.Width <= 0 || clip.Height <= 0)) 12636if (sizeProperty is not null && !sizeProperty.IsReadOnly && (bounds.Width != Width || bounds.Height != Height)) 12664SetBoundsCore(bounds.X, bounds.Y, bounds.Width, bounds.Height, specified);
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (1)
1183ShowToolTip = (ClientRectangle.Width < preferredSize.Width || ClientRectangle.Height < preferredSize.Height);
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (11)
139Point p3 = new(bounds.X, bounds.Y + bounds.Height - 1); // Bottom inner left 140Point p4 = new(bounds.X + bounds.Width - 1, bounds.Y + bounds.Height - 1); // Inner bottom right 194Point p3 = new(bounds.X, bounds.Y + bounds.Height - 1); // Bottom inner left 195Point p4 = new(bounds.X + bounds.Width - 1, bounds.Y + bounds.Height - 1); // Inner bottom right 242Point p3 = new(bounds.X, bounds.Y + bounds.Height - 1); // Bottom inner left 243Point p4 = new(bounds.X + bounds.Width - 1, bounds.Y + bounds.Height - 1); // Inner bottom right 330size = Math.Min(size, Math.Min(bounds.Width, bounds.Height)); 332Rectangle left = new(bounds.X, bounds.Y, size, bounds.Height); 333Rectangle right = new(bounds.X + bounds.Width - size, bounds.Y, size, bounds.Height); 335Rectangle bottom = new(bounds.X + size, bounds.Y + bounds.Height - size, bounds.Width - size * 2, size); 438graphics.DrawRectangle(pen, r.X, r.Y, r.Width - 1, r.Height - 1);
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.LayoutOptions.cs (15)
284layout.TextBounds.Height + 3); 293if (layout.Focus.Height % 2 == 0) 383layout.CheckBounds.Y = (field.Y + field.Height) - layout.CheckBounds.Height; 391layout.CheckBounds.Y = field.Y + (field.Height - layout.CheckBounds.Height) / 2; 403layout.CheckArea.Height = field.Height; 415layout.CheckArea.Height = field.Height; 434layout.CheckArea.Y = field.Y + field.Height - checkSizeFull; 580Math.Min(layout.TextBounds.Y, layout.Field.Y + (layout.Field.Height - layout.TextBounds.Height) / 2), 609Math.Min(maxBounds.Height - layout.TextBounds.Height, layout.ImageBounds.Height)); 610layout.TextBounds.Y = layout.ImageBounds.Y + layout.ImageBounds.Height;
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxBaseAdapter.cs (3)
299&& cacheCheckImage.Height == fullSize.Height) 307RECT rcCheck = new Rectangle(0, 0, fullSize.Width, fullSize.Height); 308Bitmap bitmap = new(fullSize.Width, fullSize.Height);
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxUiaTextProvider.cs (1)
262=> rect.IsEmpty || rect.Width <= 0 || rect.Height <= 0;
System\Windows\Forms\Controls\ComboBox\ComboBox.FlatComboAdapter.cs (9)
35_outerBorder = new Rectangle(_clientRect.Location, new Size(_clientRect.Width - 1, _clientRect.Height - 1)); 36_innerBorder = new Rectangle(_outerBorder.X + 1, _outerBorder.Y + 1, _outerBorder.Width - dropDownButtonWidth - 2, _outerBorder.Height - 2); 37_innerInnerBorder = new Rectangle(_innerBorder.X + 1, _innerBorder.Y + 1, _innerBorder.Width - 2, _innerBorder.Height - 2); 38_dropDownRect = new Rectangle(_innerBorder.Right + 1, _innerBorder.Y, dropDownButtonWidth, _innerBorder.Height + 1); 95new Rectangle(_outerBorder.X, _outerBorder.Y, _dropDownRect.Width + 1, _outerBorder.Height)); 101new Rectangle(_dropDownRect.X, _outerBorder.Y, _outerBorder.Right - _dropDownRect.X, _outerBorder.Height)); 143new Rectangle(_outerBorder.X, _outerBorder.Y, _dropDownRect.Width + 1, _outerBorder.Height)); 149new Rectangle(_dropDownRect.X, _outerBorder.Y, _outerBorder.Right - _dropDownRect.X, _outerBorder.Height)); 167Point middle = new(dropDownRect.Left + dropDownRect.Width / 2, dropDownRect.Top + dropDownRect.Height / 2);
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (2)
462_horizScrollBar.Top = ClientRectangle.Height - _horizScrollBar.Height; 2542int displayHeight = _layout.Data.Height;
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (79)
495int displayHeight = _layout.Data.Height; 940&& _layout.Data.Height > totalVisibleFrozenHeight 1321int displayHeight = _layout.Data.Height; 2019? TopLeftHeaderCell.GetPreferredWidth(-1, _layout.TopLeftHeader.Height) 2040int displayHeight = _layout.Data.Height, cy = 0; 2181? TopLeftHeaderCell.GetPreferredWidth(-1, _layout.TopLeftHeader.Height) 2202int displayHeight = _layout.Data.Height, cy = 0; 2778clip.Height = _layout.Data.Y + _layout.Data.Height - topEdge - 1; 2983inside.Height); 2993inside.Height); 3008inside.Height); 4275int displayHeight = _layout.Data.Height - totalVisibleFrozenHeight; 4368newLayout.Inside = _normalClientRectangle.Width > 0 || _normalClientRectangle.Height > 0 4375if (inside.Height < 0) 4391colHeaders.Height = Math.Min(_columnHeadersHeight, colHeaders.Height); 4392insideLeft.Y += colHeaders.Height; 4393insideLeft.Height -= colHeaders.Height; 4394Debug.Assert(insideLeft.Height >= 0); 4467if (insideLeft.Height > 0) 4480Debug.Assert(newLayout.Data.Height >= 0); 4550_vertScrollBar.LargeChange = _layout.Data.Height - totalVisibleFrozenHeight; 4774int displayHeight = _layout.Data.Height; 5638Rectangle rectInsertionBar = new(0, _layout.ColumnHeaders.Top, InsertionBarWidth, _layout.ColumnHeaders.Height); 5714PInvoke.PatBlt(dc, r.X, r.Y + r.Height - DATAGRIDVIEW_shadowEdgeThickness, r.Width, DATAGRIDVIEW_shadowEdgeThickness, ROP_CODE.PATINVERT); 5715PInvoke.PatBlt(dc, r.X, r.Y + DATAGRIDVIEW_shadowEdgeThickness, DATAGRIDVIEW_shadowEdgeThickness, r.Height - 2 * DATAGRIDVIEW_shadowEdgeThickness, ROP_CODE.PATINVERT); 5716PInvoke.PatBlt(dc, r.X + r.Width - DATAGRIDVIEW_shadowEdgeThickness, r.Y + DATAGRIDVIEW_shadowEdgeThickness, DATAGRIDVIEW_shadowEdgeThickness, r.Height - 2 * DATAGRIDVIEW_shadowEdgeThickness, ROP_CODE.PATINVERT); 5731PInvoke.PatBlt(dc, r.X, r.Y, r.Width, r.Height, ROP_CODE.PATINVERT); 6401int displayHeight = _layout.Data.Height; 6428int maxDisplayedRows = rectScreen.Height / DataGridViewBand.MinBandThickness; 8308? new Rectangle(cx - displayWidth, data.Y, displayWidth, data.Height) 8309: new Rectangle(cx, data.Y, displayWidth, data.Height); 8313columnRect.Height += _layout.ColumnHeaders.Height; 8314columnRect.Y -= _layout.ColumnHeaders.Height; 8573int emptyBackgroundHeight = Math.Max(0, _layout.Data.Height - frozenVisibleRowsHeight - trailingScrollingRowsHeight); 9327else if (_layout.TopLeftHeader.Top + _layout.TopLeftHeader.Height - y < RowSizingHotZone) 9333hti._mouseBarOffset = _layout.TopLeftHeader.Top + _layout.TopLeftHeader.Height - y - 1; 10177&& horizScrollBarHeight <= _layout.Data.Height) 10179int oldDataHeight = _layout.Data.Height; 10181Debug.Assert(_layout.Data.Height >= 0); 10204Debug.Assert(_layout.RowHeaders.Height >= 0); 10221&& _layout.Data.Height > totalVisibleFrozenHeight 10252&& horizScrollBarHeight <= _layout.Data.Height) 10271Debug.Assert(_layout.Data.Height >= 0); 10278&& _layout.Data.Height > totalVisibleFrozenHeight 10348int vertScrollBarHeight = _layout.Data.Height; 10352vertScrollBarHeight += _layout.ColumnHeaders.Height; 10364_vertScrollBar.LargeChange = _layout.Data.Height - totalVisibleFrozenHeight; 14504if (rightArea.Width > 0 && rightArea.Height > 0) 14517if (rightArea.Width > 0 && rightArea.Height > 0) 16845edge.Y += rect.Height - 1; 17452oldClientRectangle.Height); 17454oldClientRectangle.Y + oldClientRectangle.Height - borderWidth, 17474newClientRectangle.Height); 17478if (newClientRectangle.Height != oldClientRectangle.Height) 17482newClientRectangle.Y + newClientRectangle.Height - borderWidth, 17494oldGridFocusRectangle.Height); 17498oldGridFocusRectangle.Y + oldGridFocusRectangle.Height - 1, 19219rcBelowRows.Y += _layout.ColumnHeaders.Height; 19220rcBelowRows.Height -= _layout.ColumnHeaders.Height; 19230if (rcBelowRows.Width > 0 && rcBelowRows.Height > 0) 19269if (rcBelowRows.Height > 0) 19271rcNextRows.Height = gridBounds.Height - rcBelowRows.Height; 19274if (rcNextRows.Width > 0 && rcNextRows.Height > 0) 19298edge.Y = bounds.Height - borderWidth; 19304edge.Height = bounds.Height; 19323g.DrawRectangle(pen, new Rectangle(0, 0, bounds.Width - 1, bounds.Height - 1)); 19333g.DrawRectangle(pen, new Rectangle(0, 0, bounds.Width - 1, bounds.Height - 1)); 19530int columnHeadersHeight = _layout.ColumnHeaders.Height; 19540if (rc.Height > 0) 19613cy += rowBounds.Height; 19614if (cy >= boundingRect.Height) 19624if (DisplayedBandsInfo.FirstDisplayedScrollingRow >= 0 && cy < boundingRect.Height) 19669cy += rowBounds.Height; 19670if (cy >= boundingRect.Height) 19817if (editingZone.Width == 0 || editingZone.Height == 0) 19860if (cellClip.Width == 0 || cellClip.Height == 0) 26360Debug.Assert(rowsRect.Height >= 0);
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (7)
295int borderAndPaddingHeights = borderWidthsRect.Top + borderWidthsRect.Height + cellStyle.Padding.Vertical; 311marginHeights = rectThemeMargins.Y + rectThemeMargins.Height; 685if (valBounds.Height <= 0 || valBounds.Width <= 0) 713if (valBounds.Height > 0 && valBounds.Width > 0 && (paint || computeContentBounds)) 875Debug.Assert(valBounds.Height <= 0 || valBounds.Width <= 0); 885valBounds.Height > 2 * SystemInformation.Border3DSize.Height + 1) 974if (valBounds.Width > 0 && valBounds.Height > 0)
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (18)
1017cellValueBounds.Height >= IconMarginHeight * 2 + s_iconsHeight) 1022cellValueBounds.Y + (cellValueBounds.Height - s_iconsHeight) / 2, 2774if (preferredHeight > contentBounds.Height || widthTruncated) 3165bounds.Height); 3182if (dividerThickness > bounds.Height) 3184dividerThickness = bounds.Height; 3199if (bounds.Height <= 0) 3538cellValueBounds.Height >= IconMarginHeight * 2 + s_iconsHeight) 3566cellValueBounds.Height >= IconMarginHeight * 2 + s_iconsHeight) 3569if (iconBounds.Width >= IconMarginWidth && iconBounds.Height >= s_iconsHeight) 3598rectPadding = new Rectangle(bounds.X, bounds.Y, cellStyle.Padding.Right, bounds.Height); 3607rectPadding = new Rectangle(bounds.X, bounds.Y, cellStyle.Padding.Left, bounds.Height); 3772DataGridView.EditingControl.Size = new Size(editingControlBounds.Width, editingControlBounds.Height); 3810int yEditingPanel, hEditingPanel = cellBounds.Height; 3846if (cellClip.Bottom <= cellBounds.Bottom - borderAndPaddingWidths.Height) 3852hEditingPanel -= borderAndPaddingWidths.Height; 3856hEditingControl = cellBounds.Height - borderAndPaddingWidths.Y - borderAndPaddingWidths.Height;
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (7)
651int borderAndPaddingHeights = borderWidthsRect.Top + borderWidthsRect.Height + cellStyle.Padding.Vertical; 1199if (valBounds.Width >= checkBoxSize.Width && valBounds.Height >= checkBoxSize.Height && (paint || computeContentBounds)) 1224checkBoxY = valBounds.Top + (valBounds.Height - checkBoxSize.Height) / 2; 1340if (s_checkImage is null || s_checkImage.Width != fullSize.Width || s_checkImage.Height != fullSize.Height) 1350RECT rcCheck = new Rectangle(0, 0, fullSize.Width, fullSize.Height); 1351Bitmap bitmap = new(fullSize.Width, fullSize.Height); 1548Debug.Assert(valBounds.Width < checkBoxSize.Width || valBounds.Height < checkBoxSize.Height, "the bounds are empty");
System\Windows\Forms\Controls\DataGridView\DataGridViewColumn.cs (1)
971int displayHeight = dataGridView.LayoutInfo.Data.Height;
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (16)
499int borderAndPaddingHeights = borderWidthsRect.Top + borderWidthsRect.Height + cellStyle.Padding.Vertical; 698preferredSize.Height += rectThemeMargins.Y + rectThemeMargins.Height; 794if (paint && PaintBackground(paintParts) && backgroundBounds.Width > 0 && backgroundBounds.Height > 0) 832bmFlipXPThemes.Height < backgroundBounds.Height || bmFlipXPThemes.Height > 2 * backgroundBounds.Height) 834bmFlipXPThemes = FlipXPThemesBitmap = new Bitmap(backgroundBounds.Width, backgroundBounds.Height); 838DataGridViewColumnHeaderCellRenderer.DrawHeader(gFlip, new Rectangle(0, 0, backgroundBounds.Width, backgroundBounds.Height), state); 840g.DrawImage(bmFlipXPThemes, backgroundBounds, new Rectangle(bmFlipXPThemes.Width - backgroundBounds.Width, 0, backgroundBounds.Width, backgroundBounds.Height), GraphicsUnit.Pixel); 851valBounds.Height -= rectThemeMargins.Y + rectThemeMargins.Height; 865if (paint && PaintBackground(paintParts) && backgroundBounds.Width > 0 && backgroundBounds.Height > 0) 902valBounds.Height > 0 && 934if (preferredHeight <= valBounds.Height && !widthTruncated) 951(valBounds.Height - s_sortGlyphHeight) / 2); 960(valBounds.Height - s_sortGlyphHeight) / 2); 994valBounds.Height >= s_sortGlyphHeight) 998valBounds.Top + (valBounds.Height - s_sortGlyphHeight) / 2);
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (31)
538size.Height - borderAndPaddingWidths.Y - borderAndPaddingWidths.Height); 1178int borderAndPaddingHeights = borderWidthsRect.Top + borderWidthsRect.Height + cellStyle.Padding.Vertical; 1932if (paint && PaintBackground(paintParts) && !brushColor.HasTransparency() && valBounds.Width > 0 && valBounds.Height > 0) 1952if (paint && valBounds.Width > 0 && valBounds.Height > 0) 1958g.FillRectangle(brush!, valBounds.Left, valBounds.Top, valBounds.Width, valBounds.Height); 1974PaintBackground(paintParts) && !brushColor.HasTransparency() && valBounds.Width > 2 && valBounds.Height > 2) 1976g.FillRectangle(brush!, valBounds.Left + 1, valBounds.Top + 1, valBounds.Width - 2, valBounds.Height - 2); 1983g.DrawRectangle(SystemPens.ControlLightLight, new Rectangle(valBounds.X, valBounds.Y, valBounds.Width - 1, valBounds.Height - 1)); 1987g.FillRectangle(brush!, valBounds.Left, valBounds.Top, valBounds.Width, valBounds.Height); 1999dropHeight = Math.Min(GetDropDownButtonHeight(g, cellStyle), paintPostXPThemes ? valBounds.Height : valBounds.Height - 2); 2003dropHeight = Math.Min(GetDropDownButtonHeight(g, cellStyle), valBounds.Height - 4); 2098dropRect.X, dropRect.Y + dropRect.Height - 1); 2104g.DrawLine(pen, valBounds.X, valBounds.Y + valBounds.Height - 1, 2105valBounds.X + valBounds.Width - 1, valBounds.Y + valBounds.Height - 1); 2107valBounds.X + valBounds.Width - 1, valBounds.Y + valBounds.Height - 1); 2115g.DrawLine(pen, dropRect.X, dropRect.Y + dropRect.Height - 1, 2116dropRect.X + dropRect.Width - 1, dropRect.Y + dropRect.Height - 1); 2118dropRect.X + dropRect.Width - 1, dropRect.Y + dropRect.Height - 1); 2127valBounds.X, valBounds.Y + valBounds.Height - 1); 2137dropRect.X + 1, dropRect.Y + dropRect.Height - 2); 2144g.DrawLine(pen, dropRect.X + 1, dropRect.Y + dropRect.Height - 2, 2145dropRect.X + dropRect.Width - 2, dropRect.Y + dropRect.Height - 2); 2147dropRect.X + dropRect.Width - 2, dropRect.Y + dropRect.Height - 2); 2155Point middle = new(dropRect.Left + dropRect.Width / 2, dropRect.Top + dropRect.Height / 2); 2159middle.Y += (dropRect.Height % 2); 2179dropRect.Top + (dropRect.Height + s_nonXPTriangleHeight) / 2); 2183middle.Y += (dropRect.Height % 2); 2245if (textBounds.Width > 1 && textBounds.Height > 1) 2275if (focusBounds.Width > 0 && focusBounds.Height > 0) 2313if (textBounds.Width > 0 && textBounds.Height > 0)
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (1)
394s_rectThemeMargins.Y + s_rectThemeMargins.Width + s_rectThemeMargins.Height == 0)
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (10)
411int borderAndPaddingHeights = borderWidthsRect.Top + borderWidthsRect.Height + cellStyle.Padding.Vertical; 588if (imgWidth * bounds.Height < imgHeight * bounds.Width) 594decimal.ToInt32((decimal)imgWidth * bounds.Height / imgHeight), 595bounds.Height); 658imageBounds.Y = bounds.Y + (bounds.Height - imageBounds.Height) / 2; 664imageBounds.Y = bounds.Bottom - imageBounds.Height; 750if (valBounds.Width <= 0 || valBounds.Height <= 0 || (!paint && !computeContentBounds)) 760Debug.Assert(valBounds.Height <= 0 || valBounds.Width <= 0); 785if (imageBounds.Width <= 0 || imageBounds.Height <= 0 || (icon is null && image is null))
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (4)
552int borderAndPaddingHeights = borderWidthsRect.Top + borderWidthsRect.Height + cellStyle.Padding.Vertical; 977if (valBounds.Width > 0 && valBounds.Height > 0) 1041errorBounds.Height > 0) 1056valBounds.Height > 0)
System\Windows\Forms\Controls\DataGridView\DataGridViewRowCollection.cs (8)
1996GetRowsHeightExceedLimit(DataGridViewElementStates.Visible, 0, rowIndex, DataGridView.LayoutInfo.Data.Height); 2001useRowShortcut = GetRowsHeightExceedLimit(DataGridViewElementStates.Visible, 0, rowIndex, DataGridView.LayoutInfo.Data.Height + DataGridView.VerticalScrollingOffset) && 2002firstDisplayedRowHeight <= DataGridView.LayoutInfo.Data.Height; 2013useRowShortcut = DataGridView.LayoutInfo.Data.Height < displayedRowsHeightBeforeAddition && 2014firstDisplayedRowHeight <= DataGridView.LayoutInfo.Data.Height; 2041GetRowsHeightExceedLimit(DataGridViewElementStates.Visible, 0, rowIndex, DataGridView.LayoutInfo.Data.Height + SystemInformation.HorizontalScrollBarHeight); 2053useRowShortcut = GetRowsHeightExceedLimit(DataGridViewElementStates.Visible, 0, rowIndex, DataGridView.LayoutInfo.Data.Height + DataGridView.VerticalScrollingOffset + SystemInformation.HorizontalScrollBarHeight) && 2054firstDisplayedRowHeight <= DataGridView.LayoutInfo.Data.Height;
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (16)
531int borderAndPaddingHeights = borderWidthsRect.Top + borderWidthsRect.Height + cellStyle.Padding.Vertical; 540borderAndPaddingWidths += rectThemeMargins.Height; 673if (backgroundBounds.Width > 0 && backgroundBounds.Height > 0) 698using Bitmap bmFlipXPThemes = new(backgroundBounds.Height, backgroundBounds.Width); 700DataGridViewRowHeaderCellRenderer.DrawHeader(gFlip, new Rectangle(0, 0, backgroundBounds.Height, backgroundBounds.Width), state); 706new Rectangle(0, 0, backgroundBounds.Width, backgroundBounds.Height), 714valBounds.X += rectThemeMargins.Height; 721valBounds.Width -= rectThemeMargins.Y + rectThemeMargins.Height; 729if (valBounds.Width > 0 && valBounds.Height > 0) 760if (valBounds.Width > 0 && valBounds.Height > 0) 768&& valBounds.Height >= s_iconsHeight + 2 * RowHeaderIconMarginHeight) 837Debug.Assert(valBounds.Height >= 0); 845if (valBounds.Width > 0 && valBounds.Height > 0) 851Size maxBounds = new(valBounds.Width - s_iconsWidth - 2 * RowHeaderIconMarginWidth, valBounds.Height); 924valBounds.Height >= s_iconsHeight + 2 * RowHeaderIconMarginHeight) 1028int height = bounds.Y + (bounds.Height - s_iconsHeight) / 2;
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (9)
195editingControlBounds.Height = Math.Max(0, editingControlBounds.Height - DATAGRIDVIEWTEXTBOXCELL_verticalTextOffsetTop); 207editingControlBounds.Height = Math.Max(0, editingControlBounds.Height - DATAGRIDVIEWTEXTBOXCELL_verticalTextOffsetBottom); 230if (preferredHeight < editingControlBounds.Height) 242editingControlBounds.Y += (editingControlBounds.Height - preferredHeight) / 2; 247editingControlBounds.Y += editingControlBounds.Height - preferredHeight; 404int borderAndPaddingHeights = borderWidthsRect.Top + borderWidthsRect.Height + cellStyle.Padding.Vertical; 679bool notCollapsed = valBounds.Width > 0 && valBounds.Height > 0; 727if (valBounds.Width > 0 && valBounds.Height > 0) 799DataGridView.EditingControl.Size = new Size(editingControlBounds.Width, editingControlBounds.Height);
System\Windows\Forms\Controls\DataGridView\DataGridViewTopLeftHeaderCell.cs (2)
147int borderAndPaddingHeights = borderWidthsRect.Top + borderWidthsRect.Height + cellStyle.Padding.Vertical; 304valBounds.Height > 0 &&
System\Windows\Forms\Controls\DataGridView\DataGridViewUtilities.cs (4)
329Size sizeCell = new(cellBounds.Width, cellBounds.Height); 408ptTextLocation.Y = cellBounds.Y + (cellBounds.Height - sizeText.Height) / 2; 413ptTextLocation.Y = cellBounds.Y + (cellBounds.Height - sizeText.Height) / 2; 418ptTextLocation.Y = cellBounds.Y + (cellBounds.Height - sizeText.Height) / 2;
System\Windows\Forms\Controls\GroupBox\GroupBoxRenderer.cs (18)
185new Size(textBounds.Width, textBounds.Height), 253g.DrawLine(light, bounds.Left + 1, bounds.Top + 1, bounds.Left + 1, bounds.Height - 1); 254g.DrawLine(dark, bounds.Left, bounds.Top + 1, bounds.Left, bounds.Height - 2); 257g.DrawLine(light, bounds.Left, bounds.Height - 1, bounds.Width - 1, bounds.Height - 1); 258g.DrawLine(dark, bounds.Left, bounds.Height - 2, bounds.Width - 1, bounds.Height - 2); 265g.DrawLine(light, bounds.Width - 1, bounds.Top, bounds.Width - 1, bounds.Height - 1); 266g.DrawLine(dark, bounds.Width - 2, bounds.Top, bounds.Width - 2, bounds.Height - 2); 288new Size(textBounds.Width, textBounds.Height), 321bounds.Left, boxTop - 1, bounds.Left, bounds.Height - 2, // Left 322bounds.Left, bounds.Height - 2, bounds.Width - 1, bounds.Height - 2, // Right 325bounds.Width - 2, boxTop - 1, bounds.Width - 2, bounds.Height - 2 // Right 333bounds.Left + 1, boxTop, bounds.Left + 1, bounds.Height - 1, // Left 334bounds.Left, bounds.Height - 1, bounds.Width, bounds.Height - 1, // Right 337bounds.Width - 1, boxTop, bounds.Width - 1, bounds.Height - 1 // Right
System\Windows\Forms\Controls\Labels\Label.cs (4)
891yLoc = (r.Y + r.Height - 4) - pointImageSize.Height; 899yLoc = r.Y + (r.Height - pointImageSize.Height) / 2; 1272Size preferredSize = GetPreferredSize(new Size(clientRect.Width, clientRect.Height)); 1273_showToolTip = (clientRect.Width < preferredSize.Width || clientRect.Height < preferredSize.Height);
System\Windows\Forms\Controls\Labels\LinkLabel.cs (10)
391yLoc = clientRect.Bottom - textRect.Height; 395yLoc = (clientRect.Height - textRect.Height) / 2; 413if (textRect.Height > clientRect.Height) 416height = clientRect.Height; 420height = textRect.Height; 557Size clientSize = new(clientRectWithPadding.Width, clientRectWithPadding.Height); 987Size preferredSize = GetPreferredSize(new Size(clientRect.Width, clientRect.Height)); 988_showToolTip = clientRect.Width < preferredSize.Width || clientRect.Height < preferredSize.Height;
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (6)
535if (centeringFactor + _idealCheckSize > bounds.Height) 537centeringFactor = bounds.Height - _idealCheckSize; 573bounds.Height); 630textBounds.Height - 2 * BORDER_SIZE); // minus borders 715e.Bounds.Width > 2 * BORDER_SIZE && e.Bounds.Height > 2 * BORDER_SIZE) 723bounds.Height - 2 * BORDER_SIZE); // Upper and lower borders.
System\Windows\Forms\Controls\ListBoxes\ListBox.ItemAccessibleObject.cs (1)
219int listBoxHeight = _owningListBox.ClientRectangle.Height;
System\Windows\Forms\Controls\ListView\ListViewItem.IKeyboardToolTip.cs (3)
103_ => new Rectangle(point, new Size(itemBounds.Width, itemBounds.Height)), 115itemBounds.Height)); 131return new Rectangle(point, new Size(Math.Min(textWidth, itemBounds.Width), itemBounds.Height));
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemBaseAccessibleObject.cs (1)
46_owningItem.Bounds.Height);
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemListAccessibleObject.cs (1)
24_owningItem.Bounds.Height);
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObject.cs (1)
66width, bounds.Height);
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (1)
1671if (height != oldBounds.Height)
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (4)
362result.Y += (result.Height - _image.Height) / 2; 368float ratio = Math.Min(ClientRectangle.Width / (float)imageSize.Width, ClientRectangle.Height / (float)imageSize.Height); 372result.Y = (ClientRectangle.Height - result.Height) / 2;
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (5)
1960y = Math.Min((rectTarget.Y + rectTarget.Height - 15), y); 1970if (rc.Width < rc.Height) 1974ControlPaint.DrawReversibleLine(new Point(rc.X + i, rc.Y), new Point(rc.X + i, rc.Y + rc.Height), targetControl.BackColor); 1979for (int i = 0; i < rc.Height; i++) 2828int yNew = rectDoc.Height + rectDoc.Y - _dividerMoveY - (s_cyDivider / 2);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CategoryGridEntry.cs (1)
121Rectangle focusRect = new(indent, rect.Y, labelWidth + 3, rect.Height - 1);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (14)
1549g.FillRectangle(backBrush, borderWidth - 1, rect.Y, totalWidth - borderWidth + 3, rect.Height); 1553g.DrawLine(linePen, totalWidth, rect.Y, totalWidth, rect.Height); 1561g.FillRectangle(backBrush, rect.X, rect.Y, rect.Width, rect.Height); 1566g.FillRectangle(stripeBrush, rect.X, rect.Y, borderWidth, rect.Height); 1573stringX, rect.Y, rect.Width - stringX - 1, rect.Height); 1577Rectangle textRect = new(stringX, rect.Y + 1, maxSpace, rect.Height - 1); 1715using HBITMAP compatibleBitmap = PInvokeCore.CreateBitmap(rectangle.Width, rectangle.Height, (uint)planes, (uint)bitsPixel, lpBits: null); 1719compatibleDC.HDC.FillRectangle(new Rectangle(0, 0, rectangle.Width, rectangle.Height), brush); 1720explorerTreeRenderer.DrawBackground(compatibleDC, new Rectangle(0, 0, rectangle.Width, rectangle.Height), hwnd); 1756g.DrawRectangle(pen, outline.X, outline.Y, outline.Width - 1, outline.Height - 1); 1763outline.Y + outline.Height / 2, 1765outline.Y + outline.Height / 2); 1775outline.Y + outline.Height - indent - 1); 1909rect.Height);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\HelpPane.cs (1)
126_lastClientRectangle.Height));
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyDescriptorGridEntry.cs (1)
538(rect.Height - s_imageSize) / 2,
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (17)
457return new Point(point.X + (rect.Width / 2), point.Y + (rect.Height / 2)); 614if (pt.Y + rect.Height > propertyGridViewBottom) 619return new Rectangle(pt.X, pt.Y, rect.Width, rect.Height); 895control.SetBounds(targetRectangle.X, targetRectangle.Y, targetRectangle.Width, targetRectangle.Height); 1428if (rectScreen.Y + rectScreen.Height < (size.Height + location.Y + EditTextBox.Height)) 1435location.Y += rect.Height + 1; 1968Size sizeWindow = new(rect.Width, rect.Height); 3272Point endPosition = FindPosition(clipRect.X, clipRect.Y + clipRect.Height); 3328yPosition = rect.Y + rect.Height; 3577int yDelta = _lastClientRect == Rectangle.Empty ? 0 : newRect.Height - _lastClientRect.Height; 3583Rectangle rectInvalidate = new(_lastClientRect.Width - 1, 0, newRect.Width - _lastClientRect.Width + 1, _lastClientRect.Height); 3589Rectangle rectInvalidate = new(0, _lastClientRect.Height - 1, _lastClientRect.Width, newRect.Height - _lastClientRect.Height + 1); 3965if (entry.OutlineRectangle.Height != outlineRectIconSize || entry.OutlineRectangle.Width != outlineRectIconSize) 4327sizeBtn.Width, rect.Height);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (3)
435newBounds.Height = Math.Max(s_minDropDownSize.Height, _dragBaseRect.Height + (dragPoint.Y - _dragStart.Y)); 445if ((_dragBaseRect.Height - delta) > s_minDropDownSize.Height) 448newBounds.Height = _dragBaseRect.Height - delta;
System\Windows\Forms\Controls\Splitter\Splitter.cs (9)
406bounds.Y += bounds.Height - _splitSize; 420OnSplitterMoved(new SplitterEventArgs(Left, Top, (Left + bounds.Width / 2), (Top + bounds.Height / 2))); 563if (r.Height < minWeight) 571if (r.Height < minWeight) 576r.Y = bounds.Y + bounds.Height - splitSize - r.Height; 613DockStyle.Top or DockStyle.Bottom => r.Height, 637_initTargetSize = target.Bounds.Height; 702PInvoke.PatBlt(dc, r.X, r.Y, r.Width, r.Height, ROP_CODE.PATINVERT);
System\Windows\Forms\Controls\TabControl\TabPage.cs (2)
620inflateRect.Height + 6); 736base.SetBoundsCore(r.X, r.Y, r.Width, r.Height, specified == BoundsSpecified.None ? BoundsSpecified.None : BoundsSpecified.All);
System\Windows\Forms\Controls\TextBox\TextBoxBase.TextBoxBaseUiaTextProvider.cs (2)
259return fontHeight != 0 ? (int)Math.Ceiling(((double)rect.Height) / fontHeight) : 0; 396=> rect.IsEmpty || rect.Width <= 0 || rect.Height <= 0;
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (1)
495TableLayoutSettings.RowStyles[0].Height = Math.Max(0, DisplayRectangle.Height);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (6)
202CommonProperties.UpdateSpecifiedBounds(this, bounds.X, bounds.Y, bounds.Width, bounds.Height, BoundsSpecified.Location); 2370maxSize.Height += overflowItemMargin.Vertical + overflowItem.Bounds.Height; 2652using Bitmap image = new(bounds.Width, bounds.Height); 2669bounds.Height, 4179gripRectangle.Height = displayRect.Height; 4657SetBoundsCore(bounds.X, bounds.Y, bounds.Width, bounds.Height, specified);
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.ToolStripComboBoxControl.ToolStripComboBoxFlatComboAdapter.cs (1)
142Point middle = new(dropDownRect.Left + dropDownRect.Width / 2, dropDownRect.Top + dropDownRect.Height / 2);
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.cs (3)
43CommonProperties.UpdateSpecifiedBounds(c, bounds.X, bounds.Y, bounds.Width, bounds.Height); 364CommonProperties.UpdateSpecifiedBounds(_control, specifiedBounds.X, specifiedBounds.Y, specifiedBounds.Width, specifiedBounds.Height); 375CommonProperties.UpdateSpecifiedBounds(_control, bounds.X, bounds.Y, bounds.Width, bounds.Height);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (5)
1029offset.Y = -dropDownBounds.Height; 1032offset.Y = -dropDownBounds.Height; 1202SetBoundsCore(bounds.X, bounds.Y, bounds.Width, bounds.Height, BoundsSpecified.Location); 1528base.SetBoundsCore(bounds.X, bounds.Y, bounds.Width, bounds.Height, specified); 1765if (bounds.Width > 0 && bounds.Height > 0)
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownButton.ToolStripDropDownButtonInternalLayout.cs (3)
42preferredSize.Height += DropDownArrowRect.Height + _dropDownArrowPadding.Vertical; 66_dropDownArrowRect = new Rectangle(_dropDownArrowPadding.Left, 0, s_dropDownArrowSize.Width, _ownerItem.Bounds.Height); 71_dropDownArrowRect = new Rectangle(options.Client.Right, 0, s_dropDownArrowSize.Width, _ownerItem.Bounds.Height);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownItem.cs (3)
308offset.Y = -dropDownBounds.Height + 1; 311offset.Y = -dropDownBounds.Height + 1; 386if (Rectangle.Intersect(dropDownBounds, itemScreenBounds).Height > 1)
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (6)
325maxNonMenuItemSize.Height = Math.Max(item.Bounds.Height, maxNonMenuItemSize.Height); 457_textRectangle.Y += (_textRectangle.Height % 2); // if the height is odd, push down by one px 477delta = nextItem.Bounds.Bottom - (displayRect.Y + displayRect.Height); 679deltaToScroll += Items[i].Bounds.Height; 706deltaToScroll -= Items[i].Bounds.Height; 801int height = GetDropDownBounds(Bounds).Height;
System\Windows\Forms\Controls\ToolStrips\ToolStripHighContrastRenderer.cs (18)
60int height = (toolStrip.Orientation == Orientation.Horizontal) ? bounds.Height : bounds.Width; 61int width = (toolStrip.Orientation == Orientation.Horizontal) ? bounds.Width : bounds.Height; 144g.DrawRectangle(SystemPens.ButtonHighlight, bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 190g.DrawRectangle(SystemPens.ControlLight, bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 263g.DrawRectangle(SystemPens.ButtonHighlight, bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 277g.DrawRectangle(SystemPens.ButtonShadow, bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 298bool oddHeight = ((bounds.Height & 0x1) == 0x1); 304g.DrawLine(p, bounds.X + indent, bounds.Height - 1, bounds.Width - 1, bounds.Height - 1); 307g.DrawLine(p, bounds.X, bounds.Y + indent, bounds.X, bounds.Height - 1); 309g.DrawLine(p, bounds.Width - 1, bounds.Y + indent, bounds.Width - 1, bounds.Height - 1); 326g.FillRectangle(SystemBrushes.ButtonShadow, new Rectangle(1, bounds.Height - 2, 1, 1)); 333g.FillRectangle(SystemBrushes.ButtonShadow, new Rectangle(bounds.Width - 2, bounds.Height - 2, 1, 1)); 354if (bounds.Height >= 8) 373int startY = bounds.Height / 2; 420g.DrawRectangle(SystemPens.ControlLight, bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 452g.DrawRectangle(SystemPens.ControlLight, bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 512g.DrawImage(image, imageRect, 0, 0, imageRect.Width, imageRect.Height, GraphicsUnit.Pixel, attrs);
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (3)
949get => Bounds.Height; 2010SetBounds(currentBounds.X, currentBounds.Y, value, currentBounds.Height); 3495return toolStripItemPlacement != ToolStripItemPlacement.Main || bounds.Height <= 0 || bounds.Width <= 0;
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.ToolStripMenuItemInternalLayout.cs (1)
96checkRectangle.Y += (checkRectangle.Height - imageHeight) / 2;
System\Windows\Forms\Controls\ToolStrips\ToolStripOverflow.cs (1)
77SetBoundsCore(bounds.X, bounds.Y, bounds.Width, bounds.Height, specified);
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.cs (3)
963cursorLoc.Y += toolStripToDrag.GripRectangle.Height / 2; 1028else if (Orientation == Orientation.Vertical && (bounds.Height == 0)) 1030bounds.Height = ParentInternal.DisplayRectangle.Height;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelCell.cs (2)
278constrainingSize.Height = ToolStripPanelRow.Bounds.Height; 321if (spaceToFree > 0 && bounds.Height > spaceToFree)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.cs (5)
561if (cachedBounds.Height > minSize.Height) 563spaceToFree -= (cachedBounds.Height - minSize.Height); 572cellOffsets[j] += Math.Max(0, currentCell.CachedBounds.Height - cachedBounds.Height); 680preferredSize.Height = DisplayRectangle.Height;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.HorizontalRowManager.cs (3)
57int y = previousRowBounds.Y + previousRowBounds.Height - (previousRowBounds.Height >> 2); 67dragBounds.Height += (nextRowBounds.Height >> 2) + Row.Margin.Bottom + ToolStripPanel.RowsInternal[index + 1].Margin.Top;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.VerticalRowManager.cs (6)
36displayRect.Height = ToolStripPanel.ParentInternal.DisplayRectangle.Height - (ToolStripPanel.Margin.Vertical + ToolStripPanel.Padding.Vertical) - Row.Margin.Vertical; 40displayRect.Height = raftingDisplayRectangle.Height - Row.Margin.Vertical; 94return totalSize.Height < DisplayRectangle.Height; 292freedSpace += DisplayRectangle.Height; 356int spaceToFree = (lastCell is not null) ? lastCell.Bounds.Bottom - newBounds.Height : 0; 573int spaceOccupiedByCell = cell.Margin.Vertical + cell.Bounds.Height;
System\Windows\Forms\Controls\ToolStrips\ToolStripProfessionalLowResolutionRenderer.cs (7)
63bool oddHeight = ((bounds.Height & 0x1) == 0x1); 69g.DrawLine(p, bounds.X + indent, bounds.Height - 1, bounds.Width - 1, bounds.Height - 1); 72g.DrawLine(p, bounds.X, bounds.Y + indent, bounds.X, bounds.Height - 1); 74g.DrawLine(p, bounds.Width - 1, bounds.Y + indent, bounds.Width - 1, bounds.Height - 1); 91g.FillRectangle(SystemBrushes.ButtonShadow, new Rectangle(1, bounds.Height - 2, 1, 1)); 98g.FillRectangle(SystemBrushes.ButtonShadow, new Rectangle(bounds.Width - 2, bounds.Height - 2, 1, 1));
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (42)
374g.DrawRectangle(pen, bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 388g.DrawRectangle(pen, bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 425g.DrawLine(pen, bounds.Left, bounds.Height - 1, bounds.Right, bounds.Height - 1); 429g.DrawLine(pen, bounds.Width - 2, bounds.Height - 2, bounds.Width - 1, bounds.Height - 3); 435g.DrawLine(pen, bounds.Width - 1, 0, bounds.Width - 1, bounds.Height - 1); 439g.DrawLine(pen, bounds.Width - 2, bounds.Height - 2, bounds.Width - 1, bounds.Height - 3); 457edging = new Rectangle(bounds.Width - 1, 3, 1, bounds.Height - 3); 461edging = new Rectangle(3, bounds.Height - 1, bounds.Width - 3, bounds.Height - 1); 488int height = (toolStrip.Orientation == Orientation.Horizontal) ? bounds.Height : bounds.Width; 489int width = (toolStrip.Orientation == Orientation.Horizontal) ? bounds.Width : bounds.Height; 548if ((bounds.Width == 0) || (bounds.Height == 0)) 588g.DrawRectangle(pen, bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 645g.DrawRectangle(pen, bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 663g.DrawRectangle(pen, bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 855Point bottomLeft = new(0, bounds.Height - 1); 856Point bottomRight = new(bounds.Width - 1, bounds.Height - 1); 955if ((bounds.Width == 0) || (bounds.Height == 0)) 980endGradient.Y = bounds.Bottom - endGradient.Height; 981useDoubleGradient = (bounds.Height > (firstGradientWidth + secondGradientWidth)); 1048(e.Item.Height - e.ImageRectangle.Height) / 2 - 1, 1049e.ImageRectangle.Width + 4, e.ImageRectangle.Height + 2) 1062g.DrawRectangle(pen, bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 1075g.DrawRectangle(SystemPens.Highlight, bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 1081if ((bounds.Width == 0) || (bounds.Height == 0)) 1096g.DrawRectangle(pen, bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 1199g.DrawRectangle(pen, bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 1235overflowBoundsFill.Y = overflowBoundsFill.Height - _overflowButtonWidth + 1; 1270Point start = new(overflowBoundsFill.Left - 1, overflowBoundsFill.Height - 2); 1271Point end = new(overflowBoundsFill.Left, overflowBoundsFill.Height - 2); 1346Point bottomLeft = new(0, bounds.Height - 1); 1406if ((bounds.Width == 0) || (bounds.Height == 0)) 1430if ((bounds.Width == 0) || (bounds.Height == 0)) 1465bounds.Height = Math.Max(0, bounds.Height - 6); 1500if (bounds.Height >= 4) 1527int startY = bounds.Height / 2; 1542if ((bounds.Width == 0) || (bounds.Height == 0)) 1596g.DrawRectangle(pen, bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 1648Point middle = new(dropDownRect.Left + dropDownRect.Width / 2, dropDownRect.Top + dropDownRect.Height / 2);
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (3)
618Point middle = new(dropDownRect.Left + dropDownRect.Width / 2, dropDownRect.Top + dropDownRect.Height / 2); 846imageRect.Height, GraphicsUnit.Pixel, e.ImageAttributes); 874if (e.TextDirection != ToolStripTextDirection.Horizontal && textRect.Width > 0 && textRect.Height > 0)
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderEventArgs.cs (1)
123if (overlap.Height == 2)
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.cs (2)
316_splitterBounds = new Rectangle(splitButtonButtonBounds.Right, splitButtonButtonBounds.Top, _splitterWidth, splitButtonButtonBounds.Height); 322_splitterBounds = new Rectangle(dropDownButtonBounds.Right, dropDownButtonBounds.Top, _splitterWidth, dropDownButtonBounds.Height);
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackDragDropHandler.cs (1)
225int heightUnit = orig.Height / 2;
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackLayout.cs (3)
141if (currentHeight > _displayRectangle.Height - overflowWidth) 143int spaceRecovered = SendNextItemToOverflow(currentHeight - _displayRectangle.Height, false); 334itemSize.Height = Math.Max(_displayRectangle.Height - itemMargin.Vertical, 0);
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemRenderer.cs (7)
290bounds.Height = ((bounds.Height - 2/*number of pixels for border*/) / 4) * 4; // make sure height is an even interval of 4. 291bounds.Y = Math.Max(0, (e.GripBounds.Height - bounds.Height - 2/*number of pixels for border*/) / 2); 308if (bounds.Height >= 4) 467g.DrawRectangle(pen, bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 708if (bounds.Height >= 4) 734int startY = bounds.Height / 2;
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.ToolStripTextBoxControl.cs (1)
260g.FillRectangle(brush, 0, clientRect.Bottom, Width, Height - clientRect.Height); // bottom border
System\Windows\Forms\Controls\TrackBar\TrackBar.cs (1)
395SetBounds(r.X, r.Y, r.Height, r.Width, BoundsSpecified.All);
System\Windows\Forms\Controls\TrackBar\TrackBarRenderer.cs (5)
110if (numTicks <= 0 || bounds.Height <= 0 || bounds.Width <= 0 || g is null) 120t_visualStyleRenderer.DrawEdge(g, new Rectangle(bounds.X, bounds.Y, LineWidth, bounds.Height), Edges.Left, edgeStyle, EdgeEffects.None); 130t_visualStyleRenderer.DrawEdge(g, new Rectangle((int)Math.Round(x), bounds.Y, LineWidth, bounds.Height), Edges.Left, edgeStyle, EdgeEffects.None); 140if (numTicks <= 0 || bounds.Height <= 0 || bounds.Width <= 0 || g is null) 154float inc = ((float)bounds.Height - LineWidth) / ((float)numTicks - 1);
System\Windows\Forms\Controls\TreeView\TreeView.cs (2)
2830bounds = new Rectangle(textLoc, new Size(textSize.Width, bounds.Height)); 3431client = new Point(treeNode.Bounds.X, treeNode.Bounds.Y + treeNode.Bounds.Height / 2);
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (4)
531Rectangle clipLeft = new(bounds.Left, bounds.Top, border, bounds.Height); 533Rectangle clipRight = new(bounds.Right - border, bounds.Top, border, bounds.Height); 850upDownEditBounds.Size = new Size(clientArea.Width - _defaultButtonsWidth, clientArea.Height); 866clientArea.Height + (borderFixup * 2));
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.cs (2)
150rect.Y += rect.Height; 186rectDown.Y += rectDown.Height / 2;
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.UpDownButtonsAccessibleObject.DirectionButtonAccessibleObject.cs (1)
42bounds.Y += bounds.Height;
System\Windows\Forms\Design\ComponentEditorForm.cs (4)
243Rectangle pageBounds = new(0, 0, pageHostBounds.Width, pageHostBounds.Height); 254bounds.Height + STRIP_HEIGHT + 4 * BUTTON_PAD + BUTTON_HEIGHT + 259selectorWidth, bounds.Height + STRIP_HEIGHT + 2 * BUTTON_PAD + BUTTON_HEIGHT); 262bounds.Y = bounds.Height + bounds.Y + BUTTON_PAD;
System\Windows\Forms\Dialogs\CommonDialogs\CommonDialog.cs (1)
99int y = screen.Y + (screen.Height - r.bottom + r.top) / 3;
System\Windows\Forms\ErrorProvider\ErrorProvider.ErrorWindow.cs (3)
161_windowBounds.Height, 201bounds.Width, bounds.Height); 390_windowBounds.Height,
System\Windows\Forms\Form.cs (11)
907SetDesktopBounds(value.X, value.Y, value.Width, value.Height); 1672&& _restoreBounds.Height == -1 3653cp.Y = Math.Max(clientRect.Y, clientRect.Y + (clientRect.Height - cp.Height) / 2); 3678cp.Y = Math.Max(screenRect.Y, screenRect.Y + (screenRect.Height - cp.Height) / 2); 3875else if (p.Y + s.Height > screenRect.Y + screenRect.Height) 3877p.Y = screenRect.Y + screenRect.Height - s.Height; 3915p.Y = Math.Max(screenRect.Y, screenRect.Y + (screenRect.Height - Height) / 2); 4480_dpiFormSizes.Add(e.DeviceDpiNew, new Size(e.SuggestedRectangle.Width, e.SuggestedRectangle.Height)); 5012_formStateEx[s_formStateExWindowBoundsHeightIsClientSize] == 1 ? restoredSize.Height : _restoredWindowBounds.Height, 5219if ((specified & BoundsSpecified.Height) != 0 || _restoreBounds.Height == -1) 6821mmi->ptMaxSize.Y = maximizedBounds.Height;
System\Windows\Forms\Input\Cursor.cs (2)
275imageHeight = imageRect.Height; 288targetHeight = targetRect.Height;
System\Windows\Forms\Internal\WinFormsUtils.cs (3)
83Math.Min(constrainingBounds.Height - 2, bounds.Height)); 105bounds.Y = constrainingBounds.Bottom - 1 - bounds.Height;
System\Windows\Forms\Layout\CommonProperties.cs (3)
208bounds.Height = Math.Min(bounds.Height, value.Height); 232bounds.Height = Math.Max(bounds.Height, value.Height); 293bool hChangedButNotSpecified = ((specified & BoundsSpecified.Height) == BoundsSpecified.None) & height != originalBounds.Height;
System\Windows\Forms\Layout\Containers\ContainerControl.cs (2)
1386float yScaleFactor = (float)suggestedRectangle.Height / Height; 1422suggestedRectangle.Height,
System\Windows\Forms\Layout\Containers\SplitContainer.cs (4)
718OnSplitterMoved(new SplitterEventArgs(SplitterRectangle.X + SplitterRectangle.Width / 2, SplitterRectangle.Y + SplitterRectangle.Height / 2, SplitterRectangle.X, SplitterRectangle.Y)); 991SplitterCancelEventArgs se = new(Left + SplitterRectangle.X + SplitterRectangle.Width / 2, Top + SplitterRectangle.Y + SplitterRectangle.Height / 2, xSplit, ySplit); 1478PInvoke.PatBlt(dc, r.X, r.Y, r.Width, r.Height, ROP_CODE.PATINVERT); 2285return new Rectangle(containerRectangle.X + splitterRectangle.X, containerRectangle.Y + splitterRectangle.Y, splitterRectangle.Width, splitterRectangle.Height);
System\Windows\Forms\Layout\DefaultLayout.cs (33)
44proposedConstraints.Height = bounds.Height; 58if (bounds.Width < prefSize.Width || bounds.Height < prefSize.Height) 84Debug.Assert(CommonProperties.GetAutoSizeMode(element) == AutoSizeMode.GrowAndShrink || (newSize.Height >= oldBounds.Height && newSize.Width >= oldBounds.Width), 96location.Y -= newSize.Height - oldBounds.Height; 173int height = bounds.Height; 213height = displayRectangle.Height - (anchorInfo.Bottom + anchorInfo.Top); 222anchorInfo.Top = displayRectangle.Height - height - anchorInfo.Bottom; 228int growOrShrink = (displayRectangle.Height - (anchorInfo.Bottom + anchorInfo.Top + height)) / 2; 266bottom += displayRect.Height; 270top += displayRect.Height; 275int center = displayRect.Height / 2; 320if (bottom < top || cachedBounds.Height != element.Bounds.Height || cachedBounds.Y != element.Bounds.Y) 327bottom = top + Math.Max(element.Bounds.Height, cachedBounds.Height) + Math.Abs(bottom); 353if (CommonProperties.GetAutoSize(container) && ((displayRectangle.Width == 0) || (displayRectangle.Height == 0))) 406remainingBounds.Y += element.Bounds.Height; 407remainingBounds.Height -= element.Bounds.Height; 419remainingBounds.Height -= element.Bounds.Height; 490Math.Max(0, newElementBounds.Height - remainingBounds.Height)); 530(newElementBounds.Height < 0 || element.Bounds.Height == newElementBounds.Height), 750int parentHeight = parentDisplayRect.Height; 799anchorInfo.Top = oldAnchorInfo.Bottom - cachedBounds.Height; 887anchorInfo.Bottom = displayRectangle.Height - (y + elementBounds.Height); 989heightFactor = ((double)displayRect.Height) / anchorInfo.DisplayRectangle.Height; 1029if ((displayRectangle.Width == 0) || (displayRectangle.Height == 0)) 1172prefSize.Height = anchorDest.Height < 0 1173? Math.Max(prefSize.Height, elementSpace.Bottom + anchorDest.Height)
System\Windows\Forms\Layout\FlowLayout.cs (7)
76Rectangle measureBounds = new(displayRect.X, displayRect.Y, displayRect.Width, displayRect.Height - layoutSize.Height); 187Size elementConstraints = new(int.MaxValue, rowBounds.Height - elementProxy.Margin.Size.Height); 226Rectangle cellBounds = new(location, new Size(requiredSize.Width, rowBounds.Height)); 330Debug.Assert(container.Children[0].Bounds.Y == container.DisplayRectangle.Y + container.DisplayRectangle.Height - container.Children[0].Bounds.Height - margin.Bottom); 351Debug.Assert(collection[i].Bounds.Y + collection[i].Bounds.Height <= container.DisplayRectangle.Y + container.DisplayRectangle.Height);
System\Windows\Forms\Layout\LayoutUtils.cs (6)
326withinThis.Y += withinThis.Height - alignThis.Height; 330withinThis.Y += (withinThis.Height - alignThis.Height) / 2; 342withinThis.Y += withinThis.Height - alignThis.Height; 346withinThis.Y += (withinThis.Height - alignThis.Height) / 2; 490return (rectangle.Width == 0 || rectangle.Height == 0); 524region1.Y += bounds.Height - specifiedContent.Height;
System\Windows\Forms\Layout\TableLayout.cs (3)
1264cellBounds.Height = Math.Max(cellBounds.Height, 1); 1273elementBounds.Height = Math.Min(cellBounds.Height, elementBounds.Height);
System\Windows\Forms\MDI\MDIClient.cs (5)
198int sh = (int)Math.Round((bounds.Y + bounds.Height) * dy - sy); 234int yDelta = oldBounds.Height - newBounds.Height; 290using RegionScope rgn1 = new(0, 0, bounds.Width, bounds.Height); 295bounds.Height - rect.bottom);
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutPanel.cs (7)
390outsideCellBounds.Height - (cellBorderWidth + 1) / 2); 436displayRect.Height - cellBorderWidth); 452tableBounds.Y + tableBounds.Height - 1, 454tableBounds.Y + tableBounds.Height - 1); 463tableBounds.Y + tableBounds.Height - 1); 467tableBounds.Y + tableBounds.Height - 1, 469tableBounds.Y + tableBounds.Height - 1);
System\Windows\Forms\Printing\PrintPreviewControl.cs (5)
417internal double VerticalViewSize => InsideRectangle.Height * 100.0 / VirtualSize.Height; 431rect.Height = Math.Max(0, rect.Height - 1); 627Math.Max(0, (rect.Height - _virtualSize.Height) / 2)); 818_vScrollBar.Height = availableRect.Height - (horizontalScrollNeeded ? _hScrollBar.Height : 0); 834displayDimension: availableRect.Height,
System\Windows\Forms\Printing\PrintPreviewDialog.cs (1)
1143Rectangle rect = new(0, 0, item.Bounds.Width - 1, item.Bounds.Height - 1);
System\Windows\Forms\Rendering\ControlPaint.cs (83)
92if (bounds.Height > result.Height) 94result.Y = (bounds.Height - result.Height) / 2; 101float yRatio = bounds.Height / (float)imageSize.Height; 112result.Y = (bounds.Height - result.Height) / 2; 118result.Height = bounds.Height; 483partOfImageToDraw.Height, 500partOfImageToDraw.Height, 675leftLineBottoms[leftOffset] = bounds.Y + bounds.Height - i - 1; 680rightLineBottoms[rightOffset] = bounds.Y + bounds.Height - i - 1; 686leftLineBottoms[j] = bounds.Y + bounds.Height - i - 1; 691rightLineBottoms[j] = bounds.Y + bounds.Height - i - 1; 698leftLineBottoms[i] = bounds.Y + bounds.Height - 1; 703rightLineBottoms[i] = bounds.Y + bounds.Height - 1; 844bounds.Y + bounds.Height - 1 - i, 846bounds.Y + bounds.Height - 1 - i); 864bounds.Y + bounds.Height - 1 - i, 866bounds.Y + bounds.Height - 1 - i); 890bounds.Y + bounds.Height - 1 - i, 892bounds.Y + bounds.Height - 1 - i); 979rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, 989rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, 998=> DrawBorder3D(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, style, sides); 1067graphics.DrawLine(darkPen, bounds.X, bounds.Y, bounds.X, bounds.Y + bounds.Height - 1); 1073bounds.X, bounds.Y + bounds.Height - 1, bounds.X + bounds.Width - 1, bounds.Y + bounds.Height - 1); 1076bounds.X + bounds.Width - 1, bounds.Y, bounds.X + bounds.Width - 1, bounds.Y + bounds.Height - 1); 1081graphics.DrawLine(mediumPen, bounds.X + 1, bounds.Y + 1, bounds.X + 1, bounds.Y + bounds.Height - 2); 1089bounds.X + 1, bounds.Y + bounds.Height - 2, bounds.X + bounds.Width - 2, bounds.Y + bounds.Height - 2); 1092bounds.X + bounds.Width - 2, bounds.Y + 1, bounds.X + bounds.Width - 2, bounds.Y + bounds.Height - 2); 1106graphics.DrawLine(lightPen, bounds.X, bounds.Y, bounds.X, bounds.Y + bounds.Height - 1); 1113bounds.X, bounds.Y + bounds.Height - 1, bounds.X + bounds.Width - 1, bounds.Y + bounds.Height - 1); 1116bounds.X + bounds.Width - 1, bounds.Y, bounds.X + bounds.Width - 1, bounds.Y + bounds.Height - 1); 1126graphics.DrawLine(topLeftPen, bounds.X + 1, bounds.Y + 1, bounds.X + 1, bounds.Y + bounds.Height - 2); 1133bounds.X + 1, bounds.Y + bounds.Height - 2, bounds.X + bounds.Width - 2, bounds.Y + bounds.Height - 2); 1136bounds.X + bounds.Width - 2, bounds.Y + 1, bounds.X + bounds.Width - 2, bounds.Y + bounds.Height - 2); 1151bounds = new Rectangle(bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 1180=> DrawButton(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, state); 1205rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, 1228=> DrawCheckBox(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, state); 1256=> DrawComboButton(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, state); 1280graphics.FillRectangle(brush, bounds.Left + 1, bounds.Top + 1, bounds.Width - 2, bounds.Height - 2); 1289int midy = bounds.Y + bounds.Height / 2; 1345if (rectangle.Width < 0 || rectangle.Height < 0) 1352rectangle.Height - 2); 1360if (t_checkImage is null || t_checkImage.Width != rectangle.Width || t_checkImage.Height != rectangle.Height) 1370Bitmap bitmap = new(rectangle.Width, rectangle.Height); 1390graphics.DrawRectangle(pen, offsetRectangle.X, offsetRectangle.Y, offsetRectangle.Width - 1, offsetRectangle.Height - 1); 1499rectangle.Height - 1); 1676Point end = new(bounds.X + bounds.Width - 1, bounds.Y + bounds.Height); 1689graphics.DrawRectangle(pen, rectangle.X, rectangle.Y, rectangle.Width - 1, rectangle.Height - 1); 1691graphics.DrawRectangle(pen, rectangle.X, rectangle.Y, rectangle.Width - 1, rectangle.Height - 1); 1695graphics.DrawRectangle(pen, rectangle.X, rectangle.Y, rectangle.Width - 1, rectangle.Height - 1); 1702=> DrawMenuGlyph(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, glyph); 1715rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, 1747=> DrawMixedCheckBox(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, state); 1764=> DrawRadioButton(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, state); 1846=> DrawScrollButton(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, button, state); 1888=> DrawSizeGrip(graphics, backColor, bounds.X, bounds.Y, bounds.Width, bounds.Height); 2053PInvoke.PatBlt(desktopDC, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, rop3); 2369g.DrawLine(SystemPens.Window, bound.X, bound.Y, bound.X, bound.Y + bound.Height - 1); 2370g.DrawLine(SystemPens.ControlDark, bound.X + bound.Width - 1, bound.Y, bound.X + bound.Width - 1, bound.Y + bound.Height - 1); 2371g.DrawLine(SystemPens.ControlDark, bound.X, bound.Y + bound.Height - 1, bound.X + bound.Width - 1, bound.Y + bound.Height - 1); 2378bound = new Rectangle(bound.X + 1, bound.Y + 1, bound.Width - 1, bound.Height - 1); 2380g.DrawLine(SystemPens.Window, bound.X, bound.Y, bound.X, bound.Y + bound.Height - 1); 2382g.DrawLine(SystemPens.ControlDark, bound.X + bound.Width - 1, bound.Y, bound.X + bound.Width - 1, bound.Y + bound.Height - 1); 2383g.DrawLine(SystemPens.ControlDark, bound.X, bound.Y + bound.Height - 1, bound.X + bound.Width - 1, bound.Y + bound.Height - 1); 2388g.DrawLine(SystemPens.ControlDark, bound.X, bound.Y, bound.X, bound.Y + bound.Height - 1); 2389g.DrawLine(SystemPens.Window, bound.X + bound.Width - 1, bound.Y, bound.X + bound.Width - 1, bound.Y + bound.Height - 1); 2390g.DrawLine(SystemPens.Window, bound.X, bound.Y + bound.Height - 1, bound.X + bound.Width - 1, bound.Y + bound.Height - 1); 2398bound = new Rectangle(bound.X + 1, bound.Y + 1, bound.Width - 1, bound.Height - 1); 2400g.DrawLine(SystemPens.ControlDark, bound.X, bound.Y, bound.X, bound.Y + bound.Height - 1); 2401g.DrawLine(SystemPens.Window, bound.X + bound.Width - 1, bound.Y, bound.X + bound.Width - 1, bound.Y + bound.Height - 1); 2402g.DrawLine(SystemPens.Window, bound.X, bound.Y + bound.Height - 1, bound.X + bound.Width - 1, bound.Y + bound.Height - 1);
System\Windows\Forms\Rendering\TextExtensions.cs (3)
91if (bounds.Height == int.MaxValue) 175if (textHeight > bounds.Height) 185adjustedBounds.Y = adjustedBounds.Top + adjustedBounds.Height / 2 - textHeight / 2;
System\Windows\Forms\Scrolling\ScrollableControl.cs (24)
206rect.Height = _displayRect.Height; 224displayRectangle.Height = Math.Max(displayRectangle.Height, AutoScrollMinSize.Height); 293display.Height = client.Height; 333int maxY = minClient.Height; 462int ctlBottom = -display.Y + bounds.Y + bounds.Height + _scrollMargin.Height; 495if (maxY <= fullClient.Height) 511if (needHscroll && maxY > clientToBe.Height) 528maxY = clientToBe.Height; 560_displayRect = new Rectangle(_displayRect.X, _displayRect.Y, HorizontalScroll.Maximum, _displayRect.Height); 618int maxPos = -(client.Height - _displayRect.Height); 756int minY = Math.Min(client.Height - displayRectangle.Height, 0); 835&& (client.Width > 0 && client.Height > 0)) 889else if (bounds.Y + bounds.Height + yMargin > client.Height) 891yCalc = client.Height - (bounds.Y + bounds.Height + yMargin - _displayRect.Y); 1049if (_displayRect.Width != width || _displayRect.Height != height) 1057int minY = ClientRectangle.Height - height; 1188VerticalScroll._maximum = displayRect.Height - 1; 1193VerticalScroll._largeChange = ClientRectangle.Height; 1271int maxPos = -(client.Height - _displayRect.Height);
System\Windows\Forms\Scrolling\VScrollProperties.cs (1)
15private protected override int GetPageSize(ScrollableControl parent) => parent.ClientRectangle.Height;
System\Windows\Forms\ToolTip\ToolTip.cs (5)
1551int centeredY = toolRectangle.Top + toolRectangle.Height / 2 - height / 2; // tooltip will be aligned with tool horizontally 1575locationWeights[i] += Math.Abs((long)intersection.Width * intersection.Height); // Intersection is a weight 1589* (Math.Abs((long)possibleLocations[i].Height) - Math.Abs((long)locationAreaWithinScreen.Height)); 1603locationWithinTopControlAreas[i] = Math.Abs((long)locationWithinTopControlRectangle.Height * locationWithinTopControlRectangle.Width);
System\Windows\Forms\VisualStyles\VisualStyleRenderer.cs (10)
221if (bounds.Width < 0 || bounds.Height < 0) 250if (bounds.Width < 0 || bounds.Height < 0 || clipRectangle.Width < 0 || clipRectangle.Height < 0) 304if (bounds.Width < 0 || bounds.Height < 0) 322if (bounds.Width < 0 || bounds.Height < 0) 340if (bounds.Width < 0 || bounds.Height < 0) 381if (bounds.Width < 0 || bounds.Height < 0) 415if (bounds.Width < 0 || bounds.Height < 0) 431if (contentBounds.Width < 0 || contentBounds.Height < 0) 450if (bounds.Width < 0 || bounds.Height < 0)
System.Windows.Forms.Design (108)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (2)
598Rectangle baseVar = new(e.Bounds.X + offset, e.Bounds.Y + 1, PaintWidth, e.Bounds.Height - 3); 599g.DrawRectangle(SystemPens.ControlText, baseVar.X, baseVar.Y, baseVar.Width - 1, baseVar.Height - 1);
System\ComponentModel\Design\CollectionEditor.SplitButton.cs (2)
201_dropDownRectangle = new Rectangle(bounds.Right - PushButtonWidth - 1, 4, PushButtonWidth, bounds.Height - 8); 246Convert.ToInt32(dropDownRect.Top + dropDownRect.Height / 2));
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (4)
353if (rectScreen.Bottom < (dropDownSize.Height + editorLocation.Y + editorBounds.Height)) 359editorLocation.Y += editorBounds.Height; 377if (rectScreen.Bottom < (dropDownSize.Height + editorLocation.Y + editorBounds.Height)) 383editorLocation.Y += editorBounds.Height;
System\ComponentModel\Design\DesignerActionUI.cs (1)
616if ((new Rectangle(glyphCoord, new Size(currentGlyph.Bounds.Width, currentGlyph.Bounds.Height))).Contains(point))
System\ComponentModel\Design\MultilineStringEditor.MultilineStringEditorUI.cs (1)
242Math.Min(Font.Height * 10, workingArea.Height / 3));
System\Drawing\Design\ColorEditor.ColorPalette.ColorPaletteAccessibleObject.ColorCellAccessibleObject.cs (1)
43return new Rectangle(pt.X, pt.Y, rect.Width, rect.Height);
System\Drawing\Design\ColorEditor.ColorUI.cs (4)
89Size = new Size(size.Width + 2 * CMARGIN, size.Height + 2 * CMARGIN + rectItemSize.Height); 275_editor.PaintValue(value, graphics, new Rectangle(die.Bounds.X + 2, die.Bounds.Y + 2, 22, die.Bounds.Height - 4)); 276graphics.DrawRectangle(SystemPens.WindowText, new Rectangle(die.Bounds.X + 2, die.Bounds.Y + 2, 22 - 1, die.Bounds.Height - 4 - 1)); 316_pal.Size.Height - rectItemSize.Height + 2 * CMARGIN);
System\Drawing\Design\CursorEditor.CursorUI.cs (4)
69e.Graphics.FillRectangle(SystemBrushes.Control, new Rectangle(e.Bounds.X + 2, e.Bounds.Y + 2, 32, e.Bounds.Height - 4)); 70e.Graphics.DrawRectangle(SystemPens.WindowText, new Rectangle(e.Bounds.X + 2, e.Bounds.Y + 2, 32 - 1, e.Bounds.Height - 4 - 1)); 72cursor.DrawStretched(e.Graphics, new Rectangle(e.Bounds.X + 2, e.Bounds.Y + 2, 32, e.Bounds.Height - 4)); 73e.Graphics.DrawString(text, font, brushText, e.Bounds.X + 36, e.Bounds.Y + (e.Bounds.Height - font.Height) / 2);
System\Drawing\Design\FontNameEditor.cs (1)
71float fontSize = e.Bounds.Height / ScaleFactor;
System\Drawing\Design\IconEditor.cs (2)
126if (icon.Height < rectangle.Height) 128rectangle.Y += (rectangle.Height - icon.Height) / 2;
System\Windows\Forms\Design\AnchorEditor.AnchorUI.cs (1)
271e.Graphics.DrawRectangle(SystemPens.WindowFrame, rc.X, rc.Y, rc.Width - 1, rc.Height - 1);
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (4)
535Rectangle clipBounds = new(0, 0, rootControl.ClientRectangle.Width, rootControl.ClientRectangle.Height); 1006if (bounds.Top + bounds.Height < dragBounds.Top) 1011else if (dragBounds.Top + dragBounds.Height < bounds.Top) 1144Rectangle tempDragRect = new(dragBounds.Left + snapPoint.X, dragBounds.Top + snapPoint.Y, dragBounds.Width, dragBounds.Height);
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (1)
1013int imageHeight = _dragImageRect.Height;
System\Windows\Forms\Design\Behavior\GrabHandleGlyph.cs (4)
80if (controlBounds.Height >= (2 * DesignerUtils.s_handleOverlap) + (2 * DesignerUtils.s_handleSize)) 82bounds = new Rectangle(controlBounds.X + DesignerUtils.s_handleOverlap - DesignerUtils.s_handleSize, controlBounds.Y + (controlBounds.Height / 2) - (DesignerUtils.s_handleSize / 2), DesignerUtils.s_handleSize, DesignerUtils.s_handleSize); 92if (controlBounds.Height >= (2 * DesignerUtils.s_handleOverlap) + (2 * DesignerUtils.s_handleSize)) 94bounds = new Rectangle(controlBounds.Right - DesignerUtils.s_handleOverlap, controlBounds.Y + (controlBounds.Height / 2) - (DesignerUtils.s_handleSize / 2), DesignerUtils.s_handleSize, DesignerUtils.s_handleSize);
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (10)
150rect.Height = Math.Max(rect.Height, _parentGridSize.Height); 619_resizeComponents[0].resizeBounds.Width, _resizeComponents[0].resizeBounds.Height); 679bounds.Height = Math.Max(minHeight, baseBounds.Height + pixelHeight); 697bounds.Height = Math.Max(minHeight, baseBounds.Height + yOffset); 698if ((bounds.Height != minHeight) || 699((bounds.Height == minHeight) && (oldBounds.Height != minHeight))) 773propHeight.SetValue(_resizeComponents[i].resizeControl, bounds.Height); 793control.SetBounds(bounds.X, bounds.Y, bounds.Width, bounds.Height, specified); 935if (propHeight is not null && _resizeComponents[i].resizeControl.Height != _resizeComponents[i].resizeBounds.Height)
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionGlyph.cs (6)
111_glyphBounds = new Rectangle(bounds.X + x, bounds.Y + bounds.Height, _imageWidth, _imageHeight); 126y = (bounds.Height - _imageWidth) / 2; 135y = (bounds.Height - _imageWidth) / 2; 160_glyphBounds = new Rectangle(bounds.X + x, bounds.Y + bounds.Height, _imageWidth, _imageHeight); 175y = (bounds.Height - _imageWidth) / 2; 184y = (bounds.Height - _imageWidth) / 2;
System\Windows\Forms\Design\ComponentTray.cs (2)
1866newLoc.Y += bounds.Height + _whiteSpace.Y; 2301int y = rc.Y + (rc.Height - _cyIcon) / 2;
System\Windows\Forms\Design\ControlCommandSet.cs (1)
730moveOffsetY = newRect.Height - primaryControl.Height;
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (4)
1004int textWidth = Size.Ceiling(e.Graphics.MeasureString(columnName, e.Font!, new SizeF(bounds.Width, bounds.Height))).Width; 1006Rectangle focusRectangle = new(bounds.X, e.Bounds.Y + 1, textWidth + OWNERDRAWHORIZONTALBUFFER, e.Bounds.Height - 2); 1021e.Graphics.FillRectangle(backBrush, new Rectangle(focusRectangle.Right + 1, e.Bounds.Y, e.Bounds.Width - focusRectangle.Right - 1, e.Bounds.Height)); 1025e.Graphics.FillRectangle(backBrush, new Rectangle(bounds.X, e.Bounds.Y, e.Bounds.Width - bounds.X, e.Bounds.Height));
System\Windows\Forms\Design\DesignerUtils.cs (4)
464SelectionBorderGlyphType.Left => new Rectangle(originalBounds.Left - borderSize, originalBounds.Top - borderSize, borderSize, originalBounds.Height + 2 * borderSize), 465SelectionBorderGlyphType.Right => new Rectangle(originalBounds.Right, originalBounds.Top - borderSize, borderSize, originalBounds.Height + 2 * borderSize), 549return face.Top + (face.Height / 2) - (fontHeight / 2) + fontAscent; 578newBounds.Y = originalBounds.Y - originalBounds.Height + e.Offset.Y;
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (1)
156bounds.Height + margin.Vertical);
System\Windows\Forms\Design\OleDragDropHandler.cs (1)
415if (rectangle.Height == 0)
System\Windows\Forms\Design\ParentControlDesigner.cs (15)
567prop?.SetValue(newChild, new Size(bounds.Width, bounds.Height)); 812CreateToolCore(tool, bounds.X, bounds.Y, bounds.Width, bounds.Height, true, true); 1096adjustedRect.Height = dragRect.Height; 1173updatedRect.Height = ((dragRect.Y + dragRect.Height) / gridSize.Height) * gridSize.Height - updatedRect.Y; 1179if (updatedRect.Height < gridSize.Height) 1785offset.Width, offset.Height); 1825_statusCommandUI?.SetStatusInformation(new Rectangle(location.X, location.Y, offset.Width, offset.Height)); 1867if (offset.Height < minControlSize.Height) 1953if (_mouseDragOffset.Height < 0) 1955_mouseDragOffset.Y += _mouseDragOffset.Height; 1956_mouseDragOffset.Height = -_mouseDragOffset.Height; 1977_mouseDragOffset.Width, _mouseDragOffset.Height); 2016_statusCommandUI?.SetStatusInformation(new Rectangle(offset.X, offset.Y, _mouseDragOffset.Width, _mouseDragOffset.Height)); 2035Math.Max(displayRect.Height, clientRect.Height));
System\Windows\Forms\Design\SelectionUIHandler.cs (7)
77containerRect.Height = screen.Height; 239if (finalMove && offset is { X: 0, Y: 0, Width: 0, Height: 0 }) 291ctlBounds.lastRequestedHeight += offset.Height; 362newBounds.Height = tempNewBounds.Height; 367newBounds.Height = tempNewBounds.Height; 383bool sizeChanged = (offset.Width != 0 || offset.Height != 0); 484Size size = new(Math.Max(MinControlWidth, newBounds.Width), Math.Max(MinControlHeight, newBounds.Height));
System\Windows\Forms\Design\SelectionUIService.cs (2)
695delta.Height -= old.Height; 696if (delta.X != 0 || delta.Y != 0 || delta.Width != 0 || delta.Height != 0)
System\Windows\Forms\Design\SelectionUIService.SelectionUIItem.cs (15)
160rect.Y = inner.Y + inner.Height; 173rect.Y = inner.Y + (inner.Height - GRABHANDLE_HEIGHT) / 2; 255if (pt.Y >= _innerRect.Y + _innerRect.Height && pt.Y <= _outerRect.Y + _outerRect.Height) 260if (pt.Y >= _outerRect.Y + (_outerRect.Height - GRABHANDLE_HEIGHT) / 2 261&& pt.Y <= _outerRect.Y + (_outerRect.Height + GRABHANDLE_HEIGHT) / 2) 291if (pt.Y >= _innerRect.Y + _innerRect.Height && pt.Y <= _outerRect.Y + _outerRect.Height) 296if (pt.Y >= _outerRect.Y + (_outerRect.Height - GRABHANDLE_HEIGHT) / 2 297&& pt.Y <= _outerRect.Y + (_outerRect.Height + GRABHANDLE_HEIGHT) / 2) 305if (pt.Y >= _innerRect.Y + _innerRect.Height && pt.Y <= _outerRect.Y + _outerRect.Height) 395if (pt.Y < _outerRect.Y || pt.Y > _outerRect.Y + _outerRect.Height) 403&& pt.Y < _innerRect.Y + _innerRect.Height) 514Rectangle rcOuterNew = new(_innerRect.X - GRABHANDLE_WIDTH, _innerRect.Y - GRABHANDLE_HEIGHT, _innerRect.Width + 2 * GRABHANDLE_WIDTH, _innerRect.Height + 2 * GRABHANDLE_HEIGHT);
System\Windows\Forms\Design\SplitterPanelDesigner.cs (1)
193int watermarkY = rectangle.Height / 2;
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (1)
1109Rectangle gBounds = new(startLoc - halfSize, checkBounds.Top, DesignerUtils.s_resizeGlyphSize, checkBounds.Height);
System\Windows\Forms\Design\TabOrder.cs (1)
286graphics.DrawRectangle(pen, convertedRectangle.X, convertedRectangle.Y, convertedRectangle.Width - 1, convertedRectangle.Height - 1);
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (1)
1181if (_toolStripAdornerWindowService is not null && (dropDown.Width < _dropDownSizeToInvalidate.Width || dropDown.Size.Height < _dropDownSizeToInvalidate.Height))
System\Windows\Forms\Design\ToolStripTemplateNode.cs (4)
1350_contextMenu.Show(translatedBounds.X, translatedBounds.Y + translatedBounds.Height); 1873Rectangle drawRect = new(bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 1887Rectangle drawRect = new(bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 2032Rectangle drawRect = new(bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1);
System.Windows.Forms.Primitives (5)
System\Windows\Forms\Automation\UiaTextProvider.cs (2)
95result[scan++] = rectArray[i].Height; 113result[3] = bounds.Height;
System\Windows\Forms\Automation\UiaTextRange.cs (3)
398Rectangle rectangle = new(startPoint.X, startPoint.Y + 2, endPoint.X - startPoint.X, clippingRectangle.Height); 401if (rectangle.Width > 0 && rectangle.Height > 0) 866if (rect.Width > 0 && rect.Height > 0)
System.Windows.Forms.Primitives.Tests (2)
System\Windows\Forms\Automation\UiaTextRangeTests.cs (2)
716.Returns((Rectangle rect) => new Rectangle(rect.X + 27, rect.Y + 128, rect.Width, rect.Height)); 798.Returns((Rectangle rect) => new Rectangle(rect.X + 27, rect.Y + 128, rect.Width, rect.Height));
System.Windows.Forms.Tests (171)
System\Windows\Forms\AccessibleObjects\AccessibleObjectTests.cs (6)
635Assert.Equal(0, accessibleObject.Bounds.Height); 701Assert.Equal(0, accessibleObject.Bounds.Height); 720Assert.Equal(0, accessibleObject.Bounds.Height); 739Assert.Equal(0, accessibleObject.Bounds.Height); 2627point.Offset(bounds.Width / 2, bounds.Height / 2); 2658point.Offset(bounds.Width / 2, bounds.Height / 2);
System\Windows\Forms\AccessibleObjects\CheckedListBoxAccessibleObjectTests.cs (2)
27int listBoxHeight = checkedListBox.AccessibilityObject.Bounds.Height; 33sumItemsHeight += item.Bounds.Height;
System\Windows\Forms\AccessibleObjects\ComboBox.ComboBoxItemAccessibleObjectTests.cs (2)
320int visibleItemsCount = (int)Math.Ceiling((double)dropDownRect.Height / comboBox.ItemHeight); 415Assert.Equal(15, actual.Height); // All items are the same height
System\Windows\Forms\AccessibleObjects\Control.ControlAccessibleObjectTests.cs (2)
57Assert.Equal(0, accessibleObject.Bounds.Height); 92Assert.Equal(0, accessibleObject.Bounds.Height);
System\Windows\Forms\AccessibleObjects\DataGridViewAccessibleObjectTests.cs (2)
154int actualHeight = accessibleObject.Bounds.Height; 176int actualHeight = accessibleObject.Bounds.Height;
System\Windows\Forms\AccessibleObjects\ListViewGroup.ListViewGroupAccessibleObjectTests.cs (2)
301int actualHeight = group1AccObj.Bounds.Height; 339int actualHeight = groupAccObj.Bounds.Height;
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObjectTests.cs (2)
659int actualHeight = accessibleObject.Bounds.Height; 660int expectedHeight = subItem.Bounds.Height;
System\Windows\Forms\AccessibleObjects\MonthCalendar.CalendarAccessibleObjectTests.cs (1)
38Assert.Equal(135, bounds.Height);
System\Windows\Forms\AccessibleObjects\MonthCalendar.CalendarBodyAccessibleObjectTests.cs (1)
34Assert.Equal(106, accessibleObject.Bounds.Height);
System\Windows\Forms\AccessibleObjects\Panel.PanelAccessibleObjectTests.cs (2)
284Assert.Equal(boundingRectangle.Height, expected.Height + horizontalScrollBarHeight);
System\Windows\Forms\AccessibleObjects\PropertyGridView.PropertyGridViewAccessibleObjectTests.cs (2)
255bool visible = rect.Height > 0 && 268visible = rect.Height > 0 &&
System\Windows\Forms\AccessibleObjects\TabPage.TabPageAccessibleObjectTests.cs (2)
556Assert.Equal(boundingRectangle.Height, expected.Height + horizontalScrollBarHeight);
System\Windows\Forms\AccessibleObjects\ToolStripControlHost.ToolStripHostedControlAccessibleObjectTests.cs (1)
31(bool)accessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_IsOffscreenPropertyId) || (accessibleObject.Bounds.Width > 0 && accessibleObject.Bounds.Height > 0);
System\Windows\Forms\AccessibleObjects\ToolStripItemAccessibleObjectTests.cs (1)
123(toolStripItemAccessibleObject.Bounds.Width > 0 && toolStripItemAccessibleObject.Bounds.Height > 0));
System\Windows\Forms\ControlPaintTests.cs (26)
767ControlPaint.DrawBorder3D(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height); 770ControlPaint.DrawBorder3D(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height); 779ControlPaint.DrawBorder3D(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, style); 782ControlPaint.DrawBorder3D(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, style); 791ControlPaint.DrawBorder3D(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, style, side); 794ControlPaint.DrawBorder3D(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, style, side); 839ControlPaint.DrawButton(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, state); 842ControlPaint.DrawButton(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, state); 923ControlPaint.DrawCaptionButton(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, button, state); 926ControlPaint.DrawCaptionButton(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, button, state); 1003ControlPaint.DrawCheckBox(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, state); 1006ControlPaint.DrawCheckBox(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, state); 1084ControlPaint.DrawComboButton(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, state); 1087ControlPaint.DrawComboButton(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, state); 1446ControlPaint.DrawMenuGlyph(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, glyph); 1449ControlPaint.DrawMenuGlyph(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, glyph); 1458ControlPaint.DrawMenuGlyph(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, glyph, foreColor, backColor); 1461ControlPaint.DrawMenuGlyph(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, glyph, foreColor, backColor); 1545ControlPaint.DrawMixedCheckBox(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, state); 1548ControlPaint.DrawMixedCheckBox(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, state); 1625ControlPaint.DrawRadioButton(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, state); 1628ControlPaint.DrawRadioButton(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, state); 1763ControlPaint.DrawScrollButton(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, button, state); 1766ControlPaint.DrawScrollButton(graphics, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, button, state); 1883ControlPaint.DrawSizeGrip(graphics, backColor, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height); 1886ControlPaint.DrawSizeGrip(graphics, backColor, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height);
System\Windows\Forms\ControlTests.Methods.cs (6)
10403Assert.True(control.ClientRectangle.Height >= 0); 10407Assert.True(control.DisplayRectangle.Height >= 0); 10419Assert.True(control.Bounds.Height >= 0); 10436Assert.True(control.ClientRectangle.Height >= 0); 10440Assert.True(control.DisplayRectangle.Height >= 0); 10452Assert.True(control.Bounds.Height >= 0);
System\Windows\Forms\CursorTests.cs (2)
185Assert.True(clip.Height >= 0); 205Assert.True(Cursor.Clip.Height >= 0);
System\Windows\Forms\DataGridViewCellTests.cs (5)
3228Assert.Equal(new Rectangle(expected.X, expected.Y, expected.Width, expected.Height + 10), cell.BorderWidths(advancedBorderStyle)); 3241Assert.Equal(new Rectangle(expected.X, expected.Y, expected.Width + 10, expected.Height), cell.BorderWidths(advancedBorderStyle)); 3259Assert.Equal(new Rectangle(expected.X, expected.Y, expected.Width + 10, expected.Height + 11), cell.BorderWidths(advancedBorderStyle)); 3280Assert.Equal(new Rectangle(expected.X + 10, expected.Y, expected.Width, expected.Height + 11), cell.BorderWidths(advancedBorderStyle)); 3296Assert.Equal(new Rectangle(expected.X, expected.Y, expected.Width + 10, expected.Height), cell.BorderWidths(advancedBorderStyle));
System\Windows\Forms\FormTests.cs (1)
81Assert.True(control.DisplayRectangle.Height > 0);
System\Windows\Forms\HScrollBarTests.cs (3)
31Assert.True(control.Bounds.Height > 0); 42Assert.True(control.ClientRectangle.Height > 0); 64Assert.True(control.DisplayRectangle.Height > 0);
System\Windows\Forms\ListBoxTests.cs (6)
5334Assert.True(rect1.Height > 0); 5340Assert.True(rect2.Y >= rect1.Y + rect1.Height); 5342Assert.True(rect2.Height > 0); 5364Assert.True(rect1.Height > 0); 5373Assert.True(rect2.Y >= rect1.Y + rect1.Height); 5375Assert.True(rect2.Height > 0);
System\Windows\Forms\ListViewTests.cs (4)
4093Assert.True(rect1.Height > 0); 4100Assert.True(rect2.Height > 0); 4124Assert.True(rect1.Height > 0); 4134Assert.True(rect2.Height > 0);
System\Windows\Forms\MonthCalendarTests.cs (3)
40Assert.True(control.Bounds.Height > 0); 53Assert.True(control.ClientRectangle.Height > 0); 73Assert.True(control.DisplayRectangle.Height > 0);
System\Windows\Forms\ScreenTests.cs (3)
210Assert.NotEqual(0, screen.Bounds.Height); 214Assert.InRange(screen.WorkingArea.Height, 0, screen.Bounds.Height);
System\Windows\Forms\ScrollBarTests.cs (8)
2940Assert.True(HFirstPageButton(hScrollBar).Bounds.Height > 0); 2953Assert.True(HFirstPageButton(hScrollBar).Bounds.Width == 0 || HFirstPageButton(hScrollBar).Bounds.Height == 0); 2984Assert.True(HLastPageButton(hScrollBar).Bounds.Height > 0); 2997Assert.True(HLastPageButton(hScrollBar).Bounds.Width == 0 || HLastPageButton(hScrollBar).Bounds.Height == 0); 3027Assert.True(VFirstPageButton(vScrollBar).Bounds.Width == 0 || VFirstPageButton(vScrollBar).Bounds.Height == 0); 3041Assert.True(VLastPageButton(vScrollBar).Bounds.Height > 0); 3054Assert.True(VLastPageButton(vScrollBar).Bounds.Width == 0 || VLastPageButton(vScrollBar).Bounds.Height == 0); 3085Assert.True(VFirstPageButton(vScrollBar).Bounds.Height > 0);
System\Windows\Forms\SplitterTests.cs (1)
1422Assert.Equal(control.Top + control.Bounds.Height / 2, e.SplitY);
System\Windows\Forms\StatusStripTests.Rendering.cs (1)
36Rectangle bitBltBounds = new(bounds.X, 0, bounds.Width - 1, bounds.Height - 1);
System\Windows\Forms\SystemInformationTests.cs (2)
793Assert.NotEqual(0, screen.Height); 804Assert.True(workingArea.Height > 0);
System\Windows\Forms\TabControlTests.cs (7)
746Assert.Equal(100 - displayRectangle.Y * 2, control.DisplayRectangle.Height); 767Assert.Equal(100 - displayRectangle.Y * 2, control.DisplayRectangle.Height); 786Assert.Equal(100 - displayRectangle.Y * 2, control.DisplayRectangle.Height); 3663Assert.True(rect1.Height > 0); 3671Assert.True(rect2.Height > 0); 3695Assert.True(rect1.Height > 0); 3703Assert.True(rect2.Height > 0);
System\Windows\Forms\TabPageTests.cs (16)
2214Assert.Equal(new Rectangle(0, 0, expected.Width, expected.Height), control.ClientRectangle); 2215Assert.Equal(new Rectangle(0, 0, expected.Width, expected.Height), control.DisplayRectangle); 2221Assert.Equal(expected.Y + expected.Height, control.Bottom); 2223Assert.Equal(expected.Height, control.Height); 2244Assert.Equal(new Rectangle(0, 0, expected.Width, expected.Height), control.ClientRectangle); 2245Assert.Equal(new Rectangle(0, 0, expected.Width, expected.Height), control.DisplayRectangle); 2251Assert.Equal(expected.Y + expected.Height, control.Bottom); 2253Assert.Equal(expected.Height, control.Height); 4816Assert.Equal(new Rectangle(0, 0, expected.Width, expected.Height), control.ClientRectangle); 4817Assert.Equal(new Rectangle(0, 0, expected.Width, expected.Height), control.DisplayRectangle); 4823Assert.Equal(expected.Y + expected.Height, control.Bottom); 4825Assert.Equal(expected.Height, control.Height); 4846Assert.Equal(new Rectangle(0, 0, expected.Width, expected.Height), control.ClientRectangle); 4847Assert.Equal(new Rectangle(0, 0, expected.Width, expected.Height), control.DisplayRectangle); 4853Assert.Equal(expected.Y + expected.Height, control.Bottom); 4855Assert.Equal(expected.Height, control.Height);
System\Windows\Forms\TextBoxRendererTests.cs (3)
44? Validate.Polygon16(new(new(1, 1), new(bounds.Width - 2, bounds.Height - 2))) 74? Validate.Polygon16(new(new(1, 1), new(bounds.Width - 2, bounds.Height - 2))) 110? Validate.Polygon16(new(new(1, 1), new(bounds.Width - 2, bounds.Height - 2)))
System\Windows\Forms\ToolStripButtonTests.cs (4)
1305Assert.Equal(0, e.ImageRectangle.Height); 1323Assert.True(e.TextRectangle.Height >= 0); 1396Assert.Equal(0, e.ImageRectangle.Height); 1414Assert.True(e.TextRectangle.Height >= 0);
System\Windows\Forms\ToolStripDropDownTests.cs (1)
4893items[i].SetBounds(0, items[i - 1].Bounds.Bottom + 1, items[i].Bounds.Width, items[i].Bounds.Height);
System\Windows\Forms\ToolStripItemTests.cs (10)
14562Assert.Equal(bounds.Height, item.Height); 14570Assert.Equal(bounds.Height, item.Height); 14600Assert.Equal(bounds.Height, item.Height); 14610Assert.Equal(bounds.Height, item.Height); 14654Assert.Equal(bounds.Height, item.Height); 14667Assert.Equal(bounds.Height, item.Height); 14728Assert.Equal(bounds.Height, item.Height); 14738Assert.Equal(bounds.Height, item.Height); 14789Assert.Equal(bounds.Height, item.Height); 14802Assert.Equal(bounds.Height, item.Height);
System\Windows\Forms\ToolStripSeparatorTests.cs (14)
1382Assert.Equal(bounds.Height, item.Height); 1390Assert.Equal(bounds.Height, item.Height); 1420Assert.Equal(bounds.Height, item.Height); 1430Assert.Equal(bounds.Height, item.Height); 1479Assert.Equal(new Rectangle(2, bounds.Y, 57, bounds.Height), item.Bounds); 1480Assert.Equal(new Size(57, bounds.Height), item.Size); 1482Assert.Equal(bounds.Height, item.Height); 1489Assert.Equal(new Rectangle(2, bounds.Y, 57, bounds.Height), item.Bounds); 1490Assert.Equal(new Size(57, bounds.Height), item.Size); 1492Assert.Equal(bounds.Height, item.Height); 1550Assert.Equal(bounds.Height, item.Height); 1560Assert.Equal(bounds.Height, item.Height); 1604Assert.Equal(bounds.Height, item.Height); 1614Assert.Equal(bounds.Height, item.Height);
System\Windows\Forms\ToolStripTests.cs (2)
103Assert.Equal(25, control.GripRectangle.Height); 257Assert.Equal(25, control.GripRectangle.Height);
System\Windows\Forms\ToolStripTests.Rendering.cs (9)
33Rectangle bitBltBounds = new(bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1); 39new(0, bounds.Height - 2, 1, bounds.Height - 1), 40new(bounds.Width - 1, bounds.Height - 2, bounds.Width, bounds.Height - 1), 41new(0, bounds.Height - 1, 2, bounds.Height), 42new(bounds.Width - 2, bounds.Height - 1, bounds.Width, bounds.Height)
System\Windows\Forms\TreeNodeCollectionTests.cs (1)
23Assert.True(treeNode.Bounds.Height > 0);
System\Windows\Forms\TreeNodeTests.cs (2)
460Assert.True(bounds.Height > 0); 482Assert.True(bounds.Height > 0);
System\Windows\Forms\VScrollBarTests.cs (3)
30Assert.True(control.Bounds.Height > 0); 41Assert.True(control.ClientRectangle.Height > 0); 63Assert.True(control.DisplayRectangle.Height > 0);
System.Windows.Forms.UI.IntegrationTests (29)
AnchorLayoutTests.cs (4)
223button.SetBounds(bounds.X + 5, bounds.Y + 5, bounds.Width + 10, bounds.Height + 10, BoundsSpecified.None); 226button.SetBounds(bounds.X + 5, bounds.Y + 5, bounds.Width + 10, bounds.Height + 10, BoundsSpecified.All); 230button.SetBounds(bounds.X + 5, bounds.Y + 5, bounds.Width + 10, bounds.Height + 10); 253Assert.Equal(expectedHeight, newButtonBounds.Height);
ButtonTests.cs (9)
120Point mouseDragHandleOnForm = new(form.DisplayRectangle.Right, form.DisplayRectangle.Top + form.DisplayRectangle.Height / 2); 131Assert.Equal(originalFormSize.Height, form.DisplayRectangle.Height); 151.MoveMouseBy(0, form.DisplayRectangle.Height) 154Assert.True(form.DisplayRectangle.Height > originalFormSize.Height); 170Point mouseDragHandleOnForm = new(form.DisplayRectangle.Right, form.DisplayRectangle.Top + form.DisplayRectangle.Height / 2); 181Assert.Equal(originalFormSize.Height, form.DisplayRectangle.Height); 207.MoveMouseBy(0, form.DisplayRectangle.Height) 210Assert.True(form.DisplayRectangle.Height > originalFormSize.Height); 216Assert.Equal(originalFormSize.Height - originalButtonPosition.Bottom, form.DisplayRectangle.Height - button.DisplayRectangle.Bottom);
Dpi\FormDpiTests.cs (2)
42Assert.NotEqual(initialBounds.Height, form.Bounds.Height);
DragDropTests.cs (4)
200Y = (startCoordinates.Y - vscreen.Top) * DesktopNormalizedMax / vscreen.Height + DesktopNormalizedMax / (vscreen.Height * 2) 205Y = (endCoordinates.Y - vscreen.Top) * DesktopNormalizedMax / vscreen.Height + DesktopNormalizedMax / (vscreen.Height * 2)
FormTests.cs (4)
73Assert.True(form.Height >= screenWorkingArea.Height); 74Assert.True(form.Height <= screenWorkingArea.Height + (borderSize * 2)); 134Assert.True(form.Height >= screenWorkingArea.Height); 135Assert.True(form.Height <= screenWorkingArea.Height + (borderSize * 2));
Infra\ScreenshotService.cs (1)
53int height = primaryScreen.Bounds.Height;
ListBoxAccesibleObjectTests.cs (1)
39Point testPoint = listBox.PointToScreen(new Point(0, listBox.ClientRectangle.Height - 1));
ListBoxItemAccessibleObjestTests.cs (1)
31boundsAfterHandleCreation.Height.Should().BeLessOrEqualTo(listBox.Height);
PropertyGridViewTests.cs (3)
35int entryHeight = propertyGridView.AccessibilityGetGridEntryBounds(entry).Height; 44int itemHeight = propertyGridView.AccessibilityGetGridEntryBounds(item).Height; 53Assert.Equal(heightSum, propertyGridView.AccessibilityObject.Bounds.Height - borderHeight - entriesBorders);
WindowsFormsIntegration (3)
System\Windows\Integration\HostUtils.cs (3)
174if (control.ClientRectangle.Width == 0 || control.ClientRectangle.Height == 0) 179SD.Bitmap bitmap = new SD.Bitmap(control.ClientRectangle.Width, control.ClientRectangle.Height); 197SD.Bitmap returnBitmap = new SD.Bitmap(childElementHost.ClientRectangle.Width, childElementHost.ClientRectangle.Height);
WinFormsControlsTest (2)
CustomComCtl32Button.cs (1)
100int height = sender.ClientRectangle.Height - 10;
TrackBars.cs (1)
50trackBar1.Height = ClientRectangle.Height - trackBar1.Top * 2;