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