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; 505container.ActiveControl = site;
System\Windows\Forms\ActiveX\AxHost.cs (2)
1475containingControl.ActiveControl = null; 1615container.ActiveControl = control;
System\Windows\Forms\Form.cs (1)
5068form.ActiveControl = this;
System.Windows.Forms.Design (7)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (1)
966ActiveControl = _listBox;
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (2)
127ActiveControl = _selectedColumns; 814ActiveControl = _selectedColumns;
System\Windows\Forms\Design\DataGridViewColumnTypeEditor.Picker.cs (1)
35ActiveControl = _typesListBox;
System\Windows\Forms\Design\DesignBindingPicker.cs (1)
345ActiveControl = _treeViewCtrl;
System\Windows\Forms\Design\LinkAreaEditor.LinkAreaUI.cs (1)
133ActiveControl = _sampleEdit;
System\Windows\Forms\Design\StyleEditorForm.cs (1)
95ActiveControl = _columnsAndRowsListView;
System.Windows.Forms.Tests (12)
System\Windows\Forms\ContainerControlTests.cs (8)
155control.ActiveControl = child; 159control.ActiveControl = child; 163control.ActiveControl = grandchild; 167control.ActiveControl = null; 175Assert.Throws<ArgumentException>("value", () => control.ActiveControl = control); 176Assert.Throws<ArgumentException>("value", () => control.ActiveControl = new Control()); 615control.ActiveControl = child; 1289control.ActiveControl = child2;
System\Windows\Forms\ControlTests.ControlCollection.cs (1)
1983owner.ActiveControl = child1;
System\Windows\Forms\ControlTests.Methods.cs (2)
14301parent.ActiveControl = control; 14302grandparent.ActiveControl = parent;
System\Windows\Forms\UserControlTests.cs (1)
1755control.ActiveControl = child2;
WindowsFormsIntegration (1)
System\Windows\Integration\WindowsFormsHost.cs (1)
780this.ActiveControl = _focusTarget;
83 references to ActiveControl
System.Windows.Forms (40)
System\Windows\Forms\ActiveX\AxHost.cs (3)
1473if (containingControl.ActiveControl == this) 1600Control? control = container?.ActiveControl; 1613if (container is not null && container.ActiveControl != control)
System\Windows\Forms\Control.cs (1)
1396while (container.ActiveControl is null)
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (2)
1058if (dataGridView.GetContainerControl() is ContainerControl cc && (dataGridView.EditingControl == cc.ActiveControl || dataGridView.EditingControl.Contains(cc.ActiveControl)))
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (1)
950if (ActiveControl is null)
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (2)
406if (_containingControl is not null && _containingControl.ActiveControl != this) 965if (containingControl is not null && containingControl.ActiveControl == this)
System\Windows\Forms\Form.cs (12)
245return parentForm.ActiveControl == this && parentForm.Active; 268if (ActiveControl is null) 2156if (ActiveControl is null) 3235if (Focused && ActiveControl is null) 4082Control? activeControl = ActiveControl; 4125if (Focused && IsAccessibilityObjectCreated && ActiveControl is null) 4777if (SelectNextControl(ActiveControl, forward, true, true, true)) 5984while (containerControl.ActiveControl is ContainerControl) 5986containerControl = containerControl.ActiveControl as ContainerControl; 5999if (containerControl.ActiveControl is IButtonControl control) 6857if (ActiveControl is not null && !ActiveControl.ContainsFocus)
System\Windows\Forms\Layout\Containers\ContainerControl.cs (7)
407updateContainerActiveControl = (containerControl.ActiveControl != this); 493if (cc is not null && cc.ActiveControl == this) 788if (ActiveControl is null) 1257Control? start = ActiveControl; 1507while (result.ActiveControl is ContainerControl control) 2003if (ActiveControl is not null) 2008if (!ActiveControl.Visible)
System\Windows\Forms\Layout\Containers\SplitContainer.cs (4)
1538if (ActiveControl is not null) 1540group = ActiveControl.ParentInternal; 1543return group?.SelectNextControl(ActiveControl, forward, false, false, true) ?? false; 2353if (SelectNextControlInPanel(ActiveControl, forward, true, true, true))
System\Windows\Forms\MDI\MdiWindowListStrip.cs (6)
172if (dialog.ActiveChildForm?.ActiveControl is not null && !dialog.ActiveChildForm.ActiveControl.Focused) 174dialog.ActiveChildForm.ActiveControl.Focus(); 190if (boundForm.ActiveControl is not null && !boundForm.ActiveControl.Focused) 192boundForm.ActiveControl.Focus();
System\Windows\Forms\Printing\PrintPreviewDialog.cs (1)
1045if (ActiveControl == _previewControl)
System\Windows\Forms\UserControl.cs (1)
306if (ActiveControl is null)
System.Windows.Forms.Design (2)
System\ComponentModel\Design\DesignerActionPanel.cs (2)
170private Line? FocusedLine => ActiveControl?.Tag as Line; 546return (SelectNextControl(ActiveControl, forward, true, true, true));
System.Windows.Forms.Tests (35)
System\Windows\Forms\AccessibleObjects\Form.FormAccessibleObjectTests.cs (2)
139Assert.Null(form.ActiveControl); 160Assert.NotNull(form.ActiveControl);
System\Windows\Forms\ContainerControlTests.cs (8)
22Assert.Null(control.ActiveControl); 156Assert.Same(child, control.ActiveControl); 160Assert.Same(child, control.ActiveControl); 164Assert.Same(grandchild, control.ActiveControl); 168Assert.Null(control.ActiveControl); 618Assert.Null(control.ActiveControl); 1274Assert.Null(control.ActiveControl); 1305Assert.Same(child2, control.ActiveControl);
System\Windows\Forms\ControlTests.ControlCollection.cs (4)
1984Assert.Same(child1, owner.ActiveControl); 2005Assert.Null(owner.ActiveControl); 2016Assert.Null(owner.ActiveControl); 2027Assert.Null(owner.ActiveControl);
System\Windows\Forms\ControlTests.Methods.cs (12)
14098Assert.Null(parent.ActiveControl); 14122Assert.Same(control, parent.ActiveControl); 14213Assert.Null(parent.ActiveControl); 14214Assert.Null(grandparent.ActiveControl); 14238Assert.Same(control, parent.ActiveControl); 14239Assert.Same(parent, grandparent.ActiveControl); 14258Assert.Null(parent.ActiveControl); 14282Assert.Same(control, parent.ActiveControl); 14326Assert.Same(control, parent.ActiveControl); 14327Assert.Same(parent, grandparent.ActiveControl); 14346Assert.Null(parent.ActiveControl); 14370Assert.Same(control, parent.ActiveControl);
System\Windows\Forms\Design\ComponentEditorFormTests.cs (1)
23Assert.Null(control.ActiveControl);
System\Windows\Forms\DomainUpDownTests.cs (1)
32_sub.ActiveControl.Should().BeNull();
System\Windows\Forms\FormTests.cs (1)
21Assert.Null(control.ActiveControl);
System\Windows\Forms\PropertyGridTests.cs (1)
27Assert.NotNull(control.ActiveControl);
System\Windows\Forms\ToolStripPanelTests.cs (1)
20Assert.Null(control.ActiveControl);
System\Windows\Forms\UpDownBaseTests.cs (1)
18Assert.Null(control.ActiveControl);
System\Windows\Forms\UserControlTests.cs (3)
23Assert.Null(control.ActiveControl); 1740Assert.Same(child1, control.ActiveControl); 1771Assert.Same(child2, control.ActiveControl);
WindowsFormsIntegration (6)
System\Windows\Integration\WindowsFormsHost.cs (6)
901while (ret.ActiveControl is ContainerControl) 903ret = (ContainerControl)ret.ActiveControl; 942&& (this.ActiveControl != null && this.ActiveControl.Parent == this)) 944SWF.Control c = this.ActiveControl.Parent; 945return c.SelectNextControl(this.ActiveControl, keyCode == Keys.Right || keyCode == Keys.Down, false, false, false);