389 references to Right
PresentationUI (4)
MS\Internal\Documents\DialogDivider.cs (1)
77ClientRectangle.Right,
MS\Internal\Documents\SignatureSummaryDialog.cs (3)
637iconXOffset = bounds.Right - (CellPadding.Right + IconWidth); 641statusXOffset = bounds.Right + CellPadding.Right - (IconWidth + SummaryNameTextWidth); 642intentXOffset = bounds.Right + CellPadding.Right + CellPadding.Left -
System.Drawing.Common.Tests (2)
mono\System.Drawing\GraphicsTests.cs (2)
2879arcrect.X = baserect.Right - d; 2921arcrect.X = baserect.Right - d;
System.Private.Windows.Core (1)
Windows\Win32\Graphics\Gdi\RegionScope.cs (1)
29Region = PInvokeCore.CreateRectRgn(rectangle.X, rectangle.Y, rectangle.Right, rectangle.Bottom);
System.Windows.Forms (288)
System\Windows\Forms\Accessibility\LabelEditUiaTextProvider.cs (1)
193Point ptEnd = new(rectangle.Right - 1, rectangle.Bottom - 1);
System\Windows\Forms\Control.cs (2)
8169clientRectangle.Right, clientRectangle.Bottom); 8171clientRectangle.Right, clientRectangle.Top);
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (2)
299Point p1 = new(r.Right - 1, r.Top); // Upper inner right 302Point p4 = new(r.Right - 1, r.Bottom - 1); // Inner bottom right
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.LayoutOptions.cs (2)
588int textRight = Math.Min(layout.TextBounds.Right, layout.Field.Right);
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonPopupAdapter.cs (8)
94g.DrawLine(windowFrame, r.Left + 1, r.Top + 1, r.Right - 2, r.Top + 1); 98g.DrawLine(windowFrame, r.Left, r.Bottom - 1, r.Right, r.Bottom - 1); 99g.DrawLine(windowFrame, r.Right - 1, r.Top, r.Right - 1, r.Bottom); 102g.DrawLine(highlight, r.Left, r.Top, r.Right, r.Top); 106g.DrawLine(buttonShadow, r.Left + 1, r.Bottom - 2, r.Right - 2, r.Bottom - 2); 107g.DrawLine(buttonShadow, r.Right - 2, r.Top + 1, r.Right - 2, r.Bottom - 2);
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxBaseAdapter.cs (7)
219hdc.DrawLine(high, r.Right - 1, r.Top, r.Right - 1, r.Bottom); 220hdc.DrawLine(high, r.Left, r.Bottom - 1, r.Right, r.Bottom - 1); 223hdc.DrawLine(shadow, r.Left, r.Top, r.Right - 1, r.Top); 225hdc.DrawLine(face, r.Right - 2, r.Top + 1, r.Right - 2, r.Bottom - 1); 226hdc.DrawLine(face, r.Left + 1, r.Bottom - 2, r.Right - 1, r.Bottom - 2);
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxUiaTextProvider.cs (1)
254Point ptEnd = new(rectangle.Right - 1, rectangle.Bottom - 1);
System\Windows\Forms\Controls\ComboBox\ComboBox.FlatComboAdapter.cs (7)
38_dropDownRect = new Rectangle(_innerBorder.Right + 1, _innerBorder.Y, dropDownButtonWidth, _innerBorder.Height + 1); 55_innerBorder.X = _clientRect.Width - _innerBorder.Right; 56_innerInnerBorder.X = _clientRect.Width - _innerInnerBorder.Right; 57_dropDownRect.X = _clientRect.Width - _dropDownRect.Right; 58_whiteFillRect.X = _clientRect.Width - _whiteFillRect.Right + 1; // since we're filling, we need to move over to the next px. 101new Rectangle(_dropDownRect.X, _outerBorder.Y, _outerBorder.Right - _dropDownRect.X, _outerBorder.Height)); 149new Rectangle(_dropDownRect.X, _outerBorder.Y, _outerBorder.Right - _dropDownRect.X, _outerBorder.Height));
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (57)
2554clip.Width = _layout.Data.Right - leftEdge - 1; 2555int overflowWidth = clip.Right + _mouseBarOffset - leftEdge - DataGridViewBand.MaxBandThickness; 2985r.X = Math.Min(r.X, inside.Right - r.Width); 2994r.X = Math.Min(inside.Right - r.Width, r.X); 3015r.X = Math.Min(inside.Right - 3, r.X); 5670_layout.ColumnHeaders.Right - InsertionBarWidth); 6121newX = Math.Min(x + _mouseBarOffset, _layout.Data.Right - 1); 6300delta = _layout.RowHeaders.Right - RowHeadersWidth - x - 1; 6304x = Math.Min(e.X + _mouseBarOffset, _layout.Data.Right - 1); 7093width = columnRect.Right - rowRect.Right; 8217cx = RightToLeftInternal ? data.Right : data.X; 8222if ((RightToLeftInternal && cx < data.X) || (!RightToLeftInternal && cx > data.Right)) 8253if ((RightToLeftInternal && cx < data.X) || (!RightToLeftInternal && cx > data.Right)) 8302&& ((!RightToLeftInternal && cx + viewedColumnWidth > data.Right) 8304? RightToLeftInternal ? cx - data.X : data.Right - cx 8328Debug.Assert(RightToLeftInternal || (x >= data.X - 1 && x < data.Right), "x must be inside the horizontal bounds of this.layout.Data"); 8329Debug.Assert(!RightToLeftInternal || (x >= data.X && x <= data.Right), "x must be inside the horizontal bounds of this.layout.Data"); 8335else if (RightToLeftInternal && x == data.Right) 8340int cx = RightToLeftInternal ? data.Right - 1 : data.X; 8345&& ((!RightToLeftInternal && cx < data.Right) || (RightToLeftInternal && cx >= data.X))) 8386&& ((!RightToLeftInternal && cx < data.Right) || (RightToLeftInternal && cx >= data.X))) 8459int x = RightToLeftInternal ? _layout.Data.Right - 1 : _layout.Data.X; 8599hti = HitTest(RightToLeftInternal ? rectScrollingArea.Right - 1 : rectScrollingArea.Left, mouseY); 8628hti = HitTest(RightToLeftInternal ? rectScrollingArea.Right : rectScrollingArea.Left, mouseY); 8646mouseX = RightToLeftInternal ? rectScrollingArea.Right - 1 : rectScrollingArea.Left + 1; 8650hti = HitTest(RightToLeftInternal ? rectScrollingArea.Right : rectScrollingArea.Left, mouseY); 8663mouseX = RightToLeftInternal ? rectScrollingArea.Right - 1 : rectScrollingArea.Left + 1; 8688if (mouseX >= rectScrollingArea.Left && mouseX <= rectScrollingArea.Right) 8719if ((!RightToLeftInternal && mouseX < rectScrollingArea.Left) || (RightToLeftInternal && mouseX > rectScrollingArea.Right)) 8734xOffset = rectScrollingArea.Right - mouseX; 8751Debug.Assert((!RightToLeftInternal && mouseX > rectScrollingArea.Right) || (RightToLeftInternal && mouseX < rectScrollingArea.Left)); 8793xOffset = mouseX - rectScrollingArea.Right; 8870if ((!RightToLeftInternal && mouseX < rectScrollingArea.Left) || (RightToLeftInternal && mouseX > rectScrollingArea.Right)) 8885xOffset = rectScrollingArea.Right - mouseX; 8901else if (RightToLeftInternal && mouseX > _layout.Data.Right) 8903mouseX = _layout.Data.Right - 1; 8908else if ((!RightToLeftInternal && mouseX > rectScrollingArea.Right) || (RightToLeftInternal && mouseX < rectScrollingArea.Left)) 8946xOffset = mouseX - rectScrollingArea.Right; 8952mouseX = RightToLeftInternal ? rectScrollingArea.Left + 1 : rectScrollingArea.Right - 1; 8960mouseX = RightToLeftInternal ? rectScrollingArea.Left + 1 : rectScrollingArea.Right - 1; 8968Debug.Assert(mouseX >= rectScrollingArea.Left && mouseX <= rectScrollingArea.Right); 9312hti._colStart = RightToLeftInternal ? _layout.TopLeftHeader.Right - 1 : _layout.TopLeftHeader.Left; 9315if ((!RightToLeftInternal && _layout.TopLeftHeader.Right - x < ColumnSizingHotZone) 9324: _layout.TopLeftHeader.Right - x - 1; 9428hti._colStart = RightToLeftInternal ? _layout.RowHeaders.Right - 1 : _layout.RowHeaders.Left; 9468else if ((!RightToLeftInternal && _layout.RowHeaders.Right - x < ColumnSizingHotZone) 9477: _layout.RowHeaders.Right - x - 1; 10308rightToLeftInternal ? _layout.Data.X - _vertScrollBar.Width : _layout.Data.Right, 10366rightToLeftInternal ? _layout.Data.X - _vertScrollBar.Width : _layout.Data.Right, 14509rightArea.Width -= rightArea.Right - leftEdge; 18829if (pt.X > rect.Right && step > 0) 18831Invalidate(new Rectangle(new Point(ClientSize.Width - (pt.X - rect.Right) - step, ColumnHeadersHeight), 19370cellBounds.X = RightToLeftInternal ? bandBounds.Right - cx - cellBounds.Width : bandBounds.X + cx; 19449? scrollingBounds.Right - cx - cellBounds.Width 26089while (xColumnRightEdge > _layout.Data.Right && Columns.DisplayInOrder(firstDisplayedScrollingColumn, columnIndex)) 26098if (xColumnRightEdge > _layout.Data.Right)
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (2)
419s_rectThemeMargins.Width = DATAGRIDVIEWBUTTONCELL_themeMargin - rectContent.Right; 682valBounds.Width -= borderWidths.Right;
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (38)
1021cellValueBounds.Right - IconMarginWidth - s_iconsWidth, 3162DataGridView.RightToLeftInternal ? bounds.X : bounds.Right - dividerThickness, 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); 3305graphics.DrawLine(penBackColor, bounds.Right - 1, bounds.Y, bounds.Right - 1, bounds.Bottom - 1); 3306graphics.DrawLine(penControlDark, bounds.Right - 1, y1, bounds.Right - 1, y2); 3323graphics.DrawLine(penControlDark, bounds.Right - 2, bounds.Y, bounds.Right - 2, bounds.Bottom - 1); 3324graphics.DrawLine(penControlLightLight, bounds.Right - 1, y1, bounds.Right - 1, y2); 3342graphics.DrawLine(penControlLightLight, bounds.Right - 2, bounds.Y, bounds.Right - 2, bounds.Bottom - 1); 3343graphics.DrawLine(penControlDark, bounds.Right - 1, y1, bounds.Right - 1, y2); 3351graphics.DrawLine(penGridColor, bounds.X, bounds.Y, bounds.Right - 1, bounds.Y); 3356x2 = bounds.Right - 1; 3374x2 = bounds.Right - 1; 3392x2 = bounds.Right - 1; 3425x2 = bounds.Right - 2; 3432graphics.DrawLine(penControlDark, bounds.X, bounds.Y, bounds.Right - 1, bounds.Y); 3444x2 = bounds.Right - 2; 3451graphics.DrawLine(penControlLightLight, bounds.X, bounds.Y, bounds.Right - 1, bounds.Y); 3459graphics.DrawLine(penGridColor, bounds.X, bounds.Bottom - 1, bounds.Right - 1, bounds.Bottom - 1); 3463x2 = bounds.Right - 1; 3474x2 = bounds.Right - 1; 3486x2 = bounds.Right - 1; 3600rectPadding.X = bounds.Right - cellStyle.Padding.Left; 3609rectPadding.X = bounds.Right - cellStyle.Padding.Right; 3824if (cellClip.Right <= cellBounds.Right - borderAndPaddingWidths.Width) 3826wEditingPanel -= cellBounds.Right - cellClip.Right;
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.DataGridViewCellAccessibleObject.cs (2)
355if (cellRight > rowRect.Right - rightToLeftRowHeadersWidth) 357cellRight = rowRect.Right - rightToLeftRowHeadersWidth;
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (3)
1065valBounds.Width -= borderWidths.Right; 1207checkBoxX = valBounds.Right - checkBoxSize.Width; 1313g.DrawLine(pen, checkBounds.Left, checkBounds.Top, checkBounds.Right - 1, checkBounds.Top);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (2)
767valBounds.Width -= borderWidths.Right; 955sortGlyphLocation = new Point(valBounds.Right +
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.DataGridViewColumnHeaderCellRenderer.cs (1)
35cornerClip = new Rectangle(bounds.Right - 2, bounds.Bottom - 2, 2, 2);
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (4)
1915valBounds.Width -= borderWidths.Right; 2014DataGridView.RightToLeftInternal ? valBounds.Left : valBounds.Right - dropWidth, 2022DataGridView.RightToLeftInternal ? valBounds.Left + 1 : valBounds.Right - dropWidth - 1, 2031DataGridView.RightToLeftInternal ? valBounds.Left + 2 : valBounds.Right - dropWidth - 2,
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (2)
389s_rectThemeMargins.Width = ThemeMargin - rectContent.Right; 540bounds.Width -= borderWidths.Right;
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (7)
616DataGridViewContentAlignment.TopLeft => bounds.Right - imageBounds.Width, 618DataGridViewContentAlignment.MiddleLeft => bounds.Right - imageBounds.Width, 620DataGridViewContentAlignment.BottomLeft => bounds.Right - imageBounds.Width, 628DataGridViewContentAlignment.TopRight => bounds.Right - imageBounds.Width, 630DataGridViewContentAlignment.MiddleRight => bounds.Right - imageBounds.Width, 632DataGridViewContentAlignment.BottomRight => bounds.Right - imageBounds.Width, 747valBounds.Width -= borderWidths.Right;
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (1)
907valBounds.Width -= borderWidths.Right;
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (3)
1526cellBounds.X = rowBounds.Right - cx - cellBounds.Width; 1616cellBounds.X = dataBounds.Right - cx - cellBounds.Width; 1703cellBounds.X = rowBounds.Right - cellBounds.Width;
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (2)
649valBounds.Width -= borderWidths.Right; 1026? bounds.Right - RowHeaderIconMarginWidth - s_iconsWidth
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.DataGridViewRowHeaderCellAccessibleObject.cs (1)
38cellRect.X = rowRect.Right - cellRect.Width;
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (1)
672valBounds.Width -= borderWidths.Right;
System\Windows\Forms\Controls\DataGridView\DataGridViewTopLeftHeaderCell.cs (4)
236valBounds.Width -= borderWidths.Right; 379graphics.DrawLine(penControlDark, bounds.X, bounds.Y, bounds.Right - 1, bounds.Y); 385graphics.DrawLine(penControlLightLight, bounds.X, bounds.Y, bounds.Right - 1, bounds.Y); 391graphics.DrawLine(penControlDark, bounds.X + 1, bounds.Y + 1, bounds.Right - 1, bounds.Y + 1);
System\Windows\Forms\Controls\DataGridView\DataGridViewUtilities.cs (3)
402ptTextLocation.X = cellBounds.Right - sizeText.Width; 417ptTextLocation.X = cellBounds.Right - sizeText.Width; 432ptTextLocation.X = cellBounds.Right - sizeText.Width;
System\Windows\Forms\Controls\GroupBox\GroupBoxRenderer.cs (6)
194textBounds.X = bounds.Right - textBounds.Width - BoxHeaderWidth + 1; 221clipLeft.X = boxBounds.Right - BoxHeaderWidth; 227clipMiddle.X = clipLeft.Right; 228clipRight.X = clipMiddle.Right; 229clipRight.Width = boxBounds.Right - clipRight.X; 296textBounds.X = bounds.Right - textBounds.Width - TextOffset;
System\Windows\Forms\Controls\Labels\LinkLabel.cs (1)
378xLoc = clientRect.Right - textRect.Width;
System\Windows\Forms\Controls\ListView\DrawListViewColumnHeaderEventArgs.cs (4)
113Graphics.DrawLine(SystemPens.ControlLightLight, r.X, r.Y, r.Right, r.Y); 117Graphics.DrawLine(SystemPens.ControlDark, r.X + 1, r.Bottom, r.Right, r.Bottom); 118Graphics.DrawLine(SystemPens.ControlDark, r.Right, r.Y + 1, r.Right, r.Bottom);
System\Windows\Forms\Controls\ListView\ListView.cs (2)
5023rectInvalid.Width += ClientRectangle.Right - rectInvalid.Right;
System\Windows\Forms\Controls\ListView\ListViewGroup.ListViewGroupAccessibleObject.cs (1)
73groupRect.right = Math.Min(listViewBounds.Right, groupRect.right);
System\Windows\Forms\Controls\ListView\ListViewItem.cs (1)
956int xCenter = r.Left + (r.Right - r.Left) / 2;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyDescriptorGridEntry.cs (1)
537rect.Right - ((s_imageSize + 1) * (i + 1)),
System\Windows\Forms\Controls\TextBox\TextBoxBase.TextBoxBaseUiaTextProvider.cs (1)
372Point ptEnd = new(rectangle.Right - 1, rectangle.Bottom - 1);
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (1)
586gripLocation = new Point(SizeGripBounds.Right, SizeGripBounds.Bottom);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (7)
3815new(_lastInsertionMarkRect.X, horizontalBeamStart), new(_lastInsertionMarkRect.Right - 1, horizontalBeamStart), 3816new(_lastInsertionMarkRect.X, horizontalBeamStart + 1), new(_lastInsertionMarkRect.Right - 1, horizontalBeamStart + 1) 3829new(_lastInsertionMarkRect.Right - 1, start), new(_lastInsertionMarkRect.Right - 1, start + widthOfBeam - 1), 3830new(_lastInsertionMarkRect.Right - 2, start + 1), new(_lastInsertionMarkRect.Right - 2, start + widthOfBeam - 2) 4182gripRectangle.X = ClientRectangle.Right - gripRectangle.Width - Grip.Margin.Horizontal;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownButton.ToolStripDropDownButtonInternalLayout.cs (1)
71_dropDownArrowRect = new Rectangle(options.Client.Right, 0, s_dropDownArrowSize.Width, _ownerItem.Bounds.Height);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (9)
367nextPoint.X = _checkRectangle.Right + _checkPadding.Right + _imagePadding.Left; 419nextPoint.X = _imageMarginBounds.Right + _textPadding.Left; 424nextPoint.X = _textRectangle.Right + _textPadding.Right + _arrowPadding.Left; 429_maxItemSize.Width = (_arrowRectangle.Right + _arrowPadding.Right) - _imageMarginBounds.Left; 439_checkRectangle.X = width - _checkRectangle.Right; 440_imageRectangle.X = width - _imageRectangle.Right; 441_textRectangle.X = width - _textRectangle.Right; 442_arrowRectangle.X = width - _arrowRectangle.Right; 443_imageMarginBounds.X = width - _imageMarginBounds.Right;
System\Windows\Forms\Controls\ToolStrips\ToolStripHighContrastRenderer.cs (1)
375g.DrawLine(foreColorPen, bounds.Left, startY, bounds.Right - 1, startY);
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.cs (1)
735location = new Point(dragRect.Right - 1, 0);
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelCell.cs (2)
312int spaceToFree = bounds.Right - displayRectangle.Right;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.cs (2)
416int spaceToFree = cell.CachedBounds.Right - RowManager.DisplayRectangle.Right;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.HorizontalRowManager.cs (3)
286freedSpace += DisplayRectangle.Right - lastCell.Bounds.Right; 496lastCellMargin.Left = Math.Max(0, locationToDrag.X - nextCell.Bounds.Right);
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (9)
425g.DrawLine(pen, bounds.Left, bounds.Height - 1, bounds.Right, bounds.Height - 1); 973endGradient.X = bounds.Right - endGradient.Width; 1274start.X = overflowBoundsFill.Right + 1; 1275end.X = overflowBoundsFill.Right; 1303top1.X = overflowBoundsFill.Right + 1; 1304top2.X = overflowBoundsFill.Right; 1324fillRect.X = overflowBoundsFill.Right; 1529g.DrawLine(foreColorPen, bounds.Left, startY, bounds.Right - 1, startY); 1535g.DrawLine(highlightColorPen, bounds.Left + 1, startY, bounds.Right - 1, startY);
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.cs (3)
315dropDownButtonBounds.Offset(splitButtonButtonBounds.Right + _splitterWidth, 0); 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 (2)
149insertionRect = new Rectangle(item.Bounds.Right, _owner.Margin.Top, ToolStrip.s_insertionBeamWidth, _owner.Height - (_owner.Margin.Vertical) - 1); 217else if ((orig.Right - widthUnit) <= check.X)
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackLayout.cs (4)
213int lastRight = _displayRectangle.Right; 231lastRight = clientRectangle.Right; 501if ((itemBounds.Right > _displayRectangle.Right) || (itemBounds.Left < _displayRectangle.Left))
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemRenderer.cs (6)
735g.DrawLine(foreColorPen, bounds.Left, startY, bounds.Right, startY); 739g.DrawLine(SystemPens.ButtonHighlight, bounds.Left, startY, bounds.Right, startY); 755g.DrawLine(topPen, bounds.Left, bounds.Top, bounds.Right - 1, bounds.Top); 757g.DrawLine(rightPen, bounds.Right - 1, bounds.Top, bounds.Right - 1, bounds.Bottom - 1); 758g.DrawLine(bottomPen, bounds.Left, bounds.Bottom - 1, bounds.Right - 1, bounds.Bottom - 1);
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.ToolStripTextBoxControl.cs (2)
261g.FillRectangle(brush, clientRect.Right, 0, Width - clientRect.Right, Height); // right border
System\Windows\Forms\Controls\TreeView\TreeView.cs (2)
2965else if (tn is not null && tn.Bounds.Right > Bounds.Right)
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (4)
533Rectangle clipRight = new(bounds.Right - border, bounds.Top, border, bounds.Height); 863clientArea.Right - _defaultButtonsWidth + borderFixup, 877upDownButtonsBounds.X = totalClientWidth - upDownButtonsBounds.Right; 878upDownEditBounds.X = totalClientWidth - upDownEditBounds.Right;
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.cs (1)
325Point pt2 = new(clientRect.Right, clientRect.Bottom - 1);
System\Windows\Forms\Internal\WinFormsUtils.cs (3)
88if (bounds.Right > constrainingBounds.Right) 91bounds.X = constrainingBounds.Right - bounds.Width;
System\Windows\Forms\Layout\DefaultLayout.cs (8)
314right = right > 0 ? right : element.Bounds.Right + Math.Abs(right); 440Rectangle newElementBounds = new(remainingBounds.Right - elementSize.Width, remainingBounds.Y, elementSize.Width, elementSize.Height); 745anchorInfo.Right = elementBounds.Right; 1130prefSize.Width = Math.Max(prefSize.Width, elementSpace.Right); 1148prefSize.Width = Math.Max(prefSize.Width, anchorInfo is null ? bounds.Right : bounds.Right + anchorInfo.Right); 1154? Math.Max(prefSize.Width, elementSpace.Right + anchorDest.Width) 1155: Math.Max(prefSize.Width, anchorDest.Right);
System\Windows\Forms\Layout\FlowLayout.ContainerProxy.cs (3)
59value.X = DisplayRect.Right - value.Right; 137newBounds.X = DisplayRect.Right - bounds.X - bounds.Width + ElementProxy.Margin.Left - ElementProxy.Margin.Right;
System\Windows\Forms\Layout\FlowLayout.cs (1)
243if (location.X > rowBounds.Right)
System\Windows\Forms\Layout\LayoutUtils.cs (5)
543Debug.Assert(region1.Right == region2.Left, "Adjacency error."); 548Debug.Assert(region2.Right == region1.Left, "Adjacency error."); 593int right = (specified & AnchorStyles.Right) != 0 ? substitutionBounds.Right : originalBounds.Right; 603bounds.X = withinBounds.Width - bounds.Right;
System\Windows\Forms\Layout\TableLayout.cs (2)
1277elementBounds.X = cellBounds.X + (cellBounds.Right - elementBounds.Right);
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutPanel.cs (3)
362startx = displayRect.Right - (cellBorderWidth / 2); 444tableBounds.Right, 446tableBounds.Right,
System\Windows\Forms\Printing\PrintPreviewControl.cs (1)
827_vScrollBar.Left = availableRect.Right - _vScrollBar.Width;
System\Windows\Forms\Rendering\ControlPaint.cs (11)
1283graphics.DrawLine(pen, bounds.X + 1, bounds.Y, bounds.Right - 2, bounds.Y); 1284graphics.DrawLine(pen, bounds.X + 1, bounds.Bottom - 1, bounds.Right - 2, bounds.Bottom - 1); 1286graphics.DrawLine(pen, bounds.Right - 1, bounds.Y + 1, bounds.Right - 1, bounds.Bottom - 2); 1295graphics.DrawLine(pen, bounds.X, midy, bounds.Right - 2, midy); 1306graphics.DrawLine(pen, bounds.Right - 3, midy - 1, bounds.Right - 3, midy + 1); 1307graphics.DrawLine(pen, bounds.Right - 4, midy - 2, bounds.Right - 4, midy + 2); 1818PInvoke.Rectangle(desktopDC, rectangle.X, rectangle.Y, rectangle.Right, rectangle.Bottom); 2326int right = bound.Right;
System\Windows\Forms\Rendering\DCMapping.cs (1)
49viewportOrg.X + bounds.Right,
System\Windows\Forms\ToolTip\ToolTip.cs (10)
1329right = (rect.right > screen.WorkingArea.Right) ? screen.WorkingArea.Right : rect.right, 1482int pointX = (toolRectangle.Left + toolRectangle.Right) / 2; 1556new Rectangle(toolRectangle.Right, centeredY, width, height), 1933if (moveToLocation.X + tipSize.Width > screen.WorkingArea.Right) 1935moveToLocation.X = screen.WorkingArea.Right - tipSize.Width; 2197if (wp->x + wp->cx > screen.WorkingArea.Right) 2199wp->x = screen.WorkingArea.Right - wp->cx; 2206if (wp->x + wp->cx > screen.WorkingArea.Right) 2208wp->x = screen.WorkingArea.Right - wp->cx;
System.Windows.Forms.Design (66)
System\ComponentModel\Design\CollectionEditor.SplitButton.cs (5)
201_dropDownRectangle = new Rectangle(bounds.Right - PushButtonWidth - 1, 4, PushButtonWidth, bounds.Height - 8); 214g.DrawLine(SystemPens.ButtonHighlight, bounds.Right - PushButtonWidth, 4, bounds.Right - PushButtonWidth, bounds.Bottom - 4); 215g.DrawLine(SystemPens.ButtonHighlight, bounds.Right - PushButtonWidth - 1, 4, bounds.Right - PushButtonWidth - 1, bounds.Bottom - 4);
System\ComponentModel\Design\DesignerActionPanel.cs (6)
242if (rectangleAnchor.Right + sizePanel.Width > rectScreen.Right) 306x = rectangleAnchor.Right + EDGE_SPACE; 312x = rectangleAnchor.Right + EDGE_SPACE; 318x = rectangleAnchor.Right + EDGE_SPACE; 336x = rectangleAnchor.Right - sizePanel.Width;
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (3)
350editorLocation.X = Math.Min(rectScreen.Right - dropDownSize.Width, // min = right screen edge clip 351Math.Max(rectScreen.X, editorLocation.X + editorBounds.Right - dropDownSize.Width)); // max = left screen edge clip 374editorLocation.X = Math.Min(rectScreen.Right - dropDownSize.Width, // min = right screen edge clip
System\Windows\Forms\Design\Behavior\DesignerActionGlyph.cs (1)
155topRight.X = newRect.Right;
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (9)
696int maxRange = directionOffset.X < 0 ? currentBounds.Right : int.MaxValue; 832lines[i].X1 = Math.Min(dragRect.Right, lines[i].OriginalBounds.Right); 843lines[i].X1 = dragRect.Right; 844lines[i].X2 = lines[i].OriginalBounds.Right; 852coord += (Math.Min(dragRect.Right, lines[i].OriginalBounds.Right) - coord) / 2; 955Math.Max(dragBounds.Right + (_snapPointX != INVALID_VALUE ? _snapPointX : 0), bounds.Right), snapLine.Offset)
System\Windows\Forms\Design\Behavior\GrabHandleGlyph.cs (3)
38bounds = new Rectangle(controlBounds.Right - DesignerUtils.s_handleOverlap, controlBounds.Y + DesignerUtils.s_handleOverlap - DesignerUtils.s_handleSize, DesignerUtils.s_handleSize, DesignerUtils.s_handleSize); 43bounds = new Rectangle(controlBounds.Right - DesignerUtils.s_handleOverlap, controlBounds.Bottom - DesignerUtils.s_handleOverlap, 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\ResizeBehavior.cs (4)
96int xDelta = controlBounds.Right % _parentGridSize.Width; 715xOffset = !fRTL ? controlBounds.Right : controlBounds.Left; 728xPos = !fRTL ? controlBounds.Left : controlBounds.Right; 739bounds.X = Math.Min(baseBounds.Right - minWidth, baseBounds.X - xOffset);
System\Windows\Forms\Design\Behavior\ToolboxItemSnapLineBehavior.cs (4)
138offset.X = _lastRectangle.Right - mouseLoc.X; 196offset.X = _lastRectangle.Right - mouseLoc.X; 237new(SnapLineType.Right, r.Right), 243new(SnapLineType.Vertical, r.Right + 3, SnapLine.MarginRight, SnapLinePriority.Always)
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (2)
1021e.Graphics.FillRectangle(backBrush, new Rectangle(focusRectangle.Right + 1, e.Bounds.Y, e.Bounds.Width - focusRectangle.Right - 1, e.Bounds.Height));
System\Windows\Forms\Design\DesignerUtils.cs (4)
255PInvoke.RoundRect(hDC, bounds.Left, bounds.Top, bounds.Right, bounds.Bottom, 2, 2); 270PInvoke.Rectangle(hDC, bounds.Left, bounds.Top, bounds.Right, bounds.Bottom); 294PInvoke.Rectangle(hDC, bounds.Left, bounds.Top + s_lockedHandleLowerOffset, bounds.Right, bounds.Bottom); 465SelectionBorderGlyphType.Right => new Rectangle(originalBounds.Right, originalBounds.Top - borderSize, borderSize, originalBounds.Height + 2 * borderSize),
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (10)
294if (marginBounds.Right > currentMaxBottomRight) 296currentMaxBottomRight = marginBounds.Right; 399ReDrawIBar(new Point(bounds.Right, bounds.Top), new Point(bounds.Right, bounds.Bottom)); 402ReDrawIBar(new Point(bounds.Left, bounds.Top), new Point(bounds.Right, bounds.Top)); 405ReDrawIBar(new Point(bounds.Left, bounds.Bottom), new Point(bounds.Right, bounds.Bottom)); 415ReDrawIBar(new Point(bounds.Right, bounds.Top), new Point(bounds.Right, bounds.Bottom)); 421ReDrawIBar(new Point(bounds.Left, bounds.Bottom), new Point(bounds.Right, bounds.Bottom)); 424ReDrawIBar(new Point(bounds.Left, bounds.Top), new Point(bounds.Right, bounds.Top));
System\Windows\Forms\Design\OleDragDropHandler.cs (1)
445PInvoke.Rectangle(dc, rectangle.X, rectangle.Y, rectangle.Right, rectangle.Bottom);
System\Windows\Forms\Design\ParentControlDesigner.cs (4)
320snapLines.Add(new SnapLine(SnapLineType.Vertical, displayRectangle.Right, SnapLine.PaddingRight, SnapLinePriority.Always)); 848new SnapLine(SnapLineType.Left, r.Right), 849new SnapLine(SnapLineType.Right, r.Right), 923centeredLocation.Right >= parentWidth)
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (6)
862int startX = isRTL ? rc.Right : rc.Left; 884graphics.DrawLine(pen, rc.Left, startY, rc.Right, startY); 984else if (pos.X < bounds.Right) 986offset = bounds.Right; 1003if (pos.X >= bounds.Right) 1086int startLoc = isRTL ? bounds.Right : bounds.X;
System\Windows\Forms\Design\ToolStripTemplateNode.cs (4)
1902_hotRegion = new Rectangle(bounds.Right - s_templateHotRegionWidth - 2, bounds.Top + 2, s_templateHotRegionWidth, bounds.Bottom - 4); 1923_hotRegion = new Rectangle(bounds.Right - s_templateHotRegionWidth - 2, bounds.Top + 2, s_templateHotRegionWidth, bounds.Bottom - 4); 1988Rectangle fillRect = new(buttonBounds.Left + 1, buttonBounds.Top, buttonBounds.Right, buttonBounds.Bottom); 2007Rectangle fillRect = new(buttonBounds.Left + 1, buttonBounds.Top, buttonBounds.Right, buttonBounds.Bottom);
System.Windows.Forms.Primitives (3)
System\Windows\Forms\Automation\UiaTextRange.cs (1)
792|| lineEndPoint.X > clippingRectangle.Right))
System\Windows\Forms\DeviceContextExtensions.cs (2)
14DrawRectangle(hdc.HDC, rectangle.Left, rectangle.Top, rectangle.Right, rectangle.Bottom, hpen); 132DrawAndFillEllipse(hdc.HDC, pen, brush, bounds.Left, bounds.Top, bounds.Right, bounds.Bottom);
System.Windows.Forms.Tests (19)
System\Windows\Forms\ButtonRenderingTests.cs (16)
47new(bounds.Right - 1, 0), new(0, 0), 53new(0, bounds.Bottom - 1), new(bounds.Right - 1, bounds.Bottom - 1), 56new(bounds.Right - 1, bounds.Bottom - 1), new(bounds.Right - 1, -1), 59new(bounds.Right - 2, 1), new(1, 1), 65new(1, bounds.Bottom - 2), new(bounds.Right - 2, bounds.Bottom - 2), 68new(bounds.Right - 2, bounds.Bottom - 2), new(bounds.Right - 2, 0), 133new(bounds.Right - 1, 0), new(0, 0), 139new(0, bounds.Bottom - 1), new(bounds.Right - 1, bounds.Bottom - 1), 142new(bounds.Right - 1, bounds.Bottom - 1), new(bounds.Right - 1, -1), 145new(bounds.Right - 2, 1), new(1, 1), 151new(1, bounds.Bottom - 2), new(bounds.Right - 2, bounds.Bottom - 2), 154new(bounds.Right - 2, bounds.Bottom - 2), new(bounds.Right - 2, 0),
System\Windows\Forms\CursorTests.cs (1)
268Assert.True(position.X <= virtualScreen.Right);
System\Windows\Forms\ListViewTests.cs (2)
4098Assert.True((rect2.X >= rect1.Right && rect2.Y == rect1.Y) || (rect2.X == rect1.X && rect2.Y >= rect1.Bottom)); 4132Assert.True((rect2.X >= rect1.Right && rect2.Y == rect1.Y) || (rect2.X == rect1.X && rect2.Y >= rect1.Bottom));
System.Windows.Forms.UI.IntegrationTests (6)
ButtonTests.cs (4)
120Point mouseDragHandleOnForm = new(form.DisplayRectangle.Right, form.DisplayRectangle.Top + form.DisplayRectangle.Height / 2); 170Point mouseDragHandleOnForm = new(form.DisplayRectangle.Right, form.DisplayRectangle.Top + form.DisplayRectangle.Height / 2); 186Assert.Equal(originalFormSize.Width - originalButtonPosition.Right, form.DisplayRectangle.Width - button.DisplayRectangle.Right);
DragDropTests.cs (1)
917((MousePosition.X - _screenOffset.X) > form.DesktopBounds.Right) ||
Infra\ControlTestBase.cs (1)
397return new Point(GetMiddle(cell.Right, cell.Left), GetMiddle(cell.Top, cell.Bottom));