203 writes to Y
System.Drawing.Common.Tests (2)
mono\System.Drawing\GraphicsTests.cs (2)
2881arcrect.Y = baserect.Bottom - d; 2923arcrect.Y = baserect.Bottom - d;
System.Drawing.Primitives (4)
System\Drawing\Rectangle.cs (4)
64Y = value.Y; 249Y -= height; 279Y = result.Y; 336Y += y;
System.Windows.Forms (143)
System\Windows\Forms\Control.cs (1)
8161rectangle.Y++;
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (1)
399imageBounds.Y = imageStart.Y + 1;
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.LayoutOptions.cs (14)
295layout.Focus.Y++; 383layout.CheckBounds.Y = (field.Y + field.Height) - layout.CheckBounds.Height; 387layout.CheckBounds.Y = field.Y + 2; // + 2: this needs to be aligned to the text ( 391layout.CheckBounds.Y = field.Y + (field.Height - layout.CheckBounds.Height) / 2; 402layout.CheckArea.Y = field.Y; 414layout.CheckArea.Y = field.Y; 423layout.CheckArea.Y = field.Y; 426layout.Field.Y += checkSizeFull; 434layout.CheckArea.Y = field.Y + field.Height - checkSizeFull; 579layout.TextBounds.Y = Math.Max( 610layout.TextBounds.Y = layout.ImageBounds.Y + layout.ImageBounds.Height; 617layout.TextBounds.Y--; 646layout.TextBounds.Y = Math.Max(layout.TextBounds.Y, maxBounds.Y); 653layout.TextBounds.Y = Math.Max(layout.TextBounds.Y, layout.Field.Y);
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxBaseAdapter.cs (1)
196fullSize.Y -= layout.Options.DotNetOneButtonCompat ? 1 : 2;
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (29)
2438clip.Y += MinimumColumnHeadersHeight - mouseBarOffset - 1; 2777clip.Y = topEdge + Rows.SharedRow(index).GetMinimumHeight(index) - mouseBarOffset - 1; 3030r.Y = Math.Min(inside.Bottom - 3, r.Y); 3031r.Y = Math.Max(r.Y, 0); 4392insideLeft.Y += colHeaders.Height; 4466insideLeft.Y++; 5518rectScrollingArea.Y += frozenVisibleRowsHeight; 6837rect.Y--; 8314columnRect.Y -= _layout.ColumnHeaders.Height; 14500rightArea.Y--; 16769gridRect.Y--; 16820focusRect.Y -= change; 16845edge.Y += rect.Height - 1; 19219rcBelowRows.Y += _layout.ColumnHeaders.Height; 19224rcBelowRows.Y++; 19228rcBelowRows.Y += visibleRowsHeight; 19298edge.Y = bounds.Height - borderWidth; 19303edge.Y = 0; 19531rc.Y += columnHeadersHeight; 19597rowBounds.Y = boundingRect.Y + cy; 19653rowBounds.Y = boundingRect.Y + cy; 19850editingZone.Y += totalVisibleFrozenHeight; 19889cellBounds.Y--; 19890cellClip.Y--; 26346rowsRect.Y++; 26358rowsRect.Y += frozenRowsThickness; 26381rowsRect.Y = _layout.Inside.Y; 29034bottomArea.Y = topEdge; 29102bottomArea.Y = topEdge;
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (1)
418s_rectThemeMargins.Y = rectContent.Y;
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (6)
842rect.Y = (advancedBorderStyle.Top == DataGridViewAdvancedCellBorderStyle.None) ? 0 : 1; 845rect.Y++; 3572iconBounds.Y += cellBounds.Y; 3615rectPadding.Y = bounds.Y; 3619rectPadding.Y = bounds.Bottom - cellStyle.Padding.Bottom; 3805borderAndPaddingWidths.Y += cellStyle.Padding.Top;
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (2)
1367fullSize.Y--; 1387checkBounds.Y -= 3;
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (2)
850valBounds.Y += rectThemeMargins.Y; 898valBounds.Y += VerticalMargin;
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (5)
533borderAndPaddingWidths.Y += cellStyle.Padding.Top; 1332rectBottomSection.Y += 21; 2200dropRect.Y--; 2264focusBounds.Y--; 2273focusBounds.Y++;
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (1)
388s_rectThemeMargins.Y = rectContent.Y;
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (3)
652imageBounds.Y = bounds.Y; 658imageBounds.Y = bounds.Y + (bounds.Height - imageBounds.Height) / 2; 664imageBounds.Y = bounds.Bottom - imageBounds.Height;
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (1)
723valBounds.Y += rectThemeMargins.X;
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (3)
194editingControlBounds.Y += DATAGRIDVIEWTEXTBOXCELL_verticalTextOffsetTop; 242editingControlBounds.Y += (editingControlBounds.Height - preferredHeight) / 2; 247editingControlBounds.Y += editingControlBounds.Height - preferredHeight;
System\Windows\Forms\Controls\GroupBox\GroupBoxRenderer.cs (2)
208boxBounds.Y += font.Height / 2; 232clipMiddle.Y = textBounds.Bottom;
System\Windows\Forms\Controls\ListView\ListView.cs (1)
5013rectInvalid.X = rectInvalid.Y = 0;
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (2)
362result.Y += (result.Height - _image.Height) / 2; 372result.Y = (ClientRectangle.Height - result.Height) / 2;
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (1)
1886rectangle.Y = y - s_cyDivider;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (1)
1617rect.Y -= 1;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (3)
1905rect.Y = row * (RowHeight + 1) + 1 + _location.Y; 1974boundsScroll.Y = 1; 2296drawBounds.Y += 1;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (1)
447newBounds.Y = _dragBaseRect.Top + delta;
System\Windows\Forms\Controls\Splitter\Splitter.cs (3)
406bounds.Y += bounds.Height - _splitSize; 568r.Y = bounds.Y + splitSize; 576r.Y = bounds.Y + bounds.Height - splitSize - r.Height;
System\Windows\Forms\Controls\TabControl\TabControl.cs (1)
389r.Y -= p.Y;
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (3)
744rect.Y += gripheight; 4177gripRectangle.Y = Math.Max(0, displayRect.Top - Grip.Margin.Top); 4194gripRectangle.Y = displayRect.Top - (Grip.GripThickness + Grip.Margin.Bottom);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (5)
96rect.Y += UpScrollButton.Height + UpScrollButton.Margin.Vertical; 456_textRectangle.Y = LayoutUtils.VAlign(_textRectangle.Size, new Rectangle(Point.Empty, _maxItemSize), ContentAlignment.MiddleCenter).Y; 457_textRectangle.Y += (_textRectangle.Height % 2); // if the height is odd, push down by one px 664adjustedLastItemBounds.Y -= deltaToScroll; 691adjustedLastItemBounds.Y -= deltaToScroll;
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.ToolStripMenuItemInternalLayout.cs (3)
74arrowRect.Y = LayoutUtils.VAlign(arrowRect.Size, _ownerItem.ClientBounds, ContentAlignment.MiddleCenter).Y; 96checkRectangle.Y += (checkRectangle.Height - imageHeight) / 2; 130imageRect.Y = LayoutUtils.VAlign(imageRect.Size, _ownerItem.ClientBounds, ContentAlignment.MiddleCenter).Y;
System\Windows\Forms\Controls\ToolStrips\ToolStripOverflowButton.cs (1)
97bounds.Y = 0;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.cs (1)
592cachedBounds.Y -= cellOffsets[i];
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.HorizontalRowManager.cs (1)
60dragBounds.Y = y;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.VerticalRowManager.cs (1)
72dragBounds.Y -= Row.Margin.Top + ToolStripPanel.Padding.Top + 4;
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (7)
698bounds.Y += 2; 980endGradient.Y = bounds.Bottom - endGradient.Height; 1008endGradient.Y += 1; 1235overflowBoundsFill.Y = overflowBoundsFill.Height - _overflowButtonWidth + 1; 1359topLeftShadowRect2.Y += 1; 1367topRightShadowRect2.Y += 1; 1464bounds.Y += 3;
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemRenderer.cs (1)
291bounds.Y = Math.Max(0, (e.GripBounds.Height - bounds.Height - 2/*number of pixels for border*/) / 2);
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (2)
549backRect.Y--; 564backRect.Y--;
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 (1)
262bounds.Y = bounds.Height + bounds.Y + BUTTON_PAD;
System\Windows\Forms\ErrorProvider\ErrorProvider.ErrorWindow.cs (1)
323iconBounds.Y -= _windowBounds.Y;
System\Windows\Forms\Form.cs (3)
902bounds.Y -= screen.Y; 5187_restoredWindowBounds.Y = y; 5211_restoreBounds.Y = y;
System\Windows\Forms\Input\Cursor.cs (1)
254targetRect.Y += (int)graphics.Transform.OffsetY;
System\Windows\Forms\Internal\WinFormsUtils.cs (2)
105bounds.Y = constrainingBounds.Bottom - 1 - bounds.Height; 110bounds.Y = constrainingBounds.Top;
System\Windows\Forms\Layout\CommonProperties.cs (1)
306originalBounds.Y = y;
System\Windows\Forms\Layout\Containers\SplitContainer.cs (5)
768r.Y = _splitterRect.Y - Top; 1365_splitterRect.Y = Location.Y + SplitterDistanceInternal; 1405r.Y = Panel1.Location.Y + splitSize; 1572_splitterRect.Y = Location.Y; 1579_splitterRect.Y = Location.Y + SplitterDistanceInternal;
System\Windows\Forms\Layout\DefaultLayout.cs (1)
406remainingBounds.Y += element.Bounds.Height;
System\Windows\Forms\Layout\FlowLayout.ContainerProxy.cs (1)
55value.Y = DisplayRect.Bottom - value.Bottom;
System\Windows\Forms\Layout\LayoutUtils.cs (8)
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; 375rect.Y -= padding.Top; 384rect.Y += padding.Top; 520region2.Y += specifiedContent.Height; 524region1.Y += bounds.Height - specifiedContent.Height;
System\Windows\Forms\Rendering\ControlPaint.cs (2)
94result.Y = (bounds.Height - result.Height) / 2; 112result.Y = (bounds.Height - result.Height) / 2;
System\Windows\Forms\Rendering\TextExtensions.cs (2)
185adjustedBounds.Y = adjustedBounds.Top + adjustedBounds.Height / 2 - textHeight / 2; 190adjustedBounds.Y = adjustedBounds.Bottom - textHeight;
System\Windows\Forms\Scrolling\ScrollableControl.cs (2)
198rect.Y = _displayRect.Y; 789_displayRect.Y = y;
System.Windows.Forms.Design (53)
System\Drawing\Design\ColorEditor.ColorPalette.cs (2)
124rect.Y = s_marginY + down * (s_cellSizeY + s_marginY); 368Y = s_marginY
System\Drawing\Design\ColorEditor.ColorUI.cs (1)
311rectTabControl.Y = 0;
System\Drawing\Design\IconEditor.cs (1)
128rectangle.Y += (rectangle.Height - icon.Height) / 2;
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (1)
216controlRect.Y += offset.Y; // offset for non-client area
System\Windows\Forms\Design\Behavior\NoResizeSelectionBorderGlyph.cs (1)
47hitBounds.Y -= (DesignerUtils.s_selectionBorderHitArea - DesignerUtils.s_selectionBorderSize) / 2;
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (3)
138rect.Y += _parentGridSize.Height - yDelta; 143rect.Y -= yDelta; 704bounds.Y = Math.Min(baseBounds.Bottom - minHeight, baseBounds.Y - yOffset);
System\Windows\Forms\Design\Behavior\SelectionBorderGlyph.cs (2)
45hitBounds.Y -= (DesignerUtils.s_selectionBorderHitArea - DesignerUtils.s_selectionBorderSize) / 2; 56hitBounds.Y -= (DesignerUtils.s_selectionBorderHitArea - DesignerUtils.s_selectionBorderSize) / 2;
System\Windows\Forms\Design\ComponentTray.cs (5)
1206_mouseDragWorkspace.Y = Math.Min(start.Y, end.Y); 1341Y = Math.Min(_mouseDragStart.Y, e.Y), 2276rc.Y += _borderWidth; 2293rc.Y += (_cyIcon + WhiteSpace); 2307rc.Y += 3;
System\Windows\Forms\Design\ControlDesigner.cs (2)
2247borderRectangle.Y++; 2254textRect.Y = imageRect.Y;
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (1)
992bounds.Y += OWNERDRAWITEMIMAGEBUFFER;
System\Windows\Forms\Design\DesignerUtils.cs (2)
574newBounds.Y += e.Offset.Y; // snap to top - so move up our bounds 578newBounds.Y = originalBounds.Y - originalBounds.Height + e.Offset.Y;
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (2)
220bounds.Y -= margin.Top; 321_childInfo[controlIndex].MarginBounds.Y = size.Min;
System\Windows\Forms\Design\OleDragDropHandler.cs (3)
373newRect.Y = oldOffset.Y; 394newRect.Y = newOffset.Y; 770bounds.Y = dropPt.Y + pt.Y;
System\Windows\Forms\Design\ParentControlDesigner.cs (14)
313displayRectangle.Y += offset.Y; // offset for non-client area 466bounds.Y = location.Y; 491bounds.Y = DefaultControlLocation.Y; 497bounds.Y = selectedControl.Location.Y + GridSize.Height; 534bounds.Y += offset.Height; 926centeredLocation.Y = DefaultControlLocation.Y; 1111adjustedRect.Y = minimumLocation.Y; 1143updatedRect.Y = originalRect.Y; 1159updatedRect.Y = (dragRect.Y / gridSize.Height) * gridSize.Height; 1164updatedRect.Y += gridSize.Height; 1921_mouseDragOffset.Y = _mouseDragBase.Y; 1955_mouseDragOffset.Y += _mouseDragOffset.Height; 1990oldFrameRect.Y -= _adornerWindowToScreenOffset.Y; 2040paintRect.X = paintRect.Y = 0;
System\Windows\Forms\Design\SelectionUIHandler.cs (3)
106b.Y = bounds[i].Y; 355newBounds.Y = tempNewBounds.Y; 361newBounds.Y = tempNewBounds.Y;
System\Windows\Forms\Design\SelectionUIService.cs (4)
660_mouseDragOffset.Y = screenCoord.Y - _mouseDragAnchor.Y; 680_mouseDragOffset.Y = screenCoord.Y - _mouseDragAnchor.Y; 693delta.Y -= old.Y; 1075newOffset = offset with { X = 0, Y = 0 };
System\Windows\Forms\Design\SelectionUIService.SelectionUIItem.cs (3)
160rect.Y = inner.Y + inner.Height; 169rect.Y = outer.Y; 173rect.Y = inner.Y + (inner.Height - GRABHANDLE_HEIGHT) / 2;
System\Windows\Forms\Design\StatusCommandUI.cs (1)
58bounds.Y = location.Y;
System\Windows\Forms\Design\ToolStripItemDesigner.cs (2)
1254boundsInAdornerWindow.Y += (ToolStripItem.Height - _editorNode.EditorToolStrip.Height) / 2; 1255boundsInAdornerWindow.Y++;
System.Windows.Forms.Primitives.Tests (1)
System\Windows\Forms\DeviceContextHdcScopeTests.cs (1)
121expectedClipRect.Y -= 2;
1042 references to Y
PresentationUI (6)
MS\Internal\Documents\RMPublishingDialog.RightsTable.cs (1)
1036cellBounds.Y + (cellBounds.Height - boxSize.Height) / 2);
MS\Internal\Documents\SignatureSummaryDialog.cs (5)
658bounds.Y + CellPadding.Top, 668bounds.Y + CellPadding.Top, 676bounds.Y + CellPadding.Top, 703bounds.Y + CellPadding.Top, 711bounds.Y + CellPadding.Top,
System.ComponentModel.TypeConverter (2)
System\Drawing\RectangleConverter.cs (2)
76intConverter.ConvertToString(context, culture, rect.Y), 90rect.X, rect.Y, rect.Width, rect.Height});
System.Drawing.Common.Tests (63)
mono\System.Imaging\MetafileTest.cs (3)
69Assert.Equal(-40, header.Bounds.Y); 144Assert.Equal(0, header.Bounds.Y); 192Assert.Equal(0, mh.Bounds.Y);
System\Drawing\BitmapTests.cs (1)
383Color expectedColor = bitmap.GetPixel(rectangle.X + x, rectangle.Y + y);
System\Drawing\Imaging\ImageAttributesTests.cs (49)
77graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, clone); 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); 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); 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); 210graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 281graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 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); 348graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 371graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 398graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 427graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 487graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 500graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 513graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 543graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 557graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 586graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 599graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 612graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 645graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 676graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 692graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 726graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 743graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 760graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 792graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 807graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 821graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 855graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 870graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 910graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 936graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 966graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 1016graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 1031graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 1062graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 1130graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 1146graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 1176graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 1189graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 1202graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 1254graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr); 1268graphics.DrawImage(bitmap, _rectangle, _rectangle.X, _rectangle.Y, _rectangle.Width, _rectangle.Height, GraphicsUnit.Pixel, imageAttr);
System\Drawing\Printing\PrinterSettingsTests.cs (2)
460Assert.Equal((double)printerSettings.DefaultPageSettings.Bounds.Y, graphic.VisibleClipBounds.Y, 0); 483Assert.Equal((double)printerSettings.DefaultPageSettings.Bounds.Y, graphic.VisibleClipBounds.Y, 0);
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 (27)
System\Drawing\Rectangle.cs (26)
60readonly get => new Point(X, Y); 132public readonly int Top => Y; 146public readonly int Bottom => unchecked(Y + Height); 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); 279Y = result.Y; 292int y1 = Math.Max(a.Y, b.Y); 293int y2 = Math.Min(a.Y + a.Height, b.Y + b.Height); 308(rect.Y < Y + Height) && (Y < rect.Y + rect.Height); 317int y1 = Math.Min(a.Y, b.Y); 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 (2)
System\Private\Windows\Core\BinaryFormat\BinaryFormatWriter.cs (1)
168value.Y,
Windows\Win32\Graphics\Gdi\RegionScope.cs (1)
29Region = PInvokeCore.CreateRectRgn(rectangle.X, rectangle.Y, rectangle.Right, rectangle.Bottom);
System.Windows.Forms (663)
System\Windows\Forms\Accessibility\AccessibleObject.cs (2)
1700*pyTop = bounds.Y; 1713*pyTop = bounds.Y;
System\Windows\Forms\Accessibility\LabelEditUiaTextProvider.cs (1)
192Point ptStart = new(rectangle.X + 1, rectangle.Y + 1);
System\Windows\Forms\ActiveX\AxHost.cs (1)
1201if (oldBounds.X == x && oldBounds.Y == y && oldBounds.Width == width && oldBounds.Height == height)
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (1)
1702bounds.Location = new Point(bounds.X, bounds.Y);
System\Windows\Forms\ContextMenuStrip.cs (3)
99if (bounds.Y < screenBounds.Y) 110Show(bounds.X, bounds.Y);
System\Windows\Forms\Control.cs (12)
1011set => SetBounds(value.X, value.Y, value.Width, value.Height, BoundsSpecified.All); 4505cp.Y -= parentClient.Y; 4906|| targetBounds.X < 0 || targetBounds.Y < 0) 4936targetBounds.Y, 5282int sy = bounds.Y; 5300sy = (int)Math.Round(bounds.Y * dy); 8165e.Graphics.DrawRectangle(pen, rectangle.X, rectangle.Y, rectangle.Width - 1, rectangle.Height - 1); 8249newArgs.Graphics.TranslateClip(-shift.X, -shift.Y); 9786SetBoundsCore(rawScaledBounds.X, rawScaledBounds.Y, scaledSize.Width, scaledSize.Height, BoundsSpecified.All); 10075y = adjustedBounds.Y; 12646if (locationProperty is not null && !locationProperty.IsReadOnly && (bounds.X != _x || bounds.Y != _y)) 12664SetBoundsCore(bounds.X, bounds.Y, bounds.Width, bounds.Height, specified);
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (18)
137Point p1 = new(bounds.X + bounds.Width - 1, bounds.Y); // Upper inner right 138Point p2 = new(bounds.X, bounds.Y); // Upper left 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 192Point p1 = new(bounds.X + bounds.Width - 1, bounds.Y); // Upper inner right 193Point p2 = new(bounds.X, bounds.Y); // Upper left 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 240Point p1 = new(bounds.X + bounds.Width - 1, bounds.Y); // Upper inner right 241Point p2 = new(bounds.X, bounds.Y); // Upper left 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 332Rectangle left = new(bounds.X, bounds.Y, size, bounds.Height); 333Rectangle right = new(bounds.X + bounds.Width - size, bounds.Y, size, bounds.Height); 334Rectangle top = new(bounds.X + size, bounds.Y, bounds.Width - size * 2, size); 335Rectangle bottom = new(bounds.X + size, bounds.Y + bounds.Height - size, bounds.Width - size * 2, size); 411graphics.DrawImage(image, imageBounds.X, imageBounds.Y, image.Width, image.Height); 438graphics.DrawRectangle(pen, r.X, r.Y, r.Width - 1, r.Height - 1);
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.LayoutOptions.cs (19)
282layout.TextBounds.Y - 1, 358layout.CheckBounds = new Rectangle(Client.X, Client.Y, checkSizeFull, checkSizeFull); 383layout.CheckBounds.Y = (field.Y + field.Height) - layout.CheckBounds.Height; 387layout.CheckBounds.Y = field.Y + 2; // + 2: this needs to be aligned to the text ( 391layout.CheckBounds.Y = field.Y + (field.Height - layout.CheckBounds.Height) / 2; 402layout.CheckArea.Y = field.Y; 414layout.CheckArea.Y = field.Y; 423layout.CheckArea.Y = field.Y; 434layout.CheckArea.Y = field.Y + field.Height - checkSizeFull; 580Math.Min(layout.TextBounds.Y, layout.Field.Y + (layout.Field.Height - layout.TextBounds.Height) / 2), 581layout.Field.Y); 582layout.TextBounds.Height = textBottom - layout.TextBounds.Y; 610layout.TextBounds.Y = layout.ImageBounds.Y + layout.ImageBounds.Height; 646layout.TextBounds.Y = Math.Max(layout.TextBounds.Y, maxBounds.Y); 653layout.TextBounds.Y = Math.Max(layout.TextBounds.Y, layout.Field.Y); 656layout.TextBounds.Height = bottom - layout.TextBounds.Y;
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonBaseAdapter.cs (29)
105hdc.FillRectangle(fieldBrush, new(bounds.X + 2, bounds.Y + 2, 8, 8)); 106hdc.FillRectangle(fieldBrush, new(bounds.X + 4, bounds.Y + 1, 4, 10)); 107hdc.FillRectangle(fieldBrush, new(bounds.X + 1, bounds.Y + 4, 10, 4)); 109hdc.DrawLine(borderPen, new(bounds.X + 4, bounds.Y + 0), new(bounds.X + 8, bounds.Y + 0)); 110hdc.DrawLine(borderPen, new(bounds.X + 4, bounds.Y + 11), new(bounds.X + 8, bounds.Y + 11)); 112hdc.DrawLine(borderPen, new(bounds.X + 2, bounds.Y + 1), new(bounds.X + 4, bounds.Y + 1)); 113hdc.DrawLine(borderPen, new(bounds.X + 8, bounds.Y + 1), new(bounds.X + 10, bounds.Y + 1)); 115hdc.DrawLine(borderPen, new(bounds.X + 2, bounds.Y + 10), new(bounds.X + 4, bounds.Y + 10)); 116hdc.DrawLine(borderPen, new(bounds.X + 8, bounds.Y + 10), new(bounds.X + 10, bounds.Y + 10)); 118hdc.DrawLine(borderPen, new(bounds.X + 0, bounds.Y + 4), new(bounds.X + 0, bounds.Y + 8)); 119hdc.DrawLine(borderPen, new(bounds.X + 11, bounds.Y + 4), new(bounds.X + 11, bounds.Y + 8)); 121hdc.DrawLine(borderPen, new(bounds.X + 1, bounds.Y + 2), new(bounds.X + 1, bounds.Y + 4)); 122hdc.DrawLine(borderPen, new(bounds.X + 1, bounds.Y + 8), new(bounds.X + 1, bounds.Y + 10)); 124hdc.DrawLine(borderPen, new(bounds.X + 10, bounds.Y + 2), new(bounds.X + 10, bounds.Y + 4)); 125hdc.DrawLine(borderPen, new(bounds.X + 10, bounds.Y + 8), new(bounds.X + 10, bounds.Y + 10)); 154layout.CheckBounds.Y + GetScaledNumber(offset - 1, scale), 162layout.CheckBounds.Y + GetScaledNumber(offset, scale),
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxUiaTextProvider.cs (1)
253Point ptStart = new(rectangle.X + 1, rectangle.Y + 1);
System\Windows\Forms\Controls\ComboBox\ComboBox.FlatComboAdapter.cs (7)
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));
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (1)
4070Invalidate(new Rectangle(_layout.Inside.X, _layout.Inside.Y, RowHeadersWidth, ColumnHeadersHeight));
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (35)
2778clip.Height = _layout.Data.Y + _layout.Data.Height - topEdge - 1; 2981inside.Y, 2991inside.Y, 3006inside.Y, 3030r.Y = Math.Min(inside.Bottom - 3, r.Y); 3031r.Y = Math.Max(r.Y, 0); 4478Debug.Assert(newLayout.Data.Y >= 0); 5713PInvoke.PatBlt(dc, r.X, r.Y, r.Width, DATAGRIDVIEW_shadowEdgeThickness, ROP_CODE.PATINVERT); 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); 6053int delta = y - _layout.ColumnHeaders.Y - ColumnHeadersHeight + 1; 8308? new Rectangle(cx - displayWidth, data.Y, displayWidth, data.Height) 8309: new Rectangle(cx, data.Y, displayWidth, data.Height); 9044int cy = data.Y; 9114Debug.Assert(y >= data.Y - 1 && y < data.Bottom, "y must be inside the vertical bounds of the data area."); 9116if (y == data.Y - 1) 9122int cy = data.Y; 9204int y = _layout.Data.Y; 10347int vertScrollBarTop = _layout.Data.Y; 10351vertScrollBarTop = _layout.ColumnHeaders.Y; 16767if (gridRect.Y == _layout.Data.Y) 17450oldClientRectangle.Y, 17454oldClientRectangle.Y + oldClientRectangle.Height - borderWidth, 17472newClientRectangle.Y, 17482newClientRectangle.Y + newClientRectangle.Height - borderWidth, 17492oldGridFocusRectangle.Y, 17498oldGridFocusRectangle.Y + oldGridFocusRectangle.Height - 1, 19597rowBounds.Y = boundingRect.Y + cy; 19653rowBounds.Y = boundingRect.Y + cy; 26381rowsRect.Y = _layout.Inside.Y; 29033bottomArea.Height -= bottomArea.Y - topEdge; 29101bottomArea.Height -= bottomArea.Y - topEdge;
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (3)
311marginHeights = rectThemeMargins.Y + rectThemeMargins.Height; 418s_rectThemeMargins.Y = rectContent.Y; 681valBounds.Offset(borderWidths.X, borderWidths.Y);
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (55)
1022cellValueBounds.Y + (cellValueBounds.Height - s_iconsHeight) / 2, 3163bounds.Y, 3213graphics.DrawLine(penGridColor, bounds.X, bounds.Y, bounds.X, bounds.Bottom - 1); 3217graphics.DrawLine(penControlDark, bounds.X, bounds.Y, bounds.X, bounds.Bottom - 1); 3221graphics.DrawLine(penControlLightLight, bounds.X, bounds.Y, bounds.X, bounds.Bottom - 1); 3225y1 = bounds.Y + 2; 3237graphics.DrawLine(penBackColor, bounds.X, bounds.Y, bounds.X, bounds.Bottom - 1); 3242y1 = bounds.Y + 1; 3255graphics.DrawLine(penControlDark, bounds.X, bounds.Y, bounds.X, bounds.Bottom - 1); 3260y1 = bounds.Y + 1; 3273graphics.DrawLine(penControlLightLight, bounds.X, bounds.Y, bounds.X, bounds.Bottom - 1); 3281graphics.DrawLine(penGridColor, bounds.Right - 1, bounds.Y, bounds.Right - 1, bounds.Bottom - 1); 3285graphics.DrawLine(penControlLightLight, bounds.Right - 1, bounds.Y, bounds.Right - 1, bounds.Bottom - 1); 3289graphics.DrawLine(penControlDark, bounds.Right - 1, bounds.Y, bounds.Right - 1, bounds.Bottom - 1); 3293y1 = bounds.Y + 2; 3305graphics.DrawLine(penBackColor, bounds.Right - 1, bounds.Y, bounds.Right - 1, bounds.Bottom - 1); 3310y1 = bounds.Y + 1; 3323graphics.DrawLine(penControlDark, bounds.Right - 2, bounds.Y, bounds.Right - 2, bounds.Bottom - 1); 3328y1 = bounds.Y + 1; 3342graphics.DrawLine(penControlLightLight, bounds.Right - 2, bounds.Y, bounds.Right - 2, bounds.Bottom - 1); 3351graphics.DrawLine(penGridColor, bounds.X, bounds.Y, bounds.Right - 1, bounds.Y); 3369graphics.DrawLine(penControlDark, x1, bounds.Y, x2, bounds.Y); 3387graphics.DrawLine(penControlLightLight, x1, bounds.Y, x2, bounds.Y); 3413graphics.DrawLine(penBackColor, x1, bounds.Y, x2, bounds.Y); 3414graphics.DrawLine(penControlLightLight, x1 + 1, bounds.Y, x2 - 1, bounds.Y); 3432graphics.DrawLine(penControlDark, bounds.X, bounds.Y, bounds.Right - 1, bounds.Y); 3433graphics.DrawLine(penControlLightLight, x1, bounds.Y + 1, x2, bounds.Y + 1); 3451graphics.DrawLine(penControlLightLight, bounds.X, bounds.Y, bounds.Right - 1, bounds.Y); 3452graphics.DrawLine(penControlDark, x1, bounds.Y + 1, x2, bounds.Y + 1); 3572iconBounds.Y += cellBounds.Y; 3598rectPadding = new Rectangle(bounds.X, bounds.Y, cellStyle.Padding.Right, bounds.Height); 3607rectPadding = new Rectangle(bounds.X, bounds.Y, cellStyle.Padding.Left, bounds.Height); 3615rectPadding.Y = bounds.Y; 3767DataGridView.EditingControl.Location = new Point(editingControlBounds.X, editingControlBounds.Y); 3835if (cellClip.Y - cellBounds.Y >= borderAndPaddingWidths.Y) 3837yEditingPanel = cellClip.Y; 3838hEditingPanel -= cellClip.Y - cellBounds.Y; 3842yEditingPanel = cellBounds.Y + borderAndPaddingWidths.Y; 3843hEditingPanel -= borderAndPaddingWidths.Y; 3855yEditingControl = cellBounds.Y - cellClip.Y; 3856hEditingControl = cellBounds.Height - borderAndPaddingWidths.Y - borderAndPaddingWidths.Height;
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (2)
736preferredSize.Height += borderWidths.Y; 1064valBounds.Offset(borderWidths.X, borderWidths.Y);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (4)
698preferredSize.Height += rectThemeMargins.Y + rectThemeMargins.Height; 766valBounds.Offset(borderWidths.X, borderWidths.Y); 850valBounds.Y += rectThemeMargins.Y; 851valBounds.Height -= rectThemeMargins.Y + rectThemeMargins.Height;
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (29)
538size.Height - borderAndPaddingWidths.Y - borderAndPaddingWidths.Height); 549y >= borderAndPaddingWidths.Y + 1 && 550y <= borderAndPaddingWidths.Y + 1 + dropHeight) 1914valBounds.Offset(borderWidths.X, borderWidths.Y); 1983g.DrawRectangle(SystemPens.ControlLightLight, new Rectangle(valBounds.X, valBounds.Y, valBounds.Width - 1, valBounds.Height - 1)); 2095g.DrawLine(pen, dropRect.X, dropRect.Y, 2096dropRect.X + dropRect.Width - 1, dropRect.Y); 2097g.DrawLine(pen, dropRect.X, dropRect.Y, 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); 2106g.DrawLine(pen, valBounds.X + valBounds.Width - 1, valBounds.Y, 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); 2117g.DrawLine(pen, dropRect.X + dropRect.Width - 1, dropRect.Y, 2118dropRect.X + dropRect.Width - 1, dropRect.Y + dropRect.Height - 1); 2124g.DrawLine(pen, valBounds.X, valBounds.Y, 2125valBounds.X + valBounds.Width - 2, valBounds.Y); 2126g.DrawLine(pen, valBounds.X, valBounds.Y, 2127valBounds.X, valBounds.Y + valBounds.Height - 1); 2134g.DrawLine(pen, dropRect.X + 1, dropRect.Y + 1, 2135dropRect.X + dropRect.Width - 2, dropRect.Y + 1); 2136g.DrawLine(pen, dropRect.X + 1, dropRect.Y + 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); 2146g.DrawLine(pen, dropRect.X + dropRect.Width - 2, dropRect.Y + 1, 2147dropRect.X + dropRect.Width - 2, dropRect.Y + dropRect.Height - 2);
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (3)
388s_rectThemeMargins.Y = rectContent.Y; 394s_rectThemeMargins.Y + s_rectThemeMargins.Width + s_rectThemeMargins.Height == 0) 539bounds.Offset(borderWidths.X, borderWidths.Y);
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (6)
584imageBounds = new Rectangle(bounds.X, bounds.Y, imgWidth, imgHeight); 593bounds.Y, 602bounds.Y, 652imageBounds.Y = bounds.Y; 658imageBounds.Y = bounds.Y + (bounds.Height - imageBounds.Height) / 2; 746valBounds.Offset(borderWidths.X, borderWidths.Y);
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (1)
906valBounds.Offset(borderWidths.X, borderWidths.Y);
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (5)
539borderAndPaddingWidths += rectThemeMargins.Y; 648valBounds.Offset(borderWidths.X, borderWidths.Y); 718valBounds.X += rectThemeMargins.Y; 721valBounds.Width -= rectThemeMargins.Y + rectThemeMargins.Height; 1028int height = bounds.Y + (bounds.Height - s_iconsHeight) / 2;
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (2)
671valBounds.Offset(borderWidths.X, borderWidths.Y); 798DataGridView!.EditingControl!.Location = new Point(editingControlBounds.X, editingControlBounds.Y);
System\Windows\Forms\Controls\DataGridView\DataGridViewTopLeftHeaderCell.cs (10)
235valBounds.Offset(borderWidths.X, borderWidths.Y); 378graphics.DrawLine(penControlDark, bounds.X, bounds.Y, bounds.X, bounds.Bottom - 1); 379graphics.DrawLine(penControlDark, bounds.X, bounds.Y, bounds.Right - 1, bounds.Y); 384graphics.DrawLine(penControlLightLight, bounds.X, bounds.Y, bounds.X, bounds.Bottom - 1); 385graphics.DrawLine(penControlLightLight, bounds.X, bounds.Y, bounds.Right - 1, bounds.Y); 390graphics.DrawLine(penControlDark, bounds.X + 1, bounds.Y + 1, bounds.X + 1, bounds.Bottom - 1); 391graphics.DrawLine(penControlDark, bounds.X + 1, bounds.Y + 1, bounds.Right - 1, bounds.Y + 1);
System\Windows\Forms\Controls\DataGridView\DataGridViewUtilities.cs (6)
393ptTextLocation.Y = cellBounds.Y; 398ptTextLocation.Y = cellBounds.Y; 403ptTextLocation.Y = cellBounds.Y; 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 (2)
235Debug.Assert(textBounds.Y <= boxBounds.Y, "if text below box, need to render area of box above text");
System\Windows\Forms\Controls\Labels\Label.cs (5)
891yLoc = (r.Y + r.Height - 4) - pointImageSize.Height; 895yLoc = r.Y + 2; 899yLoc = r.Y + (r.Height - pointImageSize.Height) / 2; 991ControlPaint.DrawImageDisabled(g, image, loc.X, loc.Y, BackColor); 995g.DrawImage(image, loc.X, loc.Y, image.Width, image.Height);
System\Windows\Forms\Controls\Labels\LinkLabel.cs (3)
399yLoc = clientRect.Y; 415yLoc = clientRect.Y; 582clientRectWithPadding.Y,
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (5)
542bounds.Y + centeringFactor, 561CheckBoxRenderer.DrawCheckBoxWithVisualStyles(e, new Point(box.X, box.Y), cbState, HWNDInternal); 571bounds.Y, 628textBounds.Y, 721bounds.Y,
System\Windows\Forms\Controls\ListView\DrawListViewColumnHeaderEventArgs.cs (4)
113Graphics.DrawLine(SystemPens.ControlLightLight, r.X, r.Y, r.Right, r.Y); 114Graphics.DrawLine(SystemPens.ControlLightLight, r.X, r.Y, r.X, r.Bottom); 118Graphics.DrawLine(SystemPens.ControlDark, r.Right, r.Y + 1, r.Right, r.Bottom);
System\Windows\Forms\Controls\ListView\DrawListViewItemEventArgs.cs (1)
106resultBounds = new Rectangle(originalBounds.X, originalBounds.Y, textSize.Width, textSize.Height);
System\Windows\Forms\Controls\ListView\ListView.cs (1)
5012rectInvalid.Height += rectInvalid.Y;
System\Windows\Forms\Controls\ListView\ListViewItem.IKeyboardToolTip.cs (2)
97Point point = new(listviewBounds.X + itemBounds.X, listviewBounds.Y + itemBounds.Y);
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemBaseAccessibleObject.cs (2)
44_owningListView.AccessibilityObject.Bounds.Y + _owningItem.Bounds.Y,
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemListAccessibleObject.cs (2)
22_owningListView.AccessibilityObject.Bounds.Y + _owningItem.Bounds.Y,
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObject.cs (2)
65_owningListView.AccessibilityObject.Bounds.Y + bounds.Y,
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.MonthCalendarAccessibleObject.cs (2)
137int currentY = CalendarsAccessibleObjects.First?.Value.Bounds.Y ?? 0; 142if (calendar.Bounds.Y > currentY)
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (7)
1960y = Math.Min((rectTarget.Y + rectTarget.Height - 15), y); 1974ControlPaint.DrawReversibleLine(new Point(rc.X + i, rc.Y), new Point(rc.X + i, rc.Y + rc.Height), targetControl.BackColor); 1981ControlPaint.DrawReversibleLine(new Point(rc.X, rc.Y + i), new Point(rc.X + rc.Width, rc.Y + i), targetControl.BackColor); 2825if (_dividerMoveY != rectDoc.Y) 2828int yNew = rectDoc.Height + rectDoc.Y - _dividerMoveY - (s_cyDivider / 2);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CategoryGridEntry.cs (5)
121Rectangle focusRect = new(indent, rect.Y, labelWidth + 3, rect.Height - 1); 137g.DrawLine(topLinePen, rect.X - 1, rect.Y - 1, rect.Width + 2, rect.Y - 1); 154g.DrawLine(topLinePen, rect.X - 2, rect.Y - 1, rect.Width + 1, rect.Y - 1);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (15)
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); 1614_labelTipPoint = maxSpace <= labelWidth ? new Point(stringX + 2, rect.Y + 1) : InvalidPoint; 1756g.DrawRectangle(pen, outline.X, outline.Y, outline.Width - 1, outline.Height - 1); 1763outline.Y + outline.Height / 2, 1765outline.Y + outline.Height / 2); 1773outline.Y + indent, 1775outline.Y + outline.Height - indent - 1); 1847rect.Y + 1, 1907rect.Y - 1, 1946ValueToolTipLocation = doToolTip ? new Point(rect.X + 2, rect.Y - 1) : InvalidPoint;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (16)
456Point point = PointToScreen(new(rect.X, rect.Y)); 602Point pt = new(rect.X, rect.Y); 895control.SetBounds(targetRectangle.X, targetRectangle.Y, targetRectangle.Width, targetRectangle.Height); 1102Point newOrigin = new(rect.X, rect.Y); 1157Point newOrigin = new(rect.X, rect.Y); 1364return PARAM.ToInt(r.X, r.Y); 1427location.Y += rect.Y; 1428if (rectScreen.Y + rectScreen.Height < (size.Height + location.Y + EditTextBox.Height)) 2006rect.Height = Size.Height - rect.Y - 1; 2988gridEntry.OnMouseClick(e.X - r.X, e.Y - r.Y, e.Clicks, e.Button); 3056if (onLabel && gridItem.GetLabelToolTipLocation(e.X - itemRect.X, e.Y - itemRect.Y) != InvalidPoint) 3271Point startPosition = FindPosition(clipRect.X, clipRect.Y); 3272Point endPosition = FindPosition(clipRect.X, clipRect.Y + clipRect.Height); 3328yPosition = rect.Y + rect.Height; 4326rect.X + rect.Width - sizeBtn.Width, rect.Y, 5272tipPt = curEntry.GetLabelToolTipLocation(mouseLoc.X - itemRect.X, mouseLoc.Y - itemRect.Y);
System\Windows\Forms\Controls\Splitter\Splitter.cs (4)
568r.Y = bounds.Y + splitSize; 576r.Y = bounds.Y + bounds.Height - splitSize - r.Height; 702PInvoke.PatBlt(dc, r.X, r.Y, r.Width, r.Height, ROP_CODE.PATINVERT); 828int ySplit = r.Y;
System\Windows\Forms\Controls\TabControl\TabPage.cs (2)
618inflateRect.Y - 2, 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 (1)
371Point ptStart = new(rectangle.X + 1, rectangle.Y + 1);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (14)
202CommonProperties.UpdateSpecifiedBounds(this, bounds.X, bounds.Y, bounds.Width, bounds.Height, BoundsSpecified.Location); 2141selectedItem.Bounds.Y + selectedItem.Height / 2); 2667bounds.Y, 3547clippingRect.Offset(-bounds.X, -bounds.Y); 3559item.Bounds.Y, 3572item.Bounds.Y, 3788new(verticalBeamStart, _lastInsertionMarkRect.Y), new(verticalBeamStart, _lastInsertionMarkRect.Bottom - 1), 3789new(verticalBeamStart + 1, _lastInsertionMarkRect.Y), new(verticalBeamStart + 1, _lastInsertionMarkRect.Bottom - 1) 3802new(start, _lastInsertionMarkRect.Y), new(start + widthOfBeam - 1, _lastInsertionMarkRect.Y), 3803new(start + 1, _lastInsertionMarkRect.Y + 1), new(start + widthOfBeam - 2, _lastInsertionMarkRect.Y + 1) 3809int start = _lastInsertionMarkRect.Y; 4657SetBoundsCore(bounds.X, bounds.Y, bounds.Width, bounds.Height, specified);
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 (2)
1202SetBoundsCore(bounds.X, bounds.Y, bounds.Width, bounds.Height, BoundsSpecified.Location); 1528base.SetBoundsCore(bounds.X, bounds.Y, bounds.Width, bounds.Height, specified);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (4)
456_textRectangle.Y = LayoutUtils.VAlign(_textRectangle.Size, new Rectangle(Point.Empty, _maxItemSize), ContentAlignment.MiddleCenter).Y; 471if (displayRect.Y > nextItem.Bounds.Top) 473delta = nextItem.Bounds.Top - displayRect.Y; 477delta = nextItem.Bounds.Bottom - (displayRect.Y + displayRect.Height);
System\Windows\Forms\Controls\ToolStrips\ToolStripHighContrastRenderer.cs (10)
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); 302g.DrawLine(p, bounds.X + indent, bounds.Y, bounds.Width - 1, bounds.Y); 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); 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);
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (2)
953SetBounds(currentBounds.X, currentBounds.Y, currentBounds.Width, value); 2010SetBounds(currentBounds.X, currentBounds.Y, value, currentBounds.Height);
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.ToolStripMenuItemInternalLayout.cs (2)
74arrowRect.Y = LayoutUtils.VAlign(arrowRect.Size, _ownerItem.ClientBounds, ContentAlignment.MiddleCenter).Y; 130imageRect.Y = LayoutUtils.VAlign(imageRect.Size, _ownerItem.ClientBounds, ContentAlignment.MiddleCenter).Y;
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 (2)
894Point endLocation = (Orientation == Orientation.Horizontal) ? new Point(clientLocation.X, row.Bounds.Y) : new Point(row.Bounds.X, clientLocation.Y); 922clientLocation.Y = row.Bounds.Y;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.ToolStripPanelControlCollection.XYComparer.cs (2)
33return one.Bounds.Y < two.Bounds.Y ? -1 : 1;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.ToolStripPanelControlCollection.YXComparer.cs (4)
27if (one.Bounds.Y < two.Bounds.Y) 32if (one.Bounds.Y == two.Bounds.Y)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelCell.cs (1)
66Debug.Assert(_cachedBounds.X >= 0 && _cachedBounds.Y >= 0, "cached bounds are outside of the client area, investigate");
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.HorizontalRowManager.cs (2)
57int y = previousRowBounds.Y + previousRowBounds.Height - (previousRowBounds.Height >> 2); 59dragBounds.Height += dragBounds.Y - y;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.VerticalRowManager.cs (1)
427if (cell.Bounds.Y >= locationToDrag.Y)
System\Windows\Forms\Controls\ToolStrips\ToolStripProfessionalLowResolutionRenderer.cs (4)
67g.DrawLine(p, bounds.X + indent, bounds.Y, bounds.Width - 1, bounds.Y); 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);
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (14)
196overflowArrowRect.Y - Offset2Y, 198overflowArrowRect.Y - Offset2Y); 201overflowArrowRect.Y - Offset2Y + 1, 203overflowArrowRect.Y - Offset2Y + 1); 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); 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); 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); 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); 1596g.DrawRectangle(pen, bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1);
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackLayout.cs (1)
340itemLocation.Y = bounds.Y;
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemRenderer.cs (1)
467g.DrawRectangle(pen, bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1);
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 (4)
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); 150t_visualStyleRenderer.DrawEdge(g, new Rectangle(bounds.X, bounds.Y, bounds.Width, LineWidth), Edges.Top, edgeStyle, EdgeEffects.None); 159float y = bounds.Y + (numTicks - 1) * inc;
System\Windows\Forms\Controls\TreeView\TreeView.cs (2)
2829Point textLoc = new(bounds.X - 1, bounds.Y); // required to center the text 3431client = new Point(treeNode.Bounds.X, treeNode.Bounds.Y + treeNode.Bounds.Height / 2);
System\Windows\Forms\Design\ComponentEditorForm.cs (1)
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 (7)
159_windowBounds.Y, 199bounds.Y - _windowBounds.Y, 323iconBounds.Y -= _windowBounds.Y; 344iconRegion.Region.Translate(iconBounds.X, iconBounds.Y); 346iconRegion.Region.Translate(-iconBounds.X, -iconBounds.Y); 388_windowBounds.Y,
System\Windows\Forms\Form.cs (18)
902bounds.Y -= screen.Y; 907SetDesktopBounds(value.X, value.Y, value.Width, value.Height); 925loc.Y -= screen.Y; 1674&& _restoreBounds.Y == -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); 3871if (p.Y < screenRect.Y) 3873p.Y = screenRect.Y; 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); 5010SetBounds(_restoredWindowBounds.X, _restoredWindowBounds.Y, 5324SetBounds(x + workingArea.X, y + workingArea.Y, width, height, BoundsSpecified.All); 5333Location = new Point(workingArea.X + x, workingArea.Y + y); 6819mmi->ptMaxPosition.Y = maximizedBounds.Y;
System\Windows\Forms\Input\Cursor.cs (2)
273imageY = imageRect.Y; 286targetY = targetRect.Y;
System\Windows\Forms\Layout\CommonProperties.cs (1)
291bool yChangedButNotSpecified = ((specified & BoundsSpecified.Y) == BoundsSpecified.None) & y != originalBounds.Y;
System\Windows\Forms\Layout\Containers\ContainerControl.cs (1)
1420suggestedRectangle.Y,
System\Windows\Forms\Layout\Containers\SplitContainer.cs (9)
718OnSplitterMoved(new SplitterEventArgs(SplitterRectangle.X + SplitterRectangle.Width / 2, SplitterRectangle.Y + SplitterRectangle.Height / 2, SplitterRectangle.X, SplitterRectangle.Y)); 768r.Y = _splitterRect.Y - Top; 990int ySplit = r.Y; 991SplitterCancelEventArgs se = new(Left + SplitterRectangle.X + SplitterRectangle.Width / 2, Top + SplitterRectangle.Y + SplitterRectangle.Height / 2, xSplit, ySplit); 1103int ySplit = r.Y; 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 (11)
242int top = layout.Top + displayRect.Y; 244int bottom = layout.Bottom + displayRect.Y; 320if (bottom < top || cachedBounds.Height != element.Bounds.Height || cachedBounds.Y != element.Bounds.Y) 401Rectangle newElementBounds = new(remainingBounds.X, remainingBounds.Y, elementSize.Width, elementSize.Height); 427Rectangle newElementBounds = new(remainingBounds.X, remainingBounds.Y, elementSize.Width, elementSize.Height); 440Rectangle newElementBounds = new(remainingBounds.Right - elementSize.Width, remainingBounds.Y, elementSize.Width, elementSize.Height); 458Rectangle newElementBounds = new(remainingBounds.X, remainingBounds.Y, elementSize.Width, elementSize.Height); 755anchorInfo.Top -= parentDisplayRect.Y; 757anchorInfo.Bottom -= parentDisplayRect.Y; 880int y = elementBounds.Y;
System\Windows\Forms\Layout\FlowLayout.ContainerProxy.cs (2)
67Point pt = new(value.X, value.Y); 145Point pt = new(newBounds.X, newBounds.Y);
System\Windows\Forms\Layout\FlowLayout.cs (14)
76Rectangle measureBounds = new(displayRect.X, displayRect.Y, displayRect.Width, displayRect.Height - layoutSize.Height); 87layoutSize.Height + displayRect.Y, 322Debug.Assert(container.Children[0].Bounds.Y == margin.Top + container.DisplayRectangle.Y); 327Debug.Assert(container.Children[0].Bounds.Y == margin.Top + container.DisplayRectangle.Y); 330Debug.Assert(container.Children[0].Bounds.Y == container.DisplayRectangle.Y + container.DisplayRectangle.Height - container.Children[0].Bounds.Height - margin.Bottom); 343Debug.Assert(collection[i].Bounds.Y >= container.DisplayRectangle.Y); 347Debug.Assert(collection[i].Bounds.Y >= container.DisplayRectangle.Y); 351Debug.Assert(collection[i].Bounds.Y + collection[i].Bounds.Height <= container.DisplayRectangle.Y + container.DisplayRectangle.Height);
System\Windows\Forms\Layout\LayoutUtils.cs (8)
248if (rect1.Y <= rect2.Y && rect1.Y + rect1.Width >= rect2.Y + rect2.Width) 254if (rect2.Y <= rect1.Y && rect2.Y + rect2.Width >= rect1.Y + rect1.Width)
System\Windows\Forms\MDI\MDIClient.cs (2)
196int sy = (int)Math.Round(bounds.Y * dy); 198int sh = (int)Math.Round((bounds.Y + bounds.Height) * dy - sy);
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutPanel.cs (10)
371int starty = displayRect.Y + (cellBorderWidth / 2); 388outsideCellBounds.Y + (cellBorderWidth + 1) / 2, 434cellBorderWidth / 2 + displayRect.Y, 445tableBounds.Y, 452tableBounds.Y + tableBounds.Height - 1, 454tableBounds.Y + tableBounds.Height - 1); 461tableBounds.Y, 463tableBounds.Y + tableBounds.Height - 1); 467tableBounds.Y + tableBounds.Height - 1, 469tableBounds.Y + tableBounds.Height - 1);
System\Windows\Forms\Rendering\ControlPaint.cs (131)
110if (bounds.Y >= 0) 481partOfImageToDraw.Y, 491new Point(imageRect.X - imageRectangle.X, imageRect.Y - imageRectangle.Y), 498partOfImageToDraw.Y, 630leftLineTops[leftOffset] = bounds.Y + i + 1; 635rightLineTops[rightOffset] = bounds.Y + i; 641leftLineTops[j] = bounds.Y + i + 1; 646rightLineTops[j] = bounds.Y + i; 653leftLineTops[i] = bounds.Y; 658rightLineTops[i] = bounds.Y; 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; 723hdc.DrawLine(hpen, topLineLefts[i], bounds.Y + i, topLineRights[i] + 1, bounds.Y + i); 738graphics.DrawLine(pen, topLineLefts[i], bounds.Y + i, topLineRights[i], bounds.Y + i); 759hdc.DrawLine(hpen, topLineLefts[i], bounds.Y + i, topLineRights[i] + 1, bounds.Y + i); 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); 1066graphics.DrawLine(darkPen, bounds.X, bounds.Y, bounds.X + bounds.Width - 1, bounds.Y); 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); 1080graphics.DrawLine(mediumPen, bounds.X + 1, bounds.Y + 1, bounds.X + bounds.Width - 2, bounds.Y + 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); 1105graphics.DrawLine(lightPen, bounds.X, bounds.Y, bounds.X + bounds.Width - 1, bounds.Y); 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); 1125graphics.DrawLine(topLeftPen, bounds.X + 1, bounds.Y + 1, bounds.X + bounds.Width - 2, bounds.Y + 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); 1283graphics.DrawLine(pen, bounds.X + 1, bounds.Y, bounds.Right - 2, bounds.Y); 1285graphics.DrawLine(pen, bounds.X, bounds.Y + 1, bounds.X, bounds.Bottom - 2); 1286graphics.DrawLine(pen, bounds.Right - 1, bounds.Y + 1, bounds.Right - 1, bounds.Bottom - 2); 1289int midy = bounds.Y + bounds.Height / 2; 1292graphics.DrawLine(pen, midx, bounds.Y, midx, bounds.Bottom - 2); 1298graphics.DrawLine(pen, midx - 1, bounds.Y + 2, midx + 1, bounds.Y + 2); 1299graphics.DrawLine(pen, midx - 2, bounds.Y + 3, midx + 2, bounds.Y + 3); 1350rectangle.Y + 1, 1390graphics.DrawRectangle(pen, offsetRectangle.X, offsetRectangle.Y, offsetRectangle.Width - 1, offsetRectangle.Height - 1); 1421GetFocusPen(color, (rectangle.X + rectangle.Y) % 2 == 1, highContrast, blackAndWhite), 1497rectangle.Y + 1, 1675Point start = new(bounds.X + bounds.Width - 1, bounds.Y - 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); 1818PInvoke.Rectangle(desktopDC, rectangle.X, rectangle.Y, rectangle.Right, rectangle.Bottom); 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); 2325int y = bound.Y; 2368g.DrawLine(SystemPens.Window, bound.X, bound.Y, bound.X + bound.Width - 1, bound.Y); 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); 2379g.DrawLine(SystemPens.Window, bound.X, bound.Y, bound.X + bound.Width - 1, bound.Y); 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); 2387g.DrawLine(SystemPens.ControlDark, bound.X, bound.Y, bound.X + bound.Width - 1, bound.Y); 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); 2399g.DrawLine(SystemPens.ControlDark, bound.X, bound.Y, bound.X + bound.Width - 1, bound.Y); 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 (1)
93bounds.Height -= bounds.Y;
System\Windows\Forms\Scrolling\HScrollProperties.cs (1)
21private protected override int GetVerticalDisplayPosition(ScrollableControl parent) => parent.DisplayRectangle.Y;
System\Windows\Forms\Scrolling\ScrollableControl.cs (29)
124return new Point(rect.X, rect.Y); 198rect.Y = _displayRect.Y; 462int ctlBottom = -display.Y + bounds.Y + bounds.Height + _scrollMargin.Height; 560_displayRect = new Rectangle(_displayRect.X, _displayRect.Y, HorizontalScroll.Maximum, _displayRect.Height); 565_displayRect = new Rectangle(_displayRect.X, _displayRect.Y, _displayRect.Width, VerticalScroll.Maximum); 617int pos = -_displayRect.Y; 639SetDisplayRectLocation(-pos, _displayRect.Y); 783if (displayRectangle.Y != y) 785yDelta = y - displayRectangle.Y; 856int yCalc = _displayRect.Y; 885if (bounds.Y < yMargin) 887yCalc = _displayRect.Y + yMargin - bounds.Y; 889else if (bounds.Y + bounds.Height + yMargin > client.Height) 891yCalc = client.Height - (bounds.Y + bounds.Height + yMargin - _displayRect.Y); 892if (bounds.Y + yCalc - _displayRect.Y < yMargin) 894yCalc = _displayRect.Y + yMargin - bounds.Y; 1000int y = _displayRect.Y; 1069int y = _displayRect.Y; 1201if (-displayRect.Y >= VerticalScroll._minimum && -displayRect.Y < VerticalScroll._maximum) 1203VerticalScroll._value = -displayRect.Y; 1222VerticalScroll.Value = -displayRect.Y; 1268int pos = -_displayRect.Y; 1432SetDisplayRectLocation(-pos, _displayRect.Y);
System.Windows.Forms.Design (131)
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\DesignerActionPanel.EditorPropertyLine.cs (2)
352editorLocation.Y += editorBounds.Y; 376editorLocation.Y += editorBounds.Y;
System\Drawing\Design\ColorEditor.ColorPalette.ColorPaletteAccessibleObject.ColorCellAccessibleObject.cs (1)
36Point pt = new(rect.X, rect.Y);
System\Drawing\Design\ColorEditor.ColorUI.cs (6)
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)); 278graphics.DrawString(value.Name, font, foreBrush, die.Bounds.X + 26, die.Bounds.Y); 312rectTabControl.Height -= rectTabControl.Y; 314_lbSystem.SetBounds(CMARGIN, rectTabControl.Y + 2 * CMARGIN, 318_pal.Location = new Point(0, rectTabControl.Y);
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\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\ContainerSelectorGlyph.cs (1)
26_glyphBounds = new Rectangle(containerBounds.X + glyphOffset, containerBounds.Y - (int)(glyphSize * .5), glyphSize, glyphSize);
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (2)
714int minRange = directionOffset.Y < 0 ? 0 : currentBounds.Y; 1100_dragOffset = new Point(dragBounds.X - _dragOffset.X, dragBounds.Y - _dragOffset.Y);
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (3)
816_graphicsTarget.DrawImage(_dragImage, newImageRect.X, newImageRect.Y); 1034_dragComponents[i].draggedLocation.Y - _dragImageRect.Y, 1045_originalDragImageLocation = new Point(_dragImageRect.X, _dragImageRect.Y);
System\Windows\Forms\Design\Behavior\GrabHandleGlyph.cs (5)
33bounds = new Rectangle(controlBounds.X + DesignerUtils.s_handleOverlap - DesignerUtils.s_handleSize, controlBounds.Y + DesignerUtils.s_handleOverlap - DesignerUtils.s_handleSize, DesignerUtils.s_handleSize, DesignerUtils.s_handleSize); 38bounds = new Rectangle(controlBounds.Right - DesignerUtils.s_handleOverlap, controlBounds.Y + DesignerUtils.s_handleOverlap - DesignerUtils.s_handleSize, DesignerUtils.s_handleSize, DesignerUtils.s_handleSize); 58bounds = new Rectangle(controlBounds.X + (controlBounds.Width / 2) - (DesignerUtils.s_handleSize / 2), controlBounds.Y + DesignerUtils.s_handleOverlap - DesignerUtils.s_handleSize, DesignerUtils.s_handleSize, 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); 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\LockedHandleGlyph.cs (1)
27(controlBounds.Y + DesignerUtils.s_lockHandleOverlap) - DesignerUtils.s_lockHandleHeight,
System\Windows\Forms\Design\Behavior\NoResizeHandleGlyph.cs (1)
36controlBounds.Y - DesignerUtils.s_noResizeHandleSize,
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (6)
618Rectangle controlBounds = new(_resizeComponents[0].resizeBounds.X, _resizeComponents[0].resizeBounds.Y, 689yOffset = controlBounds.Y - mouseLoc.Y; 704bounds.Y = Math.Min(baseBounds.Bottom - minHeight, baseBounds.Y - yOffset); 785propTop.SetValue(_resizeComponents[i].resizeControl, bounds.Y); 793control.SetBounds(bounds.X, bounds.Y, bounds.Width, bounds.Height, specified); 940if (propTop is not null && _resizeComponents[i].resizeControl.Top != _resizeComponents[i].resizeBounds.Y)
System\Windows\Forms\Design\Behavior\ToolboxItemSnapLineBehavior.cs (1)
351Rectangle statusRect = new(newRectangle.X - adornerServiceOrigin.X, newRectangle.Y - adornerServiceOrigin.Y, 0, 0);
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionGlyph.cs (8)
111_glyphBounds = new Rectangle(bounds.X + x, bounds.Y + bounds.Height, _imageWidth, _imageHeight); 120_glyphBounds = new Rectangle(bounds.X + x, bounds.Y - _imageHeight, _imageWidth, _imageHeight); 129_glyphBounds = new Rectangle(bounds.X + bounds.Width, bounds.Y + y, _imageHeight, _imageWidth); 138_glyphBounds = new Rectangle(bounds.X - _imageHeight, bounds.Y + y, _imageHeight, _imageWidth); 160_glyphBounds = new Rectangle(bounds.X + x, bounds.Y + bounds.Height, _imageWidth, _imageHeight); 169_glyphBounds = new Rectangle(bounds.X + x, bounds.Y - _imageHeight, _imageWidth, _imageHeight); 178_glyphBounds = new Rectangle(bounds.X + bounds.Width, bounds.Y + y, _imageHeight, _imageWidth); 187_glyphBounds = new Rectangle(bounds.X - _imageHeight, bounds.Y + y, _imageHeight, _imageWidth);
System\Windows\Forms\Design\ComponentTray.cs (5)
1832Point newLoc = new(display.X + _whiteSpace.X, display.Y + _whiteSpace.Y); 1860Point newLoc = new(bounds.X + bounds.Width + _whiteSpace.X, bounds.Y); 2289int y = rc.Y + WhiteSpace; 2301int y = rc.Y + (rc.Height - _cyIcon) / 2; 2422if (Math.Abs(bounds.X - x) > parentGridSize.Width || Math.Abs(bounds.Y - y) > parentGridSize.Height)
System\Windows\Forms\Design\ControlDesigner.cs (3)
2254textRect.Y = imageRect.Y; 2256textRect.Height -= (textRect.Y + marginY + penThickness); 2285e.Graphics.DrawIcon(err, imageRect.X, imageRect.Y);
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (4)
985e.Bounds.Y + OWNERDRAWITEMIMAGEBUFFER, 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\DesignerFrame.cs (1)
489intersectionRegion.Translate(-overlayControlScreenBounds.X, -overlayControlScreenBounds.Y);
System\Windows\Forms\Design\DesignerUtils.cs (1)
578newBounds.Y = originalBounds.Y - originalBounds.Height + e.Offset.Y;
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (3)
271if (flowDirection == FlowDirection.TopDown ? marginBounds.Y < lastOffset : marginBounds.Y > lastOffset) 286lastOffset = marginBounds.Y;
System\Windows\Forms\Design\GroupBoxDesigner.cs (1)
27return new Point(gb.DisplayRectangle.X, gb.DisplayRectangle.Y);
System\Windows\Forms\Design\OleDragDropHandler.CfCodeToolboxItem.cs (2)
113defaultValues["Offset"] = new Size(childControl.Bounds.X - bounds.X, childControl.Bounds.Y - bounds.Y);
System\Windows\Forms\Design\OleDragDropHandler.cs (1)
445PInvoke.Rectangle(dc, rectangle.X, rectangle.Y, rectangle.Right, rectangle.Bottom);
System\Windows\Forms\Design\ParentControlDesigner.cs (18)
576Point pt = new(bounds.X, bounds.Y); 812CreateToolCore(tool, bounds.X, bounds.Y, bounds.Width, bounds.Height, true, true); 1109if (adjustedRect.Y < minimumLocation.Y) 1121return new Point(r.X, r.Y); 1143updatedRect.Y = originalRect.Y; 1157if (dragRect.Y != originalRect.Y) 1159updatedRect.Y = (dragRect.Y / gridSize.Height) * gridSize.Height; 1162if (dragRect.Y - updatedRect.Y > halfGrid.Y) 1173updatedRect.Height = ((dragRect.Y + dragRect.Height) / gridSize.Height) * gridSize.Height - updatedRect.Y; 1784offset.Y - _adornerWindowToScreenOffset.Y, 1976_mouseDragOffset.Y - _adornerWindowToScreenOffset.Y, 2014Point offset = new(_mouseDragOffset.X, _mouseDragOffset.Y); 2033Math.Min(displayRect.Y, clientRect.Y), 2038float xlateY = paintRect.Y;
System\Windows\Forms\Design\SelectionUIHandler.cs (7)
239if (finalMove && offset is { X: 0, Y: 0, Width: 0, Height: 0 }) 289ctlBounds.lastRequestedY += offset.Y; 329targetY = oldBounds.Y; 355newBounds.Y = tempNewBounds.Y; 361newBounds.Y = tempNewBounds.Y; 382bool locChanged = (offset.X != 0 || offset.Y != 0); 422adjustedLoc.Y = newBounds.Y;
System\Windows\Forms\Design\SelectionUIService.ContainerSelectionUIItem.cs (3)
36Rectangle rect = new(_outerRect.X, _outerRect.Y, CONTAINER_WIDTH, CONTAINER_HEIGHT); 59Rectangle glyphBounds = new(_outerRect.X, _outerRect.Y, CONTAINER_WIDTH, CONTAINER_HEIGHT); 72Rectangle rect = new(_outerRect.X, _outerRect.Y, CONTAINER_WIDTH, CONTAINER_HEIGHT);
System\Windows\Forms\Design\SelectionUIService.cs (2)
693delta.Y -= old.Y; 696if (delta.X != 0 || delta.Y != 0 || delta.Width != 0 || delta.Height != 0)
System\Windows\Forms\Design\SelectionUIService.SelectionUIItem.cs (25)
134Rectangle rect = new(_outerRect.X, _outerRect.Y, GRABHANDLE_WIDTH, GRABHANDLE_HEIGHT); 160rect.Y = inner.Y + inner.Height; 169rect.Y = outer.Y; 173rect.Y = inner.Y + (inner.Height - GRABHANDLE_HEIGHT) / 2; 250if (pt.Y >= _outerRect.Y && pt.Y <= _innerRect.Y) 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) 269if (pt.Y >= _outerRect.Y && pt.Y <= _innerRect.Y) 290Debug.Assert(!(pt.Y >= _outerRect.Y && pt.Y <= _innerRect.Y), "Should be handled by top right check"); 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) 402&& pt.Y > _innerRect.Y 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\TableLayoutPanelDesigner.cs (3)
1024offset = bounds.Y; 1030else if (pos.Y > bounds.Y) 1124startLoc = bounds.Y;// reset for the rows...
System\Windows\Forms\Design\TabOrder.cs (2)
286graphics.DrawRectangle(pen, convertedRectangle.X, convertedRectangle.Y, convertedRectangle.Width - 1, convertedRectangle.Height - 1); 289graphics.DrawString(str, font, foreBrush, convertedRectangle.X + 1, convertedRectangle.Y + 1);
System\Windows\Forms\Design\ToolStripDesigner.cs (1)
1820if (offset.Y <= parentToolStrip.Items[0].Bounds.Y)
System\Windows\Forms\Design\ToolStripEditorManager.cs (1)
131Location = new Point(bounds.X, bounds.Y);
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 (2)
System\Windows\Forms\Automation\UiaTextProvider.cs (2)
93result[scan++] = rectArray[i].Y; 111result[1] = bounds.Y;
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 (134)
System\Windows\Forms\AccessibleObjects\ComboBox.ComboBoxItemAccessibleObjectTests.cs (1)
413Assert.Equal(expectedPosition.Y, actual.Y);
System\Windows\Forms\AccessibleObjects\Control.ControlAccessibleObjectTests.cs (2)
55Assert.True(accessibleObject.Bounds.Y >= 0); 90Assert.True(accessibleObject.Bounds.Y >= 0);
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObjectTests.cs (1)
665Rectangle expectedBounds = new(subItem.Bounds.X, subItem.Bounds.Y, expectedWidth, expectedHeight)
System\Windows\Forms\AccessibleObjects\PropertyGridView.PropertyGridViewAccessibleObjectTests.cs (10)
256((rect.Y > gridViewRectangle.Y + 1 && rect.Y < gridViewRectangle.Bottom - 1) || 257(rect.Y < gridViewRectangle.Bottom - 1 && rect.Bottom > gridViewRectangle.Y + 1)); // +-1 are borders 269((rect.Y > gridViewRectangle.Y + 1 && rect.Y < gridViewRectangle.Bottom - 1) || 270(rect.Y < gridViewRectangle.Bottom - 1 && rect.Bottom > gridViewRectangle.Y + 1)); // +-1 are borders
System\Windows\Forms\CheckBoxRendererTests.cs (1)
152? Validate.PolyPolygon16(new(new(bounds.X, bounds.Y), new Size(-1, -1)))
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)
10401Assert.Equal(0, control.ClientRectangle.Y); 10405Assert.Equal(0, control.DisplayRectangle.Y); 10417Assert.Equal(0, control.Bounds.Y); 10434Assert.Equal(0, control.ClientRectangle.Y); 10438Assert.Equal(0, control.DisplayRectangle.Y); 10450Assert.Equal(0, control.Bounds.Y);
System\Windows\Forms\CursorTests.cs (4)
203Assert.True(Cursor.Clip.Y >= 0); 267Assert.True(position.Y >= virtualScreen.Y); 284Cursor.Position = new Point(virtualScreen.X - 1, virtualScreen.Y - 1); 287Assert.True(position.Y >= virtualScreen.Y);
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\Design\ComponentEditorFormTests.cs (2)
76Assert.Equal(new Rectangle(-SystemInformation.WorkingArea.X, -SystemInformation.WorkingArea.Y, control.Width, control.Height), control.DesktopBounds); 77Assert.Equal(new Point(-SystemInformation.WorkingArea.X, -SystemInformation.WorkingArea.Y), control.DesktopLocation);
System\Windows\Forms\FormTests.cs (3)
75Assert.Equal(new Rectangle(-SystemInformation.WorkingArea.X, -SystemInformation.WorkingArea.Y, 300, 300), control.DesktopBounds); 76Assert.Equal(new Point(-SystemInformation.WorkingArea.X, -SystemInformation.WorkingArea.Y), control.DesktopLocation); 79Assert.Equal(0, control.DisplayRectangle.Y);
System\Windows\Forms\HScrollBarTests.cs (3)
29Assert.Equal(0, control.Bounds.Y); 40Assert.Equal(0, control.ClientRectangle.Y); 62Assert.Equal(0, control.DisplayRectangle.Y);
System\Windows\Forms\HtmlElementTests.cs (1)
1157Assert.Equal(element.ScrollTop, result.Y);
System\Windows\Forms\ListBoxTests.cs (6)
5332Assert.True(rect1.Y >= 0); 5340Assert.True(rect2.Y >= rect1.Y + rect1.Height); 5362Assert.True(rect1.Y >= 0); 5373Assert.True(rect2.Y >= rect1.Y + rect1.Height);
System\Windows\Forms\ListViewTests.cs (8)
4091Assert.True(rect1.Y >= 0); 4098Assert.True((rect2.X >= rect1.Right && rect2.Y == rect1.Y) || (rect2.X == rect1.X && rect2.Y >= rect1.Bottom)); 4122Assert.True(rect1.Y >= 0); 4132Assert.True((rect2.X >= rect1.Right && rect2.Y == rect1.Y) || (rect2.X == rect1.X && rect2.Y >= rect1.Bottom));
System\Windows\Forms\MonthCalendarTests.cs (3)
38Assert.Equal(0, control.Bounds.Y); 51Assert.Equal(0, control.ClientRectangle.Y); 71Assert.Equal(0, control.DisplayRectangle.Y);
System\Windows\Forms\RadioButtonRendererTests.cs (1)
141? Validate.PolyPolygon16(new(new(bounds.X, bounds.Y), new Size(-1, -1)))
System\Windows\Forms\ScreenTests.cs (3)
216Assert.InRange(screen.WorkingArea.Y, screen.Bounds.Y, screen.Bounds.Y + screen.Bounds.Width);
System\Windows\Forms\SystemInformationTests.cs (1)
802Assert.True(workingArea.Y >= 0);
System\Windows\Forms\TabControlTests.cs (12)
744Assert.True(displayRectangle.Y >= 0); 746Assert.Equal(100 - displayRectangle.Y * 2, control.DisplayRectangle.Height); 765Assert.True(displayRectangle.Y >= 0); 767Assert.Equal(100 - displayRectangle.Y * 2, control.DisplayRectangle.Height); 784Assert.True(displayRectangle.Y >= 0); 786Assert.Equal(100 - displayRectangle.Y * 2, control.DisplayRectangle.Height); 3661Assert.True(rect1.Y >= 0); 3669Assert.Equal(rect2.Y, rect1.Y); 3693Assert.True(rect1.Y >= 0); 3701Assert.Equal(rect2.Y, rect1.Y);
System\Windows\Forms\TabPageTests.cs (8)
2220Assert.Equal(expected.Y, control.Top); 2221Assert.Equal(expected.Y + expected.Height, control.Bottom); 2250Assert.Equal(expected.Y, control.Top); 2251Assert.Equal(expected.Y + expected.Height, control.Bottom); 4822Assert.Equal(expected.Y, control.Top); 4823Assert.Equal(expected.Y + expected.Height, control.Bottom); 4852Assert.Equal(expected.Y, control.Top); 4853Assert.Equal(expected.Y + expected.Height, control.Bottom);
System\Windows\Forms\ToolStripButtonTests.cs (4)
1303Assert.True(e.ImageRectangle.Y >= 0); 1321Assert.True(e.TextRectangle.Y >= 0); 1394Assert.True(e.ImageRectangle.Y >= 0); 1412Assert.True(e.TextRectangle.Y >= 0);
System\Windows\Forms\ToolStripDropDownTests.cs (1)
1932expected.Y = Math.Max(expected.Y, SystemInformation.WorkingArea.Y);
System\Windows\Forms\ToolStripItemTests.cs (10)
7737Assert.NotNull(owner.GetItemAt(item.Bounds.X, item.Bounds.Y)); 7738owner.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, item.Bounds.X, item.Bounds.Y, 0)); 7775Assert.NotNull(parent.GetItemAt(item.Bounds.X, item.Bounds.Y)); 7776parent.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, item.Bounds.X, item.Bounds.Y, 0)); 7793Assert.Same(item, parent.GetItemAt(item.Bounds.X, item.Bounds.Y)); 7794parent.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, item.Bounds.X, item.Bounds.Y, 0)); 14431Assert.NotNull(owner.GetItemAt(item.Bounds.X, item.Bounds.Y)); 14432owner.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, item.Bounds.X, item.Bounds.Y, 0)); 14520Assert.NotNull(parent.GetItemAt(item.Bounds.X, item.Bounds.Y)); 14521parent.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, item.Bounds.X, item.Bounds.Y, 0));
System\Windows\Forms\ToolStripSeparatorTests.cs (2)
1479Assert.Equal(new Rectangle(2, bounds.Y, 57, bounds.Height), item.Bounds); 1489Assert.Equal(new Rectangle(2, bounds.Y, 57, bounds.Height), item.Bounds);
System\Windows\Forms\ToolStripTests.cs (3)
101Assert.Equal(0, control.GripRectangle.Y); 255Assert.Equal(0, control.GripRectangle.Y); 5831toolStrip.OnMouseMove(new MouseEventArgs(MouseButtons.Left, 1, item.Bounds.X, item.Bounds.Y, 0));
System\Windows\Forms\ToolStripTests.Rendering.cs (1)
33Rectangle bitBltBounds = new(bounds.X, bounds.Y, bounds.Width - 1, bounds.Height - 1);
System\Windows\Forms\TreeNodeCollectionTests.cs (1)
21Assert.Equal(0, treeNode.Bounds.Y);
System\Windows\Forms\TreeNodeTests.cs (2)
458Assert.Equal(0, bounds.Y); 480Assert.Equal(0, bounds.Y);
System\Windows\Forms\VScrollBarTests.cs (3)
28Assert.Equal(0, control.Bounds.Y); 39Assert.Equal(0, control.ClientRectangle.Y); 61Assert.Equal(0, control.DisplayRectangle.Y);
System.Windows.Forms.UI.IntegrationTests (9)
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); 251Assert.Equal(expectedY, newButtonBounds.Y);
FormTests.cs (4)
70Assert.True(form.Top <= screenWorkingArea.Y); 71Assert.True(form.Top >= screenWorkingArea.Y - borderSize); 131Assert.True(form.Top <= screenWorkingArea.Y); 132Assert.True(form.Top >= screenWorkingArea.Y - borderSize);
Infra\ScreenshotService.cs (1)
67sourceY: primaryScreen.Bounds.Y,
WinFormsControlsTest (1)
CustomComCtl32Button.cs (1)
98int y = sender.ClientRectangle.Y + 1;