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)
855return (GripStyle == ToolStripGripStyle.Visible) ? Grip.Bounds : Rectangle.Empty; 1783Rectangle regionRect = (item is null) ? Rectangle.Empty : item.Bounds; 1818region.Union(displayedItems[i].Bounds); 2140Point midPointOfCurrent = new(selectedItem.Bounds.X + selectedItem.Width / 2, 2141selectedItem.Bounds.Y + selectedItem.Height / 2); 2151if (!down && otherItem.Bounds.Bottom > selectedItem.Bounds.Top) 2156else if (down && otherItem.Bounds.Top < selectedItem.Bounds.Bottom) 2164Point otherItemMidLocation = new(otherItem.Bounds.X + otherItem.Width / 2, (down) ? otherItem.Bounds.Top : otherItem.Bounds.Bottom); 2214if ((!down && tanWinner.Bounds.Bottom <= hypotenuseWinner.Bounds.Top) 2215|| (down && tanWinner.Bounds.Top > hypotenuseWinner.Bounds.Bottom)) 2312maxSize.Width += overflowItemMargin.Horizontal + overflowItem.Bounds.Width; 2370maxSize.Height += overflowItemMargin.Vertical + overflowItem.Bounds.Height; 2580Invalidate(item.Bounds); 3505Rectangle bounds = item.Bounds; 3558item.Bounds.X, 3559item.Bounds.Y, 3571item.Bounds.X, 3572item.Bounds.Y, 3878bounds = _lastMouseActiveItem.Bounds; 3894bounds = DisplayedItems[i].Bounds; 4049Point newLocation = item.Bounds.Location; 4199if (Grip.Bounds != gripRectangle) 4218size = LayoutUtils.UnionSizes(size, _toolStripOverflowButton.Bounds.Size); 4223size = LayoutUtils.UnionSizes(size, _toolStripGrip.Bounds.Size); 4295biggestItemSize = LayoutUtils.UnionSizes(biggestItemSize, item.Bounds.Size); 4342bool intersects = item.Bounds.IntersectsWith(clientBounds); 4344bool verticallyContained = clientBounds.Contains(clientBounds.X, item.Bounds.Top) 4345&& clientBounds.Contains(clientBounds.X, item.Bounds.Bottom); 4355biggestItemSize = 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)
1215if (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; 619int delta = Items[0].Bounds.Top - DisplayRectangle.Top; 652int alreadyScrolled = displayRectangle.Top - Items[0].Bounds.Top; 663Rectangle adjustedLastItemBounds = Items[Items.Count - 1].Bounds; 675deltaToScroll += Items[i + 1].Bounds.Top - Items[i].Bounds.Top; 679deltaToScroll += Items[i].Bounds.Height; 690Rectangle adjustedLastItemBounds = Items[0].Bounds; 702deltaToScroll -= Items[i].Bounds.Top - Items[i - 1].Bounds.Top; 706deltaToScroll -= Items[i].Bounds.Height; 713_scrollAmount = DisplayRectangle.Top - Items[0].Bounds.Top; 751delta = itemTop.Bounds.Top - itemBottom.Bounds.Top; 764delta = itemBottom.Bounds.Top - itemTop.Bounds.Top; 834if (_indexOfFirstDisplayedItem == -1 && displayRectangle.Contains(displayRectangle.X, item.Bounds.Top)) 839minY = Math.Min(minY, item.Bounds.Top); 840maxY = Math.Max(maxY, item.Bounds.Bottom);
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (9)
949get => Bounds.Height; 952Rectangle currentBounds = Bounds; 968Rectangle IArrangedElement.DisplayRectangle => Bounds; 1804get => Bounds.Size; 1807Rectangle currentBounds = Bounds; 2006get => Bounds.Width; 2009Rectangle currentBounds = Bounds; 2360public void Invalidate() => ParentInternal?.Invalidate(Bounds, true); 3440Point 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; 1808if (offset.X >= parentToolStrip.Items[0].Bounds.X) 1813else if (offset.X <= parentToolStrip.Items[0].Bounds.X) 1820if (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)
1373if (!(dropDownItem.Owner is ToolStripDropDownMenu) && dropDownItem is not null && dropDownItem.Bounds.Width < _commitedEditorNode.Bounds.Width) 1376dropDownItem.DropDown.Location = new Point(dropDownItem.DropDown.Location.X + _commitedEditorNode.Bounds.Width - dropDownItem.Bounds.Width, dropDownItem.DropDown.Location.Y); 1389Rectangle 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); 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)); 14559Assert.Equal(bounds, item.Bounds); 14567Assert.Equal(bounds, item.Bounds); 14597Assert.Equal(bounds, item.Bounds); 14607Assert.Equal(bounds, item.Bounds); 14651Assert.Equal(bounds, item.Bounds); 14664Assert.Equal(bounds, item.Bounds); 14725Assert.Equal(bounds, item.Bounds); 14735Assert.Equal(bounds, item.Bounds); 14786Assert.Equal(bounds, item.Bounds); 14799Assert.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);