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