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)
389if (overflow || (SizingGrip && item.Bounds.IntersectsWith(SizeGripBounds))) 396else if (lastItem is not null && (lastItemBounds.IntersectsWith(item.Bounds))) 402else if (item.Bounds.Width == 1) 414if (item.Bounds.Location != noMansLand) 418lastItemBounds = lastItem.Bounds;
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (35)
893return (GripStyle == ToolStripGripStyle.Visible) ? Grip.Bounds : Rectangle.Empty; 1869Rectangle regionRect = (item is null) ? Rectangle.Empty : item.Bounds; 1904region.Union(displayedItems[i].Bounds); 2224Point midPointOfCurrent = new(selectedItem.Bounds.X + selectedItem.Width / 2, 2225selectedItem.Bounds.Y + selectedItem.Height / 2); 2235if (!down && otherItem.Bounds.Bottom > selectedItem.Bounds.Top) 2240else if (down && otherItem.Bounds.Top < selectedItem.Bounds.Bottom) 2248Point otherItemMidLocation = new(otherItem.Bounds.X + otherItem.Width / 2, (down) ? otherItem.Bounds.Top : otherItem.Bounds.Bottom); 2298if ((!down && tanWinner.Bounds.Bottom <= hypotenuseWinner.Bounds.Top) 2299|| (down && tanWinner.Bounds.Top > hypotenuseWinner.Bounds.Bottom)) 2396maxSize.Width += overflowItemMargin.Horizontal + overflowItem.Bounds.Width; 2454maxSize.Height += overflowItemMargin.Vertical + overflowItem.Bounds.Height; 2680Invalidate(item.Bounds); 3619Rectangle bounds = item.Bounds; 3671item.Bounds.X, 3672item.Bounds.Y, 3684item.Bounds.X, 3685item.Bounds.Y, 3991bounds = _lastMouseActiveItem.Bounds; 4007bounds = DisplayedItems[i].Bounds; 4162Point newLocation = item.Bounds.Location; 4312if (Grip.Bounds != gripRectangle) 4331size = LayoutUtils.UnionSizes(size, _toolStripOverflowButton.Bounds.Size); 4336size = LayoutUtils.UnionSizes(size, _toolStripGrip.Bounds.Size); 4406biggestItemSize = LayoutUtils.UnionSizes(biggestItemSize, item.Bounds.Size); 4453bool intersects = item.Bounds.IntersectsWith(clientBounds); 4455bool verticallyContained = clientBounds.Contains(clientBounds.X, item.Bounds.Top) 4456&& clientBounds.Contains(clientBounds.X, item.Bounds.Bottom); 4466biggestItemSize = LayoutUtils.UnionSizes(biggestItemSize, item.Bounds.Size);
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.cs (4)
42Rectangle bounds = Bounds; 650Size size = LayoutUtils.DeflateRect(Bounds, Padding).Size; 651Rectangle bounds = LayoutUtils.Align(size, Bounds, ControlAlign); 660bounds = LayoutUtils.Align(_control.Size, Bounds, ControlAlign);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (1)
1335if (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)
116internal virtual Rectangle DropDownButtonArea => Bounds;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (28)
325maxNonMenuItemSize.Height = Math.Max(item.Bounds.Height, maxNonMenuItemSize.Height); 326maxNonMenuItemSize.Width = Math.Max(item.Bounds.Width, maxNonMenuItemSize.Width); 467if (!displayRect.Contains(displayRect.X, nextItem.Bounds.Top) 468|| !displayRect.Contains(displayRect.X, nextItem.Bounds.Bottom)) 471if (displayRect.Y > nextItem.Bounds.Top) 473delta = nextItem.Bounds.Top - displayRect.Y; 477delta = nextItem.Bounds.Bottom - (displayRect.Y + displayRect.Height); 483if ((Items[index].Visible && displayRect.Contains(displayRect.X, Items[index].Bounds.Top - delta)) 496if (displayRect.Contains(displayRect.X, Items[index].Bounds.Bottom - delta)) 499delta += (Items[index].Bounds.Bottom - delta) - displayRect.Top; 623int delta = Items[0].Bounds.Top - DisplayRectangle.Top; 656int alreadyScrolled = displayRectangle.Top - Items[0].Bounds.Top; 667Rectangle adjustedLastItemBounds = Items[Items.Count - 1].Bounds; 679deltaToScroll += Items[i + 1].Bounds.Top - Items[i].Bounds.Top; 683deltaToScroll += Items[i].Bounds.Height; 694Rectangle adjustedLastItemBounds = Items[0].Bounds; 706deltaToScroll -= Items[i].Bounds.Top - Items[i - 1].Bounds.Top; 710deltaToScroll -= Items[i].Bounds.Height; 717_scrollAmount = DisplayRectangle.Top - Items[0].Bounds.Top; 755delta = itemTop.Bounds.Top - itemBottom.Bounds.Top; 769delta = itemBottom.Bounds.Top - itemTop.Bounds.Top; 839if (_indexOfFirstDisplayedItem == -1 && displayRectangle.Contains(displayRectangle.X, item.Bounds.Top)) 844minY = Math.Min(minY, item.Bounds.Top); 845maxY = Math.Max(maxY, item.Bounds.Bottom);
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (9)
958get => Bounds.Height; 961Rectangle currentBounds = Bounds; 977Rectangle IArrangedElement.DisplayRectangle => Bounds; 1820get => Bounds.Size; 1823Rectangle currentBounds = Bounds; 2030get => Bounds.Width; 2033Rectangle currentBounds = Bounds; 2386public void Invalidate() => ParentInternal?.Invalidate(Bounds, true); 3491Point currentToolStripItemLocation = Bounds.Location;
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.ToolStripItemAccessibleObject.cs (1)
300Rectangle bounds = Owner.Bounds;
System\Windows\Forms\Controls\ToolStrips\ToolStripOverflow.cs (1)
141biggestItemSize = LayoutUtils.UnionSizes(biggestItemSize, item.Bounds.Size);
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.cs (2)
89return SplitButtonButton.Bounds; 467if ((e.Button == MouseButtons.Left) && SplitButtonButton.Bounds.Contains(clickPoint))
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.ToolStripSplitButtonButtonLayout.cs (2)
44imageRect.Offset(_owner.SplitButtonButton.Bounds.Location); 55textRect.Offset(_owner.SplitButtonButton.Bounds.Location);
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackDragDropHandler.cs (7)
81RelativeLocation relativeLocation = ComparePositions(item.Bounds, ownerClientAreaRelativeDropPoint); 137RelativeLocation relativeLocation = ComparePositions(item.Bounds, ownerClientAreaRelativeDropPoint); 143insertionRect = new Rectangle(_owner.Margin.Left, item.Bounds.Top, _owner.Width - (_owner.Margin.Horizontal) - 1, ToolStrip.s_insertionBeamWidth); 146insertionRect = new Rectangle(_owner.Margin.Left, item.Bounds.Bottom, _owner.Width - (_owner.Margin.Horizontal) - 1, ToolStrip.s_insertionBeamWidth); 149insertionRect = new Rectangle(item.Bounds.Right, _owner.Margin.Top, ToolStrip.s_insertionBeamWidth, _owner.Height - (_owner.Margin.Vertical) - 1); 152insertionRect = new Rectangle(item.Bounds.Left, _owner.Margin.Top, ToolStrip.s_insertionBeamWidth, _owner.Height - (_owner.Margin.Vertical) - 1); 174Rectangle bounds = _owner.DisplayedItems[i].Bounds;
System\Windows\Forms\Printing\PrintPreviewDialog.cs (2)
1143Rectangle rect = new(0, 0, item.Bounds.Width - 1, item.Bounds.Height - 1);
System.Windows.Forms.Design (14)
System\Windows\Forms\Design\DesignerToolStripControlHost.cs (1)
53Rectangle r = Bounds;
System\Windows\Forms\Design\ToolStripDesigner.cs (4)
379return ToolStrip.OverflowButton.Bounds; 1827if (offset.X >= parentToolStrip.Items[0].Bounds.X) 1832else if (offset.X <= parentToolStrip.Items[0].Bounds.X) 1839if (offset.Y <= parentToolStrip.Items[0].Bounds.Y)
System\Windows\Forms\Design\ToolStripItemDesigner.cs (4)
517r = ToolStripItem.Bounds; 923Rectangle r = ToolStripItem.Bounds; 1226Rectangle origBoundsInAdornerWindow = ToolStripItem.Bounds; 1247Rectangle boundsInAdornerWindow = ToolStripItem.Bounds;
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (5)
1389if (!(dropDownItem.Owner is ToolStripDropDownMenu) && dropDownItem is not null && dropDownItem.Bounds.Width < _commitedEditorNode.Bounds.Width) 1392dropDownItem.DropDown.Location = new Point(dropDownItem.DropDown.Location.X + _commitedEditorNode.Bounds.Width - dropDownItem.Bounds.Width, dropDownItem.DropDown.Location.Y); 1405Rectangle bounds = wb.Items[i].Bounds;
System.Windows.Forms.Tests (88)
System\Windows\Forms\ToolStripButtonTests.cs (6)
33Assert.Equal(new Rectangle(0, 0, 23, 23), item.Bounds); 114Assert.Equal(new Rectangle(0, 0, 23, 23), item.Bounds); 201Assert.Equal(new Rectangle(0, 0, 23, 23), item.Bounds); 291Assert.Equal(new Rectangle(0, 0, 23, 23), item.Bounds); 379Assert.Equal(new Rectangle(0, 0, 23, 23), item.Bounds); 477Assert.Equal(new Rectangle(0, 0, 23, 23), item.Bounds);
System\Windows\Forms\ToolStripButtonTests.Rendering.cs (6)
27Rectangle bounds = toolStripButton.Bounds; 51Rectangle bounds = toolStripButton.Bounds; 76Rectangle bounds = toolStripButton.Bounds; 102Rectangle bounds = toolStripButton.Bounds; 128Rectangle bounds = toolStripDropDownButton.Bounds; 155Rectangle bounds = toolStripDropDownButton.Bounds;
System\Windows\Forms\ToolStripControlHostTests.cs (8)
63Assert.Equal(c.Bounds, item.Bounds); 707Assert.Equal(new Rectangle(10, 20, 30, 40), item.Bounds); 714Assert.Equal(new Rectangle(10, 20, 30, 40), item.Bounds); 2778Assert.Equal(new Rectangle(10, 20, 30, 40), item.Bounds); 2784Assert.Equal(new Rectangle(10, 20, 30, 40), item.Bounds); 2863Assert.Equal(new Rectangle(1, 2, 3, 4), item.Bounds); 2867Assert.Equal(new Rectangle(1, 2, 3, 4), item.Bounds); 3853Assert.Equal(new Rectangle(1, 2, 3, 4), item.Bounds);
System\Windows\Forms\ToolStripDropDownItemTests.cs (4)
32Assert.Equal(new Rectangle(0, 0, 23, 23), item.Bounds); 121Assert.Equal(new Rectangle(0, 0, 23, 23), item.Bounds); 220Assert.Equal(new Rectangle(0, 0, 23, 23), item.Bounds); 320Assert.Equal(new Rectangle(0, 0, 23, 23), item.Bounds);
System\Windows\Forms\ToolStripDropDownTests.cs (3)
4893items[i].SetBounds(0, items[i - 1].Bounds.Bottom + 1, items[i].Bounds.Width, items[i].Bounds.Height);
System\Windows\Forms\ToolStripItemTests.cs (33)
35Assert.Equal(new Rectangle(0, 0, 23, 23), item.Bounds); 120Assert.Equal(new Rectangle(0, 0, 23, 23), item.Bounds); 215Assert.Equal(new Rectangle(0, 0, 23, 23), item.Bounds); 7738Assert.NotNull(owner.GetItemAt(item.Bounds.X, item.Bounds.Y)); 7739owner.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, item.Bounds.X, item.Bounds.Y, 0)); 7776Assert.NotNull(parent.GetItemAt(item.Bounds.X, item.Bounds.Y)); 7777parent.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, item.Bounds.X, item.Bounds.Y, 0)); 7794Assert.Same(item, parent.GetItemAt(item.Bounds.X, item.Bounds.Y)); 7795parent.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, item.Bounds.X, item.Bounds.Y, 0)); 14451Assert.NotNull(owner.GetItemAt(item.Bounds.X, item.Bounds.Y)); 14452owner.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, item.Bounds.X, item.Bounds.Y, 0)); 14540Assert.NotNull(parent.GetItemAt(item.Bounds.X, item.Bounds.Y)); 14541parent.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, item.Bounds.X, item.Bounds.Y, 0)); 14579Assert.Equal(bounds, item.Bounds); 14587Assert.Equal(bounds, item.Bounds); 14617Assert.Equal(bounds, item.Bounds); 14627Assert.Equal(bounds, item.Bounds); 14671Assert.Equal(bounds, item.Bounds); 14684Assert.Equal(bounds, item.Bounds); 14745Assert.Equal(bounds, item.Bounds); 14755Assert.Equal(bounds, item.Bounds); 14806Assert.Equal(bounds, item.Bounds); 14819Assert.Equal(bounds, item.Bounds);
System\Windows\Forms\ToolStripMenuItemTests.cs (1)
33Assert.Equal(new Rectangle(0, 0, 32, 19), item.Bounds);
System\Windows\Forms\ToolStripSeparatorTests.cs (11)
33Assert.Equal(new Rectangle(0, 0, 6, 6), item.Bounds); 1379Assert.Equal(bounds, item.Bounds); 1387Assert.Equal(bounds, item.Bounds); 1417Assert.Equal(bounds, item.Bounds); 1427Assert.Equal(bounds, item.Bounds); 1479Assert.Equal(new Rectangle(2, bounds.Y, 57, bounds.Height), item.Bounds); 1489Assert.Equal(new Rectangle(2, bounds.Y, 57, bounds.Height), item.Bounds); 1547Assert.Equal(bounds, item.Bounds); 1557Assert.Equal(bounds, item.Bounds); 1601Assert.Equal(bounds, item.Bounds); 1611Assert.Equal(bounds, item.Bounds);
System\Windows\Forms\ToolStripTests.cs (16)
5831toolStrip.OnMouseMove(new MouseEventArgs(MouseButtons.Left, 1, item.Bounds.X, item.Bounds.Y, 0)); 6702Rectangle oldBounds1 = item1.Bounds; 6703Rectangle oldBounds2 = item2.Bounds; 6705Assert.Equal(new Rectangle(expectedItem1Location, oldBounds1.Size), item1.Bounds); 6706Assert.Equal(new Rectangle(expectedItem2Location, oldBounds2.Size), item2.Bounds); 6754Rectangle oldBounds1 = item1.Bounds; 6755Rectangle oldBounds2 = item2.Bounds; 6757Assert.Equal(new Rectangle(expectedItem1Location, oldBounds1.Size), item1.Bounds); 6758Assert.Equal(new Rectangle(expectedItem2Location, oldBounds2.Size), item2.Bounds); 7018Rectangle oldBounds = item.Bounds; 7020Assert.Equal(new Rectangle(location, oldBounds.Size), item.Bounds); 7027Assert.Equal(new Rectangle(location, oldBounds.Size), item.Bounds); 7067Rectangle oldBounds = item.Bounds; 7069Assert.Equal(new Rectangle(location, oldBounds.Size), item.Bounds); 7079Assert.Equal(new Rectangle(location, oldBounds.Size), item.Bounds);