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