92 references to Contains
System.Windows.Forms (64)
System\Windows\Forms\Control.cs (2)
2217
private protected virtual bool IsHoveredWithMouse() => ClientRectangle.
Contains
(PointToClient(MousePosition));
11120
if (ClientRectangle.
Contains
(client))
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (4)
1655
if (clientRect.
Contains
(PointToScreen(PARAM.ToPoint(m.LParamInternal))))
1789
if (IsAccessibilityObjectCreated && _childEdit is not null && ChildEditAccessibleObject.Bounds.
Contains
(PointToScreen(e.Location)))
1803
if (!rectangle.
Contains
(p))
3710
if (captured && clientRect.
Contains
(point))
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (5)
2177
return EditingControl.Bounds.
Contains
(ptMouse);
2191
return _editingPanel.Bounds.
Contains
(ptMouse);
2205
if (_vertScrollBar.Bounds.
Contains
(ptMouse))
2213
return _horizScrollBar.Bounds.
Contains
(ptMouse);
3852
activate &= ClientRectangle.
Contains
(PointToClient(mouseCoord));
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (4)
6024
if (!ClientRectangle.
Contains
(ptMouse))
16161
bool mouseOverToolTipControl = _toolTipControl.Activated && ClientRectangle.
Contains
(PointToClient(MousePosition));
26004
if (!ClientRectangle.
Contains
(ptMouse))
30014
if (contextMenuStrip is not null && ClientRectangle.
Contains
(client))
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (1)
1795
bool newMouseInDropDownButtonBounds = dropDownButtonRect.
Contains
(DataGridView.PointToClient(Control.MousePosition));
System\Windows\Forms\Controls\Labels\Label.cs (1)
1437
m.ResultInternal = (LRESULT)(nint)(rectInScreen.
Contains
(pt) ? PInvoke.HTCLIENT : PInvoke.HTNOWHERE);
System\Windows\Forms\Controls\ListView\ListView.ListViewAccessibleObject.cs (2)
299
if (visibleGroups[i].AccessibilityObject.Bounds.
Contains
(hitTestPoint))
330
if (itemDetailsAccessibleObject.GetSubItemBounds(i).
Contains
(point))
System\Windows\Forms\Controls\ListView\ListViewItem.IKeyboardToolTip.cs (1)
70
bool IKeyboardToolTip.IsHoveredWithMouse() => _listView?.AccessibilityObject.Bounds.
Contains
(Control.MousePosition) ?? false;
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemDetailsAccessibleObject.cs (1)
66
imageAccessibleObject.GetImageRectangle().
Contains
(point)
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemWithImageAccessibleObject.cs (1)
41
return HasImage && ImageAccessibleObject.GetImageRectangle().
Contains
(point)
System\Windows\Forms\Controls\TabControl\TabControl.TabControlAccessibleObject.cs (2)
92
&& owner.SelectedTab.AccessibilityObject.Bounds.
Contains
(point))
99
if (tabPage.TabAccessibilityObject.Bounds.
Contains
(point))
System\Windows\Forms\Controls\TabControl\TabPage.cs (2)
198
if (tabControl.RectangleToScreen(tabControl.GetTabRect(i)).
Contains
(MousePosition))
208
return selectedTab.AccessibilityObject.Bounds.
Contains
(MousePosition);
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (1)
2052
if (ClientRectangle.
Contains
(client))
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (2)
566
if (sizeGripBounds.
Contains
(PointToClient(PARAM.ToPoint(m.LParamInternal))))
632
if (ClientRectangle.
Contains
(PointToClient(PARAM.ToPoint(m.LParamInternal))))
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (2)
1210
if (!ClientRectangle.
Contains
(mea.Location))
1215
if (OwnerItem.Bounds.
Contains
(WindowsFormsUtils.TranslatePoint(mea.Location, this, OwnerToolStrip)))
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (1)
3588
=> ((IKeyboardToolTip)this).GetNativeScreenRectangle().
Contains
(Control.MousePosition);
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (1)
596
toolStripPanel.DragBounds.
Contains
(toolStripPanel.PointToClient(screenLocation)))
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.ModalMenuFilter.cs (2)
335
if (!activeToolStrip.ClientRectangle.
Contains
(translatedLocation))
342
&& activeToolStripDropDown.OwnerDropDownItem.DropDownButtonArea.
Contains
(location)))
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.cs (7)
631
if (row.Bounds.
Contains
(controlArray[i].Location))
779
if (!DragBounds.
Contains
(clientLocation))
795
if (draggedControl.IsCurrentlyDragging && !DragBounds.
Contains
(clientLocation))
812
if (ClientRectangle.
Contains
(currentCursorLoc))
835
pointInCurrentRow = currentToolStripPanelRow.DragBounds.
Contains
(clientLocation);
840
pointInCurrentRow = currentToolStripPanelRow.Bounds.
Contains
(clientLocation);
1034
if (bounds.
Contains
(clientLocation))
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.HorizontalRowManager.cs (2)
146
if (DragBounds.
Contains
(clientEndLocation))
413
if (Row.Cells[index].Bounds.
Contains
(locationToDrag))
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.VerticalRowManager.cs (2)
148
if (DragBounds.
Contains
(clientEndLocation))
419
if (cell.Bounds.
Contains
(locationToDrag))
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (1)
1390
if (!displayRect.
Contains
(gradientCopyPixel))
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.cs (3)
421
if (DropDownButtonBounds.
Contains
(e.Location))
448
if (DropDownButtonBounds.
Contains
(e.Location))
467
if ((e.Button == MouseButtons.Left) && SplitButtonButton.Bounds.
Contains
(clickPoint))
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackDragDropHandler.cs (1)
176
if (bounds.
Contains
(ownerClientAreaRelativeDropPoint))
System\Windows\Forms\Controls\TrackBar\TrackBar.TrackBarAccessibleObject.cs (3)
108
if (ThumbAccessibleObject?.Bounds.
Contains
(point) ?? false)
113
if ((FirstButtonAccessibleObject?.IsDisplayed ?? false) && FirstButtonAccessibleObject.Bounds.
Contains
(point))
118
if ((LastButtonAccessibleObject?.IsDisplayed ?? false) && LastButtonAccessibleObject.Bounds.
Contains
(point))
System\Windows\Forms\Controls\TreeView\TreeNode.IKeyboardToolTip.cs (1)
45
bool IKeyboardToolTip.IsHoveredWithMouse() => TreeView?.AccessibilityObject.Bounds.
Contains
(Control.MousePosition) ?? false;
System\Windows\Forms\Controls\TreeView\TreeView.cs (1)
3433
if (ClientRectangle.
Contains
(client) && treeNode.ContextMenuStrip is not null)
System\Windows\Forms\Controls\WebBrowser\WebBrowser.cs (1)
1363
if (ClientRectangle.
Contains
(client))
System\Windows\Forms\Layout\Containers\SplitContainer.cs (2)
1068
if (Cursor == DefaultCursor && SplitterRectangle.
Contains
(e.Location))
1135
if (IsSplitterMovable && SplitterRectangle.
Contains
(e.Location))
System\Windows\Forms\Scrolling\ScrollBar.ScrollBarAccessibleObject.cs (5)
93
if (ThumbAccessibleObject?.Bounds.
Contains
(point) == true)
98
if (FirstLineButtonAccessibleObject?.Bounds.
Contains
(point) == true)
103
if (FirstPageButtonAccessibleObject?.Bounds.
Contains
(point) == true)
108
if (LastPageButtonAccessibleObject?.Bounds.
Contains
(point) == true)
113
if (LastLineButtonAccessibleObject?.Bounds.
Contains
(point) == true)
System.Windows.Forms.Design (28)
System\ComponentModel\Design\CollectionEditor.SplitButton.cs (4)
130
if (_dropDownRectangle.
Contains
(e.Location))
179
if (Parent is not null && Bounds.
Contains
(Parent.PointToClient(Cursor.Position)) && !_dropDownRectangle.
Contains
(mevent.Location))
282
if (Parent is not null && Bounds.
Contains
(Parent.PointToClient(Cursor.Position)))
System\ComponentModel\Design\DesignerActionUI.cs (1)
616
if ((new Rectangle(glyphCoord, new Size(currentGlyph.Bounds.Width, currentGlyph.Bounds.Height))).
Contains
(point))
System\Windows\Forms\Design\Behavior\ContainerSelectorGlyph.cs (1)
40
=> _glyphBounds.
Contains
(p) || _relatedBehavior?.OkToMove == true ? Cursors.SizeAll : null;
System\Windows\Forms\Design\Behavior\ControlBodyGlyph.cs (1)
58
if (isVisible && _bounds.
Contains
(p))
System\Windows\Forms\Design\Behavior\DesignerActionGlyph.cs (1)
89
if (_bounds.
Contains
(p))
System\Windows\Forms\Design\Behavior\SelectionGlyphBase.cs (1)
39
if (hitBounds.
Contains
(p))
System\Windows\Forms\Design\Behavior\TableLayoutPanelResizeGlyph.cs (1)
50
if (_bounds.
Contains
(p))
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionGlyph.cs (1)
213
return _glyphBounds != Rectangle.Empty && baseParentBounds.Contains(_glyphBounds) && _glyphBounds.
Contains
(p) ? Cursors.Hand : null;
System\Windows\Forms\Design\ControlDesigner.TransparentBehavior.cs (1)
71
if (e is not null && _controlRect != Rectangle.Empty && !_controlRect.
Contains
(new Point(e.X, e.Y)))
System\Windows\Forms\Design\DesignBindingPicker.cs (1)
1758
if (node is not null && !node.Bounds.
Contains
(pt))
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (1)
817
if (_childInfo[i].MarginBounds.
Contains
(mouseLocation))
System\Windows\Forms\Design\OleDragDropHandler.cs (1)
971
if (!Destination.GetDesignerControl().ClientRectangle.
Contains
(convertedPoint))
System\Windows\Forms\Design\SelectionUIService.ContainerSelectionUIItem.cs (1)
38
if (rect.
Contains
(point))
System\Windows\Forms\Design\TabControlDesigner.cs (2)
181
return !tc.DisplayRectangle.
Contains
(hitTest);
574
if (!tc.DisplayRectangle.
Contains
(dropPoint))
System\Windows\Forms\Design\ToolStripDesigner.cs (2)
1393
if (_miniToolStrip is not null && _miniToolStrip.Visible && AddItemRect.
Contains
(point))
1398
if (OverFlowButtonRect.
Contains
(point))
System\Windows\Forms\Design\ToolStripItemDesigner.cs (1)
1321
if (itemBounds.
Contains
(newPoint))
System\Windows\Forms\Design\ToolStripItemGlyph.cs (1)
31
if (Item.Visible && Bounds.
Contains
(p))
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (2)
1391
if (bounds.
Contains
(ownerClientAreaRelativeDropPoint))
2613
if (_bounds.
Contains
(p))
System\Windows\Forms\Design\ToolStripTemplateNode.cs (4)
485
if (_hotRegion.
Contains
(e.Location) && !KeyboardService.TemplateNodeActive)
613
if (_hotRegion.
Contains
(e.Location))
1187
if (_addItemButton.ButtonBounds.
Contains
(e.Location))
1191
else if (_addItemButton.DropDownButtonBounds.
Contains
(e.Location))