Implemented interface member:
property
ActiveControl
System.Windows.Forms.IContainerControl.ActiveControl
25 writes to ActiveControl
System.Windows.Forms (5)
System\Windows\Forms\ActiveX\AxHost.AxContainer.cs (2)
454
_parent.
ActiveControl
= null;
505
container.
ActiveControl
= site;
System\Windows\Forms\ActiveX\AxHost.cs (2)
1491
containingControl.
ActiveControl
= null;
1631
container.
ActiveControl
= control;
System\Windows\Forms\Form.cs (1)
5068
form.
ActiveControl
= this;
System.Windows.Forms.Design (7)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (1)
966
ActiveControl
= _listBox;
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (2)
127
ActiveControl
= _selectedColumns;
816
ActiveControl
= _selectedColumns;
System\Windows\Forms\Design\DataGridViewColumnTypeEditor.Picker.cs (1)
35
ActiveControl
= _typesListBox;
System\Windows\Forms\Design\DesignBindingPicker.cs (1)
345
ActiveControl
= _treeViewCtrl;
System\Windows\Forms\Design\LinkAreaEditor.LinkAreaUI.cs (1)
133
ActiveControl
= _sampleEdit;
System\Windows\Forms\Design\StyleEditorForm.cs (1)
95
ActiveControl
= _columnsAndRowsListView;
System.Windows.Forms.Tests (12)
System\Windows\Forms\ContainerControlTests.cs (8)
155
control.
ActiveControl
= child;
159
control.
ActiveControl
= child;
163
control.
ActiveControl
= grandchild;
167
control.
ActiveControl
= null;
175
Assert.Throws<ArgumentException>("value", () => control.
ActiveControl
= control);
176
Assert.Throws<ArgumentException>("value", () => control.
ActiveControl
= new Control());
615
control.
ActiveControl
= child;
1289
control.
ActiveControl
= child2;
System\Windows\Forms\ControlTests.ControlCollection.cs (1)
1983
owner.
ActiveControl
= child1;
System\Windows\Forms\ControlTests.Methods.cs (2)
14292
parent.
ActiveControl
= control;
14293
grandparent.
ActiveControl
= parent;
System\Windows\Forms\UserControlTests.cs (1)
1755
control.
ActiveControl
= child2;
WindowsFormsIntegration (1)
System\Windows\Integration\WindowsFormsHost.cs (1)
782
this.
ActiveControl
= _focusTarget;
83 references to ActiveControl
System.Windows.Forms (40)
System\Windows\Forms\ActiveX\AxHost.cs (3)
1489
if (containingControl.
ActiveControl
== this)
1616
Control? control = container?.
ActiveControl
;
1629
if (container is not null && container.
ActiveControl
!= control)
System\Windows\Forms\Control.cs (1)
1395
while (container.
ActiveControl
is null)
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (2)
1058
if (dataGridView.GetContainerControl() is ContainerControl cc && (dataGridView.EditingControl == cc.
ActiveControl
|| dataGridView.EditingControl.Contains(cc.
ActiveControl
)))
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (1)
950
if (
ActiveControl
is null)
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (2)
406
if (_containingControl is not null && _containingControl.
ActiveControl
!= this)
965
if (containingControl is not null && containingControl.
ActiveControl
== this)
System\Windows\Forms\Form.cs (12)
245
return parentForm.
ActiveControl
== this && parentForm.Active;
268
if (
ActiveControl
is null)
2156
if (
ActiveControl
is null)
3235
if (Focused &&
ActiveControl
is null)
4082
Control? activeControl =
ActiveControl
;
4125
if (Focused && IsAccessibilityObjectCreated &&
ActiveControl
is null)
4777
if (SelectNextControl(
ActiveControl
, forward, true, true, true))
5984
while (containerControl.
ActiveControl
is ContainerControl)
5986
containerControl = containerControl.
ActiveControl
as ContainerControl;
5999
if (containerControl.
ActiveControl
is IButtonControl control)
6857
if (
ActiveControl
is not null && !
ActiveControl
.ContainsFocus)
System\Windows\Forms\Layout\Containers\ContainerControl.cs (7)
407
updateContainerActiveControl = (containerControl.
ActiveControl
!= this);
493
if (cc is not null && cc.
ActiveControl
== this)
788
if (
ActiveControl
is null)
1257
Control? start =
ActiveControl
;
1507
while (result.
ActiveControl
is ContainerControl control)
2003
if (
ActiveControl
is not null)
2008
if (!
ActiveControl
.Visible)
System\Windows\Forms\Layout\Containers\SplitContainer.cs (4)
1538
if (
ActiveControl
is not null)
1540
group =
ActiveControl
.ParentInternal;
1543
return group?.SelectNextControl(
ActiveControl
, forward, false, false, true) ?? false;
2353
if (SelectNextControlInPanel(
ActiveControl
, forward, true, true, true))
System\Windows\Forms\MDI\MdiWindowListStrip.cs (6)
172
if (dialog.ActiveChildForm?.
ActiveControl
is not null && !dialog.ActiveChildForm.
ActiveControl
.Focused)
174
dialog.ActiveChildForm.
ActiveControl
.Focus();
190
if (boundForm.
ActiveControl
is not null && !boundForm.
ActiveControl
.Focused)
192
boundForm.
ActiveControl
.Focus();
System\Windows\Forms\Printing\PrintPreviewDialog.cs (1)
1045
if (
ActiveControl
== _previewControl)
System\Windows\Forms\UserControl.cs (1)
306
if (
ActiveControl
is null)
System.Windows.Forms.Design (2)
System\ComponentModel\Design\DesignerActionPanel.cs (2)
170
private Line? FocusedLine =>
ActiveControl
?.Tag as Line;
546
return (SelectNextControl(
ActiveControl
, forward, true, true, true));
System.Windows.Forms.Tests (35)
System\Windows\Forms\AccessibleObjects\Form.FormAccessibleObjectTests.cs (2)
139
Assert.Null(form.
ActiveControl
);
160
Assert.NotNull(form.
ActiveControl
);
System\Windows\Forms\ContainerControlTests.cs (8)
22
Assert.Null(control.
ActiveControl
);
156
Assert.Same(child, control.
ActiveControl
);
160
Assert.Same(child, control.
ActiveControl
);
164
Assert.Same(grandchild, control.
ActiveControl
);
168
Assert.Null(control.
ActiveControl
);
618
Assert.Null(control.
ActiveControl
);
1274
Assert.Null(control.
ActiveControl
);
1305
Assert.Same(child2, control.
ActiveControl
);
System\Windows\Forms\ControlTests.ControlCollection.cs (4)
1984
Assert.Same(child1, owner.
ActiveControl
);
2005
Assert.Null(owner.
ActiveControl
);
2016
Assert.Null(owner.
ActiveControl
);
2027
Assert.Null(owner.
ActiveControl
);
System\Windows\Forms\ControlTests.Methods.cs (12)
14089
Assert.Null(parent.
ActiveControl
);
14113
Assert.Same(control, parent.
ActiveControl
);
14204
Assert.Null(parent.
ActiveControl
);
14205
Assert.Null(grandparent.
ActiveControl
);
14229
Assert.Same(control, parent.
ActiveControl
);
14230
Assert.Same(parent, grandparent.
ActiveControl
);
14249
Assert.Null(parent.
ActiveControl
);
14273
Assert.Same(control, parent.
ActiveControl
);
14317
Assert.Same(control, parent.
ActiveControl
);
14318
Assert.Same(parent, grandparent.
ActiveControl
);
14337
Assert.Null(parent.
ActiveControl
);
14361
Assert.Same(control, parent.
ActiveControl
);
System\Windows\Forms\Design\ComponentEditorFormTests.cs (1)
23
Assert.Null(control.
ActiveControl
);
System\Windows\Forms\DomainUpDownTests.cs (1)
32
_sub.
ActiveControl
.Should().BeNull();
System\Windows\Forms\FormTests.cs (1)
21
Assert.Null(control.
ActiveControl
);
System\Windows\Forms\PropertyGridTests.cs (1)
27
Assert.NotNull(control.
ActiveControl
);
System\Windows\Forms\ToolStripPanelTests.cs (1)
20
Assert.Null(control.
ActiveControl
);
System\Windows\Forms\UpDownBaseTests.cs (1)
18
Assert.Null(control.
ActiveControl
);
System\Windows\Forms\UserControlTests.cs (3)
23
Assert.Null(control.
ActiveControl
);
1740
Assert.Same(child1, control.
ActiveControl
);
1771
Assert.Same(child2, control.
ActiveControl
);
WindowsFormsIntegration (6)
System\Windows\Integration\WindowsFormsHost.cs (6)
903
while (ret.
ActiveControl
is ContainerControl)
905
ret = (ContainerControl)ret.
ActiveControl
;
944
&& (this.
ActiveControl
!= null && this.
ActiveControl
.Parent == this))
946
SWF.Control c = this.
ActiveControl
.Parent;
947
return c.SelectNextControl(this.
ActiveControl
, keyCode == Keys.Right || keyCode == Keys.Down, false, false, false);