60 references to Contains
System.Drawing.Common.Tests (1)
System\Drawing\GraphicsTests.cs (1)
1568if (!drawnRect.Contains(x, y))
System.Drawing.Primitives (1)
System\Drawing\Rectangle.cs (1)
229public readonly bool Contains(Point pt) => Contains(pt.X, pt.Y);
System.Windows.Forms (51)
System\Windows\Forms\Accessibility\AccessibleObject.cs (2)
547if (child is not null && child.Bounds.Contains(x, y)) 563return Bounds.Contains(x, y) ? this : null;
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (1)
872if (!r.Contains(mevent.X, mevent.Y))
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (8)
9291if (!_layout.Inside.Contains(x, y)) 9296if (_horizScrollBar is not null && _horizScrollBar.Visible && _horizScrollBar.Bounds.Contains(x, y)) 9302if (_vertScrollBar is not null && _vertScrollBar.Visible && _vertScrollBar.Bounds.Contains(x, y)) 9308if (_layout.TopLeftHeader.Contains(x, y)) 9341if (_layout.ColumnHeaders.Contains(x, y)) 9416if (_layout.RowHeaders.Contains(x, y)) 9482if (_layout.Data.Contains(x, y)) 22032if (_dataGridViewOper[OperationTrackKeyboardColResize] && _resizeClipRectangle.Contains(x, _resizeClipRectangle.Top))
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (1)
558s_mouseInContentBounds = GetContentBounds(e.RowIndex).Contains(e.X, e.Y);
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (3)
2927DataGridView.CellMouseDownInContentBounds = GetContentBounds(e.RowIndex).Contains(e.X, e.Y); 3038if (e.Button == MouseButtons.Left && GetContentBounds(e.RowIndex).Contains(x, y)) 3980if (GetErrorIconBounds(e.RowIndex).Contains(e.X, e.Y))
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (1)
908s_mouseInContentBounds = GetContentBounds(e.RowIndex).Contains(e.X, e.Y);
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (1)
416private bool LinkBoundsContainPoint(int x, int y, int rowIndex) => GetContentBounds(rowIndex).Contains(x, y);
System\Windows\Forms\Controls\Labels\LinkLabel.LinkLabelAccessibleObject.cs (1)
72return Bounds.Contains(x, y) ? this : null;
System\Windows\Forms\Controls\ListBoxes\ListBox.AccessibleObject.cs (2)
261if (child is not null && child.Bounds.Contains(x, y)) 268if (Bounds.Contains(x, y))
System\Windows\Forms\Controls\ListView\ListView.cs (1)
3705if (!ClientRectangle.Contains(x, y))
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.MonthCalendarAccessibleObject.cs (3)
175&& firstCalendar.Bounds.Contains(innerX, innerY) 180&& lastCalendar.Bounds.Contains(innerX, innerY) 226if (calendar.Bounds.Contains(x, y))
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (1)
2003if (outlineRect.Contains(x, y))
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyDescriptorGridEntry.cs (2)
320if (_uiItemRects[i].Contains(mouseX, OwnerGridView.GridEntryHeight / 2)) 489if (_uiItemRects[i].Contains(x, OwnerGridView.GridEntryHeight / 2))
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (2)
367if (!_resizeUp && bottomGrip.Contains(x, y)) 371else if (_resizeUp && topGrip.Contains(x, y))
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (2)
4344bool verticallyContained = clientBounds.Contains(clientBounds.X, item.Bounds.Top) 4345&& clientBounds.Contains(clientBounds.X, item.Bounds.Bottom);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (11)
467if (!displayRect.Contains(displayRect.X, nextItem.Bounds.Top) 468|| !displayRect.Contains(displayRect.X, nextItem.Bounds.Bottom)) 483if ((Items[index].Visible && displayRect.Contains(displayRect.X, Items[index].Bounds.Top - delta)) 496if (displayRect.Contains(displayRect.X, Items[index].Bounds.Bottom - delta)) 665if (displayRectangle.Contains(displayRectangle.X, adjustedLastItemBounds.Top) 666&& displayRectangle.Contains(displayRectangle.X, adjustedLastItemBounds.Bottom)) 692if (displayRectangle.Contains(displayRectangle.X, adjustedLastItemBounds.Top) 693&& displayRectangle.Contains(displayRectangle.X, adjustedLastItemBounds.Bottom)) 834if (_indexOfFirstDisplayedItem == -1 && displayRectangle.Contains(displayRectangle.X, item.Bounds.Top)) 843UpScrollButton.Enabled = !displayRectangle.Contains(displayRectangle.X, minY); 844DownScrollButton.Enabled = !displayRectangle.Contains(displayRectangle.X, maxY);
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackLayout.cs (2)
321if (!clientRectangle.Contains(x, y)) 454if (!clientRectangle.Contains(x, y))
System\Windows\Forms\Controls\TreeView\TreeView.TreeViewAccessibleObject.cs (1)
72return Bounds.Contains(x, y) ? this : null;
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.cs (3)
154if (rect.Contains(e.X, e.Y)) 189if (rectUp.Contains(e.X, e.Y)) 194else if (rectDown.Contains(e.X, e.Y))
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.UpDownButtonsAccessibleObject.cs (2)
62if (UpButton.Bounds.Contains(x, y)) 67if (DownButton.Bounds.Contains(x, y))
System\Windows\Forms\ErrorProvider\ErrorProvider.ErrorWindow.ErrorWindowAccessibleObject.cs (1)
70if (control.AccessibilityObject.Bounds.Contains(x, y))
System.Windows.Forms.Design (6)
System\Drawing\Design\ColorEditor.ColorPalette.cs (1)
322if (me.Button == MouseButtons.Left && Bounds.Contains(me.X, me.Y))
System\Windows\Forms\Design\DesignerFrame.cs (1)
550if (cao.Bounds.Contains(x, y))
System\Windows\Forms\Design\TabOrder.cs (2)
326if (screenRectangle.Contains(x, y)) 616if (_tabGlyphs[i].Contains(e.X, e.Y))
System\Windows\Forms\Design\ToolStripItemBehavior.cs (1)
572if (dragBox != Rectangle.Empty && !dragBox.Contains(mouseLoc.X, mouseLoc.Y))
System\Windows\Forms\Design\ToolStripItemDesigner.cs (1)
579if (parentBounds.Contains(r.Left, r.Top))
System.Windows.Forms.UI.IntegrationTests (1)
DragDropTests.cs (1)
746!_dragBoxFromMouseDown.Contains(e.X, e.Y))