Implemented interface member:
property
Bounds
System.Windows.Forms.Layout.IArrangedElement.Bounds
203 references to Bounds
System.Windows.Forms (101)
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (5)
389
if (overflow || (SizingGrip && item.
Bounds
.IntersectsWith(SizeGripBounds)))
396
else if (lastItem is not null && (lastItemBounds.IntersectsWith(item.
Bounds
)))
402
else if (item.
Bounds
.Width == 1)
414
if (item.
Bounds
.Location != noMansLand)
418
lastItemBounds = lastItem.
Bounds
;
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (35)
855
return (GripStyle == ToolStripGripStyle.Visible) ? Grip.
Bounds
: Rectangle.Empty;
1783
Rectangle regionRect = (item is null) ? Rectangle.Empty : item.
Bounds
;
1818
region.Union(displayedItems[i].
Bounds
);
2140
Point midPointOfCurrent = new(selectedItem.
Bounds
.X + selectedItem.Width / 2,
2141
selectedItem.
Bounds
.Y + selectedItem.Height / 2);
2151
if (!down && otherItem.
Bounds
.Bottom > selectedItem.
Bounds
.Top)
2156
else if (down && otherItem.
Bounds
.Top < selectedItem.
Bounds
.Bottom)
2164
Point otherItemMidLocation = new(otherItem.
Bounds
.X + otherItem.Width / 2, (down) ? otherItem.
Bounds
.Top : otherItem.
Bounds
.Bottom);
2214
if ((!down && tanWinner.
Bounds
.Bottom <= hypotenuseWinner.
Bounds
.Top)
2215
|| (down && tanWinner.
Bounds
.Top > hypotenuseWinner.
Bounds
.Bottom))
2312
maxSize.Width += overflowItemMargin.Horizontal + overflowItem.
Bounds
.Width;
2370
maxSize.Height += overflowItemMargin.Vertical + overflowItem.
Bounds
.Height;
2580
Invalidate(item.
Bounds
);
3505
Rectangle bounds = item.
Bounds
;
3558
item.
Bounds
.X,
3559
item.
Bounds
.Y,
3571
item.
Bounds
.X,
3572
item.
Bounds
.Y,
3878
bounds = _lastMouseActiveItem.
Bounds
;
3894
bounds = DisplayedItems[i].
Bounds
;
4049
Point newLocation = item.
Bounds
.Location;
4199
if (Grip.
Bounds
!= gripRectangle)
4218
size = LayoutUtils.UnionSizes(size, _toolStripOverflowButton.
Bounds
.Size);
4223
size = LayoutUtils.UnionSizes(size, _toolStripGrip.
Bounds
.Size);
4295
biggestItemSize = LayoutUtils.UnionSizes(biggestItemSize, item.
Bounds
.Size);
4342
bool intersects = item.
Bounds
.IntersectsWith(clientBounds);
4344
bool verticallyContained = clientBounds.Contains(clientBounds.X, item.
Bounds
.Top)
4345
&& clientBounds.Contains(clientBounds.X, item.
Bounds
.Bottom);
4355
biggestItemSize = LayoutUtils.UnionSizes(biggestItemSize, item.
Bounds
.Size);
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.cs (4)
42
Rectangle bounds =
Bounds
;
650
Size size = LayoutUtils.DeflateRect(
Bounds
, Padding).Size;
651
Rectangle bounds = LayoutUtils.Align(size,
Bounds
, ControlAlign);
660
bounds = LayoutUtils.Align(_control.Size,
Bounds
, ControlAlign);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (1)
1215
if (OwnerItem.
Bounds
.Contains(WindowsFormsUtils.TranslatePoint(mea.Location, this, OwnerToolStrip)))
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownButton.ToolStripDropDownButtonInternalLayout.cs (3)
66
_dropDownArrowRect = new Rectangle(_dropDownArrowPadding.Left, 0, s_dropDownArrowSize.Width, _ownerItem.
Bounds
.Height);
71
_dropDownArrowRect = new Rectangle(options.Client.Right, 0, s_dropDownArrowSize.Width, _ownerItem.
Bounds
.Height);
82
_dropDownArrowRect = new Rectangle(0, options.Client.Bottom + _dropDownArrowPadding.Top, _ownerItem.
Bounds
.Width - 1, s_dropDownArrowSize.Height);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownItem.cs (1)
116
internal virtual Rectangle DropDownButtonArea =>
Bounds
;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (28)
325
maxNonMenuItemSize.Height = Math.Max(item.
Bounds
.Height, maxNonMenuItemSize.Height);
326
maxNonMenuItemSize.Width = Math.Max(item.
Bounds
.Width, maxNonMenuItemSize.Width);
467
if (!displayRect.Contains(displayRect.X, nextItem.
Bounds
.Top)
468
|| !displayRect.Contains(displayRect.X, nextItem.
Bounds
.Bottom))
471
if (displayRect.Y > nextItem.
Bounds
.Top)
473
delta = nextItem.
Bounds
.Top - displayRect.Y;
477
delta = nextItem.
Bounds
.Bottom - (displayRect.Y + displayRect.Height);
483
if ((Items[index].Visible && displayRect.Contains(displayRect.X, Items[index].
Bounds
.Top - delta))
496
if (displayRect.Contains(displayRect.X, Items[index].
Bounds
.Bottom - delta))
499
delta += (Items[index].
Bounds
.Bottom - delta) - displayRect.Top;
619
int delta = Items[0].
Bounds
.Top - DisplayRectangle.Top;
652
int alreadyScrolled = displayRectangle.Top - Items[0].
Bounds
.Top;
663
Rectangle adjustedLastItemBounds = Items[Items.Count - 1].
Bounds
;
675
deltaToScroll += Items[i + 1].
Bounds
.Top - Items[i].
Bounds
.Top;
679
deltaToScroll += Items[i].
Bounds
.Height;
690
Rectangle adjustedLastItemBounds = Items[0].
Bounds
;
702
deltaToScroll -= Items[i].
Bounds
.Top - Items[i - 1].
Bounds
.Top;
706
deltaToScroll -= Items[i].
Bounds
.Height;
713
_scrollAmount = DisplayRectangle.Top - Items[0].
Bounds
.Top;
751
delta = itemTop.
Bounds
.Top - itemBottom.
Bounds
.Top;
764
delta = itemBottom.
Bounds
.Top - itemTop.
Bounds
.Top;
834
if (_indexOfFirstDisplayedItem == -1 && displayRectangle.Contains(displayRectangle.X, item.
Bounds
.Top))
839
minY = Math.Min(minY, item.
Bounds
.Top);
840
maxY = Math.Max(maxY, item.
Bounds
.Bottom);
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (9)
949
get =>
Bounds
.Height;
952
Rectangle currentBounds =
Bounds
;
968
Rectangle IArrangedElement.DisplayRectangle =>
Bounds
;
1804
get =>
Bounds
.Size;
1807
Rectangle currentBounds =
Bounds
;
2006
get =>
Bounds
.Width;
2009
Rectangle currentBounds =
Bounds
;
2360
public void Invalidate() => ParentInternal?.Invalidate(
Bounds
, true);
3440
Point currentToolStripItemLocation =
Bounds
.Location;
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.ToolStripItemAccessibleObject.cs (1)
300
Rectangle bounds = Owner.
Bounds
;
System\Windows\Forms\Controls\ToolStrips\ToolStripOverflow.cs (1)
141
biggestItemSize = LayoutUtils.UnionSizes(biggestItemSize, item.
Bounds
.Size);
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.cs (2)
89
return SplitButtonButton.
Bounds
;
467
if ((e.Button == MouseButtons.Left) && SplitButtonButton.
Bounds
.Contains(clickPoint))
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.ToolStripSplitButtonButtonLayout.cs (2)
44
imageRect.Offset(_owner.SplitButtonButton.
Bounds
.Location);
55
textRect.Offset(_owner.SplitButtonButton.
Bounds
.Location);
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackDragDropHandler.cs (7)
81
RelativeLocation relativeLocation = ComparePositions(item.
Bounds
, ownerClientAreaRelativeDropPoint);
137
RelativeLocation relativeLocation = ComparePositions(item.
Bounds
, ownerClientAreaRelativeDropPoint);
143
insertionRect = new Rectangle(_owner.Margin.Left, item.
Bounds
.Top, _owner.Width - (_owner.Margin.Horizontal) - 1, ToolStrip.s_insertionBeamWidth);
146
insertionRect = new Rectangle(_owner.Margin.Left, item.
Bounds
.Bottom, _owner.Width - (_owner.Margin.Horizontal) - 1, ToolStrip.s_insertionBeamWidth);
149
insertionRect = new Rectangle(item.
Bounds
.Right, _owner.Margin.Top, ToolStrip.s_insertionBeamWidth, _owner.Height - (_owner.Margin.Vertical) - 1);
152
insertionRect = new Rectangle(item.
Bounds
.Left, _owner.Margin.Top, ToolStrip.s_insertionBeamWidth, _owner.Height - (_owner.Margin.Vertical) - 1);
174
Rectangle bounds = _owner.DisplayedItems[i].
Bounds
;
System\Windows\Forms\Printing\PrintPreviewDialog.cs (2)
1143
Rectangle rect = new(0, 0, item.
Bounds
.Width - 1, item.
Bounds
.Height - 1);
System.Windows.Forms.Design (14)
System\Windows\Forms\Design\DesignerToolStripControlHost.cs (1)
53
Rectangle r =
Bounds
;
System\Windows\Forms\Design\ToolStripDesigner.cs (4)
379
return ToolStrip.OverflowButton.
Bounds
;
1808
if (offset.X >= parentToolStrip.Items[0].
Bounds
.X)
1813
else if (offset.X <= parentToolStrip.Items[0].
Bounds
.X)
1820
if (offset.Y <= parentToolStrip.Items[0].
Bounds
.Y)
System\Windows\Forms\Design\ToolStripItemDesigner.cs (4)
517
r = ToolStripItem.
Bounds
;
923
Rectangle r = ToolStripItem.
Bounds
;
1226
Rectangle origBoundsInAdornerWindow = ToolStripItem.
Bounds
;
1247
Rectangle boundsInAdornerWindow = ToolStripItem.
Bounds
;
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (5)
1373
if (!(dropDownItem.Owner is ToolStripDropDownMenu) && dropDownItem is not null && dropDownItem.
Bounds
.Width < _commitedEditorNode.
Bounds
.Width)
1376
dropDownItem.DropDown.Location = new Point(dropDownItem.DropDown.Location.X + _commitedEditorNode.
Bounds
.Width - dropDownItem.
Bounds
.Width, dropDownItem.DropDown.Location.Y);
1389
Rectangle bounds = wb.Items[i].
Bounds
;
System.Windows.Forms.Tests (88)
System\Windows\Forms\ToolStripButtonTests.cs (6)
33
Assert.Equal(new Rectangle(0, 0, 23, 23), item.
Bounds
);
114
Assert.Equal(new Rectangle(0, 0, 23, 23), item.
Bounds
);
201
Assert.Equal(new Rectangle(0, 0, 23, 23), item.
Bounds
);
291
Assert.Equal(new Rectangle(0, 0, 23, 23), item.
Bounds
);
379
Assert.Equal(new Rectangle(0, 0, 23, 23), item.
Bounds
);
477
Assert.Equal(new Rectangle(0, 0, 23, 23), item.
Bounds
);
System\Windows\Forms\ToolStripButtonTests.Rendering.cs (6)
27
Rectangle bounds = toolStripButton.
Bounds
;
51
Rectangle bounds = toolStripButton.
Bounds
;
76
Rectangle bounds = toolStripButton.
Bounds
;
102
Rectangle bounds = toolStripButton.
Bounds
;
128
Rectangle bounds = toolStripDropDownButton.
Bounds
;
155
Rectangle bounds = toolStripDropDownButton.
Bounds
;
System\Windows\Forms\ToolStripControlHostTests.cs (8)
63
Assert.Equal(c.Bounds, item.
Bounds
);
707
Assert.Equal(new Rectangle(10, 20, 30, 40), item.
Bounds
);
714
Assert.Equal(new Rectangle(10, 20, 30, 40), item.
Bounds
);
2778
Assert.Equal(new Rectangle(10, 20, 30, 40), item.
Bounds
);
2784
Assert.Equal(new Rectangle(10, 20, 30, 40), item.
Bounds
);
2863
Assert.Equal(new Rectangle(1, 2, 3, 4), item.
Bounds
);
2867
Assert.Equal(new Rectangle(1, 2, 3, 4), item.
Bounds
);
3853
Assert.Equal(new Rectangle(1, 2, 3, 4), item.
Bounds
);
System\Windows\Forms\ToolStripDropDownItemTests.cs (4)
32
Assert.Equal(new Rectangle(0, 0, 23, 23), item.
Bounds
);
121
Assert.Equal(new Rectangle(0, 0, 23, 23), item.
Bounds
);
220
Assert.Equal(new Rectangle(0, 0, 23, 23), item.
Bounds
);
320
Assert.Equal(new Rectangle(0, 0, 23, 23), item.
Bounds
);
System\Windows\Forms\ToolStripDropDownTests.cs (3)
4893
items[i].SetBounds(0, items[i - 1].
Bounds
.Bottom + 1, items[i].
Bounds
.Width, items[i].
Bounds
.Height);
System\Windows\Forms\ToolStripItemTests.cs (33)
35
Assert.Equal(new Rectangle(0, 0, 23, 23), item.
Bounds
);
120
Assert.Equal(new Rectangle(0, 0, 23, 23), item.
Bounds
);
215
Assert.Equal(new Rectangle(0, 0, 23, 23), item.
Bounds
);
7737
Assert.NotNull(owner.GetItemAt(item.
Bounds
.X, item.
Bounds
.Y));
7738
owner.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, item.
Bounds
.X, item.
Bounds
.Y, 0));
7775
Assert.NotNull(parent.GetItemAt(item.
Bounds
.X, item.
Bounds
.Y));
7776
parent.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, item.
Bounds
.X, item.
Bounds
.Y, 0));
7793
Assert.Same(item, parent.GetItemAt(item.
Bounds
.X, item.
Bounds
.Y));
7794
parent.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, item.
Bounds
.X, item.
Bounds
.Y, 0));
14431
Assert.NotNull(owner.GetItemAt(item.
Bounds
.X, item.
Bounds
.Y));
14432
owner.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, item.
Bounds
.X, item.
Bounds
.Y, 0));
14520
Assert.NotNull(parent.GetItemAt(item.
Bounds
.X, item.
Bounds
.Y));
14521
parent.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, item.
Bounds
.X, item.
Bounds
.Y, 0));
14559
Assert.Equal(bounds, item.
Bounds
);
14567
Assert.Equal(bounds, item.
Bounds
);
14597
Assert.Equal(bounds, item.
Bounds
);
14607
Assert.Equal(bounds, item.
Bounds
);
14651
Assert.Equal(bounds, item.
Bounds
);
14664
Assert.Equal(bounds, item.
Bounds
);
14725
Assert.Equal(bounds, item.
Bounds
);
14735
Assert.Equal(bounds, item.
Bounds
);
14786
Assert.Equal(bounds, item.
Bounds
);
14799
Assert.Equal(bounds, item.
Bounds
);
System\Windows\Forms\ToolStripMenuItemTests.cs (1)
33
Assert.Equal(new Rectangle(0, 0, 32, 19), item.
Bounds
);
System\Windows\Forms\ToolStripSeparatorTests.cs (11)
33
Assert.Equal(new Rectangle(0, 0, 6, 6), item.
Bounds
);
1379
Assert.Equal(bounds, item.
Bounds
);
1387
Assert.Equal(bounds, item.
Bounds
);
1417
Assert.Equal(bounds, item.
Bounds
);
1427
Assert.Equal(bounds, item.
Bounds
);
1479
Assert.Equal(new Rectangle(2, bounds.Y, 57, bounds.Height), item.
Bounds
);
1489
Assert.Equal(new Rectangle(2, bounds.Y, 57, bounds.Height), item.
Bounds
);
1547
Assert.Equal(bounds, item.
Bounds
);
1557
Assert.Equal(bounds, item.
Bounds
);
1601
Assert.Equal(bounds, item.
Bounds
);
1611
Assert.Equal(bounds, item.
Bounds
);
System\Windows\Forms\ToolStripTests.cs (16)
5831
toolStrip.OnMouseMove(new MouseEventArgs(MouseButtons.Left, 1, item.
Bounds
.X, item.
Bounds
.Y, 0));
6702
Rectangle oldBounds1 = item1.
Bounds
;
6703
Rectangle oldBounds2 = item2.
Bounds
;
6705
Assert.Equal(new Rectangle(expectedItem1Location, oldBounds1.Size), item1.
Bounds
);
6706
Assert.Equal(new Rectangle(expectedItem2Location, oldBounds2.Size), item2.
Bounds
);
6754
Rectangle oldBounds1 = item1.
Bounds
;
6755
Rectangle oldBounds2 = item2.
Bounds
;
6757
Assert.Equal(new Rectangle(expectedItem1Location, oldBounds1.Size), item1.
Bounds
);
6758
Assert.Equal(new Rectangle(expectedItem2Location, oldBounds2.Size), item2.
Bounds
);
7018
Rectangle oldBounds = item.
Bounds
;
7020
Assert.Equal(new Rectangle(location, oldBounds.Size), item.
Bounds
);
7027
Assert.Equal(new Rectangle(location, oldBounds.Size), item.
Bounds
);
7067
Rectangle oldBounds = item.
Bounds
;
7069
Assert.Equal(new Rectangle(location, oldBounds.Size), item.
Bounds
);
7079
Assert.Equal(new Rectangle(location, oldBounds.Size), item.
Bounds
);