91 references to ContainsFocus
System.Windows.Forms (31)
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (1)
896if (!_control.ContainsFocus)
System\Windows\Forms\Control.cs (2)
9113bool focused = ContainsFocus; 9903if (ContainsFocus && ParentInternal is not null)
System\Windows\Forms\Control.Ime.cs (2)
184else if (ContainsFocus) 639if ((appForm is null || appForm.Modal) && !topMostWinformsParent.ContainsFocus)
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (1)
718if ((!ContainsFocus || !Application.RenderWithVisualStyles) && FlatStyle == FlatStyle.Popup)
System\Windows\Forms\Controls\ComboBox\ComboBox.FlatComboAdapter.cs (1)
84bool focused = comboBox.ContainsFocus || comboBox.MouseIsOver;
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (2)
45if (ContainsFocus) 14988if (EditingControl is not null && EditingControl.ContainsFocus)
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (2)
1056if (dataGridView.EditingControl.ContainsFocus) 2477Debug.Assert(!dgv.EditingPanel.ContainsFocus);
System\Windows\Forms\Controls\Labels\Label.cs (1)
1367if (parent.SelectNextControl(this, true, false, true, false) && !parent.ContainsFocus)
System\Windows\Forms\Controls\Menus\MenuStrip.cs (2)
202if (!(Focused || ContainsFocus)) 234if (Focused || !ContainsFocus)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (1)
348public bool FocusInside => ContainsFocus || DropDownVisible;
System\Windows\Forms\Controls\TabControl\TabControl.cs (1)
1845if (!ContainsFocus)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (8)
436return !ContainsFocus; 779return (ContainsFocus || (ToolStripManager.ModalMenuFilter.InMenuMode && ToolStripManager.ModalMenuFilter.GetActiveToolStrip() == this)); 1740if (ContainsFocus && !Focused) 2767if (!ContainsFocus) 2845if (Focused || ContainsFocus) 3979if (!DesignMode && !TabStop && (Focused || ContainsFocus)) 3988if (KeyboardActive && !Focused && !ContainsFocus) 4414else if (!ContainsFocus && !Focused)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.RestoreFocusMessageFilter.cs (1)
34if (_ownerToolStrip.ContainsFocus)
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.ToolStripComboBoxControl.ToolStripComboBoxFlatComboAdapter.cs (2)
87bool focused = comboBox.ContainsFocus || comboBox.MouseIsOver; 132&& (comboBox.ContainsFocus || comboBox.MouseIsOver)
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.ModalMenuFilter.cs (1)
640if (!activeToolStrip.ContainsFocus)
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (1)
500if (!ContainsFocus)
System\Windows\Forms\Form.cs (1)
6857if (ActiveControl is not null && !ActiveControl.ContainsFocus)
System\Windows\Forms\Layout\Containers\ContainerControl.cs (1)
1494if (ancestor.ContainsFocus
System.Windows.Forms.Design (2)
System\ComponentModel\Design\CollectionEditor.FilterListBox.cs (2)
66if (PropertyGrid.Focused || PropertyGrid.ContainsFocus) 94if (PropertyGrid.Focused || PropertyGrid.ContainsFocus)
System.Windows.Forms.Design.Tests (1)
System\ComponentModel\Design\ByteViewerTests.cs (1)
51Assert.False(control.ContainsFocus);
System.Windows.Forms.Tests (54)
System\Windows\Forms\AxHostTests.cs (2)
53Assert.False(control.ContainsFocus); 147Assert.False(control.ContainsFocus);
System\Windows\Forms\ButtonBaseTests.cs (1)
44Assert.False(control.ContainsFocus);
System\Windows\Forms\ButtonTests.cs (1)
46Assert.False(control.ContainsFocus);
System\Windows\Forms\CheckBoxTests.cs (1)
48Assert.False(control.ContainsFocus);
System\Windows\Forms\ComboBoxTests.cs (1)
49Assert.False(control.ContainsFocus);
System\Windows\Forms\ContainerControlTests.cs (1)
51Assert.False(control.ContainsFocus);
System\Windows\Forms\ControlTests.cs (5)
39Assert.False(control.ContainsFocus); 128Assert.False(control.ContainsFocus); 224Assert.False(control.ContainsFocus); 320Assert.False(control.ContainsFocus); 416Assert.False(control.ContainsFocus);
System\Windows\Forms\DataGridViewTextBoxEditingControlTests.cs (1)
50Assert.False(control.ContainsFocus);
System\Windows\Forms\DateTimePickerTests.cs (1)
53Assert.False(control.ContainsFocus);
System\Windows\Forms\Design\ComponentEditorFormTests.cs (1)
59Assert.False(control.ContainsFocus);
System\Windows\Forms\Design\ComponentEditorPageTests.cs (1)
48Assert.False(control.ContainsFocus);
System\Windows\Forms\DomainUpDownTests.cs (1)
71_sub.ContainsFocus.Should().BeFalse();
System\Windows\Forms\FlowLayoutPanelTests.cs (1)
46Assert.False(control.ContainsFocus);
System\Windows\Forms\FormTests.cs (1)
58Assert.False(control.ContainsFocus);
System\Windows\Forms\GroupBoxTests.cs (1)
42Assert.False(control.ContainsFocus);
System\Windows\Forms\HScrollBarTests.cs (1)
46Assert.False(control.ContainsFocus);
System\Windows\Forms\LabelTests.cs (1)
42Assert.False(control.ContainsFocus);
System\Windows\Forms\ListBoxTests.cs (1)
44Assert.False(control.ContainsFocus);
System\Windows\Forms\ListControlTests.cs (1)
43Assert.False(control.ContainsFocus);
System\Windows\Forms\ListViewTests.cs (1)
57Assert.False(control.ContainsFocus);
System\Windows\Forms\MdiClientTests.cs (1)
39Assert.False(control.ContainsFocus);
System\Windows\Forms\MenuStripTests.cs (1)
46Assert.False(control.ContainsFocus);
System\Windows\Forms\MonthCalendarTests.cs (1)
55Assert.False(control.ContainsFocus);
System\Windows\Forms\PanelTests.cs (1)
46Assert.False(control.ContainsFocus);
System\Windows\Forms\PictureBoxTests.cs (1)
45Assert.False(control.ContainsFocus);
System\Windows\Forms\ProgressBarTests.cs (1)
41Assert.False(control.ContainsFocus);
System\Windows\Forms\PropertyGridTests.cs (1)
70Assert.False(control.ContainsFocus);
System\Windows\Forms\RadioButtonTests.cs (1)
47Assert.False(control.ContainsFocus);
System\Windows\Forms\RichTextBoxTests.cs (1)
56Assert.False(control.ContainsFocus);
System\Windows\Forms\ScrollableControlTests.cs (1)
45Assert.False(control.ContainsFocus);
System\Windows\Forms\ScrollBarTests.cs (1)
40Assert.False(control.ContainsFocus);
System\Windows\Forms\SplitterPanelTests.cs (1)
50Assert.False(control.ContainsFocus);
System\Windows\Forms\SplitterTests.cs (1)
41Assert.False(control.ContainsFocus);
System\Windows\Forms\StatusStripTests.cs (1)
46Assert.False(control.ContainsFocus);
System\Windows\Forms\TabControlTests.cs (1)
43Assert.False(control.ContainsFocus);
System\Windows\Forms\TableLayoutPanelTests.cs (1)
51Assert.False(control.ContainsFocus);
System\Windows\Forms\TabPageTests.cs (2)
50Assert.False(control.ContainsFocus); 159Assert.False(control.ContainsFocus);
System\Windows\Forms\ToolStripContentPanelTests.cs (1)
48Assert.False(control.ContainsFocus);
System\Windows\Forms\ToolStripDropDownTests.cs (1)
50Assert.False(control.ContainsFocus);
System\Windows\Forms\ToolStripPanelTests.cs (1)
47Assert.False(control.ContainsFocus);
System\Windows\Forms\ToolStripTests.cs (2)
50Assert.False(control.ContainsFocus); 209Assert.False(control.ContainsFocus);
System\Windows\Forms\TreeViewTests.cs (1)
43Assert.False(control.ContainsFocus);
System\Windows\Forms\UpDownBaseTests.cs (1)
58Assert.False(control.ContainsFocus);
System\Windows\Forms\UserControlTests.cs (1)
51Assert.False(control.ContainsFocus);
System\Windows\Forms\VScrollBarTests.cs (1)
45Assert.False(control.ContainsFocus);
TextBoxTests.cs (1)
49Assert.False(control.ContainsFocus);
TrackBarTests.cs (1)
42Assert.False(control.ContainsFocus);
WindowsFormsIntegration (2)
System\Windows\Integration\WindowsFormsHost.cs (2)
907if (!ret.ContainsFocus) 938if (this.Focused || this.ContainsFocus)
WinFormsControlsTest (1)
DataGridViewInVirtualModeTest.cs (1)
144else if (dataGridView1.ContainsFocus)