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