1 write to Controls
System.Windows.Forms.UI.IntegrationTests (1)
PropertyGridTests.cs (1)
22_form = new() { Controls = { _propertyGrid } };
1887 references to Controls
DesignSurface (21)
MainForm.cs (9)
248layoutPanel.Controls.Add(subButton1OfLayoutPanel); 249layoutPanel.Controls.Add(subButton2OfLayoutPanel); 349splitterPanel1.Controls.Add(richTextBox); 350splitterPanel2.Controls.Add(scrollableControl); 352toolStripContainer.ContentPanel.Controls.AddRange(splitContainer); 363panel.Controls.Add(numericUpDown); 377panel.Controls.Add(bindingNavigator); 436splitContainer.Panel2.Controls.Remove(propertyGrid); 450splitContainer.Panel2.Controls.Add(propertyGrid);
MainForm.Designer.cs (10)
73this.splitContainer.Panel1.Controls.Add(this.tabControl1); 77this.splitContainer.Panel2.Controls.Add(this.propertyGrid); 85this.tabControl1.Controls.Add(this.tabPage1); 86this.tabControl1.Controls.Add(this.tabPage2); 87this.tabControl1.Controls.Add(this.tabPage3); 88this.tabControl1.Controls.Add(this.tabPage4); 89this.tabControl1.Controls.Add(this.tabPage5); 90this.tabControl1.Controls.Add(this.tabPage6); 295this.Controls.Add(this.splitContainer); 296this.Controls.Add(this.menuStrip1);
MainForm.MyScrollableControl.cs (1)
12Controls.Add(control);
MainForm.MyUserControl.cs (1)
43Controls.AddRange(textBox2, textBox1, textBox);
Microsoft.AspNetCore.Components.WebView.WindowsForms (1)
BlazorWebView.cs (1)
45 ((BlazorWebViewControlCollection)Controls).AddInternal(_webview);
Microsoft.VisualBasic.Forms (7)
Microsoft\VisualBasic\Helpers\VBInputBox.vb (4)
70Controls.Add(TextBox) 71Controls.Add(Label) 72Controls.Add(OKButton) 73Controls.Add(MyCancelButton)
Microsoft\VisualBasic\MyServices\Internal\ProgressDialog.vb (3)
149Controls.Add(ButtonCloseDialog) 150Controls.Add(ProgressBarWork) 151Controls.Add(LabelInfo)
NativeHost.ManagedControl (1)
ManagedControl.Designer.cs (1)
50this.Controls.Add(this.button1);
PresentationUI (106)
MS\Internal\Documents\Application\DocumentPropertiesDialog.Designer.cs (7)
137this._tabControl.Controls.Add(this._summaryTab); 138this._tabControl.Controls.Add(this._infoTab); 151this._summaryTab.Controls.Add(this.tableLayoutPanel1); 423this._infoTab.Controls.Add(this.tableLayoutPanel2); 523this._documentDetailBox.Controls.Add(this._documentTable); 647this._fileSystemBox.Controls.Add(this._fileTable); 731this.Controls.Add(this.tableLayoutPanel3);
MS\Internal\Documents\CredentialManagerDialog.Designer.cs (5)
77this._buttonFlowLayoutPanel.Controls.Add(this._cancelButton); 78this._buttonFlowLayoutPanel.Controls.Add(this._okButton); 116this._listButtonFlowLayoutPanel.Controls.Add(this._addButton); 117this._listButtonFlowLayoutPanel.Controls.Add(this._removeButton); 166this.Controls.Add(this._mainDialogTableLayoutPanel);
MS\Internal\Documents\DialogBaseForm.cs (1)
97foreach (Control c in control.Controls)
MS\Internal\Documents\RequestedSignatureDialog.Designer.cs (3)
59_buttomControlLayoutpanel.Controls.Add(_cancelButton); 60_buttomControlLayoutpanel.Controls.Add(_addButton); 221Controls.Add(_mainDialogTableLayoutPanel);
MS\Internal\Documents\RMEnrollmentPage1.Designer.cs (14)
64_panel1.Controls.Add(_flowLayoutPanel2); 65_panel1.Controls.Add(_flowLayoutPanel1); 75_flowLayoutPanel2.Controls.Add(_flowLayoutPanel3); 86_flowLayoutPanel3.Controls.Add(_flowLayoutPanel4); 87_flowLayoutPanel3.Controls.Add(_panel2); 96_flowLayoutPanel4.Controls.Add(_label1); 97_flowLayoutPanel4.Controls.Add(_label2); 98_flowLayoutPanel4.Controls.Add(_label3); 99_flowLayoutPanel4.Controls.Add(_privacyLabel); 100_flowLayoutPanel4.Controls.Add(_instructionlabel); 159_panel2.Controls.Add(_pictureBox); 177_flowLayoutPanel1.Controls.Add(_nextButton); 178_flowLayoutPanel1.Controls.Add(_cancelButton); 209Controls.Add(_panel1);
MS\Internal\Documents\RMEnrollmentPage2.Designer.cs (9)
63this._flowLayoutPanel1.Controls.Add(this._nextButton); 64this._flowLayoutPanel1.Controls.Add(this._cancelButton); 94this._flowLayoutPanel2.Controls.Add(this._label1); 95this._flowLayoutPanel2.Controls.Add(this._flowLayoutPanel3); 96this._flowLayoutPanel2.Controls.Add(this._tableLayoutPanel1); 117this._flowLayoutPanel3.Controls.Add(this._pictureBox1); 118this._flowLayoutPanel3.Controls.Add(this._label2); 214this.Controls.Add(this._flowLayoutPanel2); 215this.Controls.Add(this._flowLayoutPanel1);
MS\Internal\Documents\RMEnrollmentPage3.Designer.cs (2)
66this.flowLayoutPanel2.Controls.Add(this.label2); 125this.Controls.Add(this.tableLayoutPanel1);
MS\Internal\Documents\RMPermissions.cs (1)
189permissionsFlowPanel.Controls.Add(permissionLabel);
MS\Internal\Documents\RMPermissions.Designer.cs (15)
61this.mainContentFlowPanel.Controls.Add(this.authenticatedAsFlowPanel); 62this.mainContentFlowPanel.Controls.Add(this.permissionsFlowPanel); 63this.mainContentFlowPanel.Controls.Add(this.contactFlowPanel); 64this.mainContentFlowPanel.Controls.Add(this.expirationFlowPanel); 65this.mainContentFlowPanel.Controls.Add(this.divider); 66this.mainContentFlowPanel.Controls.Add(this.actionsFlowPanel); 75this.authenticatedAsFlowPanel.Controls.Add(this.authenticatedAsTextLabel); 76this.authenticatedAsFlowPanel.Controls.Add(this.authenticatedAsLabel); 95this.permissionsFlowPanel.Controls.Add(this.permissionsHeldLabel); 108this.contactFlowPanel.Controls.Add(this.requestFromTextLabel); 109this.contactFlowPanel.Controls.Add(this.requestFromLabel); 129this.expirationFlowPanel.Controls.Add(this.expiresOnTextLabel); 130this.expirationFlowPanel.Controls.Add(this.expiresOnLabel); 147this.actionsFlowPanel.Controls.Add(this.closeButton); 188this.Controls.Add(this.mainContentFlowPanel);
MS\Internal\Documents\RMPublishingDialog.Designer.cs (28)
78this.flowLayoutPanelMain.Controls.Add(this.radioButtonUnrestricted); 79this.flowLayoutPanelMain.Controls.Add(this.radioButtonPermissions); 80this.flowLayoutPanelMain.Controls.Add(this.radioButtonTemplate); 81this.flowLayoutPanelMain.Controls.Add(this.groupBoxMainContent); 82this.flowLayoutPanelMain.Controls.Add(this.flowLayoutPanelActions); 119this.groupBoxMainContent.Controls.Add(this.flowLayoutPanelUnrestricted); 120this.groupBoxMainContent.Controls.Add(this.flowLayoutPanelPermissions); 121this.groupBoxMainContent.Controls.Add(this.flowLayoutPanelTemplate); 131this.flowLayoutPanelUnrestricted.Controls.Add(this.textBoxUnrestrictedText); 140this.flowLayoutPanelPermissions.Controls.Add(this.flowLayoutPanelPeople); 141this.flowLayoutPanelPermissions.Controls.Add(this.rightsTable); 142this.flowLayoutPanelPermissions.Controls.Add(this.flowLayoutPanelContact); 143this.flowLayoutPanelPermissions.Controls.Add(this.flowLayoutPanelExpires); 151this.flowLayoutPanelTemplate.Controls.Add(this.labelSelectTemplate); 152this.flowLayoutPanelTemplate.Controls.Add(this.comboBoxTemplates); 187this.flowLayoutPanelPeople.Controls.Add(this.buttonPeoplePicker); 188this.flowLayoutPanelPeople.Controls.Add(this.textBoxUserName); 189this.flowLayoutPanelPeople.Controls.Add(this.buttonAddUser); 190this.flowLayoutPanelPeople.Controls.Add(this.buttonEveryone); 191this.flowLayoutPanelPeople.Controls.Add(this.buttonRemoveUser); 249this.flowLayoutPanelContact.Controls.Add(this.checkBoxPermissionsContact); 250this.flowLayoutPanelContact.Controls.Add(this.textBoxPermissionsContact); 274this.flowLayoutPanelExpires.Controls.Add(this.checkBoxValidUntil); 275this.flowLayoutPanelExpires.Controls.Add(this.datePickerValidUntil); 300this.flowLayoutPanelActions.Controls.Add(this.buttonCancel); 301this.flowLayoutPanelActions.Controls.Add(this.buttonSave); 302this.flowLayoutPanelActions.Controls.Add(this.buttonSaveAs); 375this.Controls.Add(this.flowLayoutPanelMain);
MS\Internal\Documents\SignatureSummaryDialog.cs (6)
277_columnHeaderPanel.Controls.Add(nameHeader); 278_columnHeaderPanel.Controls.Add(intentHeader); 279_columnHeaderPanel.Controls.Add(locationHeader); 280_columnHeaderPanel.Controls.Add(signByHeader); 307_columnHeaderPanel.Controls.Add(statusHeader); 308_columnHeaderPanel.Controls.Add(intentHeader);
MS\Internal\Documents\SignatureSummaryDialog.Designer.cs (9)
70_flowpanelMiddleControls.Controls.Add(_buttonViewCert); 71_flowpanelMiddleControls.Controls.Add(_buttonSign); 72_flowpanelMiddleControls.Controls.Add(_buttonRequestAdd); 73_flowpanelMiddleControls.Controls.Add(_buttonRequestDelete); 86_flowpanelBottomControls.Controls.Add(_buttonDone); 166_listboxMainPanel.Controls.Add(_listboxItemPanel); 167_listboxMainPanel.Controls.Add(_columnHeaderPanel); 175_listboxItemPanel.Controls.Add(_listBoxSummary); 207Controls.Add(_mainLayoutTable);
MS\Internal\Documents\SigningDialog.Designer.cs (5)
63_userInputFlowPanel.Controls.Add(_signatureControlInputLayoutTable); 181_buttonflowLayoutPanel.Controls.Add(_cancelButton); 182_buttonflowLayoutPanel.Controls.Add(_signButton); 183_buttonflowLayoutPanel.Controls.Add(_signSaveAsButton); 260Controls.Add(_mainLayoutTable);
MS\Internal\Documents\SigningProgress.Designer.cs (1)
60Controls.Add(_label);
System.Windows.Forms (134)
System\Windows\Forms\Accessibility\AccessibleObject.EnumVariantObject.cs (1)
155/// <see cref="Control.Controls"/> collection).
System\Windows\Forms\ActiveX\AxHost.AxContainer.cs (1)
363foreach (Control child in control.Controls)
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (1)
720foreach (Control c in control.Controls)
System\Windows\Forms\Control.ControlCollection.cs (3)
70value._parent?.Controls.Remove(value); 214if (controlsToLookIn[i].Controls.Count > 0) 217FindInternal(key, true, controlsToLookIn[i].Controls, foundControls);
System\Windows\Forms\Control.cs (18)
2630value.Controls.Add(this); 2634_parent?.Controls.Remove(this); 4308_parent.Controls.SetChildIndex(this, 0); 4735_parent?.Controls.Remove(this); 5406List<ControlTabOrderHolder> holders = new(Controls.Count); 5408foreach (Control c in Controls) 5600string.Format(SR.ControlsPropertyNotSetInGetNextControl, nameof(Controls), parent)); 5608nameof(Controls), 8471foreach (Control c in Controls) 8763int count = Controls.Count; 8766Control child = Controls[i]; 8787if (Controls.Count == 0) 9952_parent.Controls.SetChildIndex(this, -1); 10846int currentIndex = Controls.GetChildIndex(control); 10853newIndex = Controls.GetChildIndex(previousControl, throwException: false) + 1; 10865Controls.SetChildIndex(control, newIndex); 10917for (int i = Controls.GetChildIndex(control); --i >= 0;) 10919Control child = Controls[i];
System\Windows\Forms\Controls\Buttons\RadioButton.cs (2)
412ControlCollection children = parent.Controls; 435ControlCollection children = parent.Controls;
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (2)
466Controls.Add(_horizScrollBar); 473Controls.Add(_vertScrollBar);
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
6239Debug.Assert(_editingPanel is null || _editingPanel.Controls.Count == 0);
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (7)
1072Debug.Assert(dataGridView.EditingPanel.Controls.Contains(dataGridView.EditingControl)); 1073dataGridView.EditingPanel.Controls.Remove(dataGridView.EditingControl); 1088Debug.Assert(dataGridView.Controls.Contains(dataGridView.EditingPanel)); 1089((DataGridView.DataGridViewControlCollection)dataGridView.Controls).RemoveInternal(dataGridView.EditingPanel); 1095Debug.Assert(dataGridView.EditingPanel.Controls.Count == 0); 2480dgv.Controls.Add(dgv.EditingPanel); 2481dgv.EditingPanel.Controls.Add(dgv.EditingControl);
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (1)
543get => base.Controls;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CommandsPane.cs (1)
82Controls.Add(_label);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridErrorDialog.cs (3)
50foreach (Control control in Controls) 270Controls.Add(_detailsTextBox); 271Controls.Add(_overarchingTableLayoutPanel);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\HelpPane.cs (2)
51Controls.Add(_titleLabel); 52Controls.Add(_descriptionLabel);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (2)
471Controls.Add(_scrollBar); 873Controls.Add(control);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (4)
567Controls.Remove(_currentControl); 574Controls.Remove(_createNewLinkLabel); 598Controls.Add(control); 652Controls.Add(CreateNewLink);
System\Windows\Forms\Controls\Splitter\Splitter.cs (2)
647ControlCollection children = parent.Controls; 721ControlCollection children = parent.Controls;
System\Windows\Forms\Controls\TabControl\TabControl.cs (1)
1573Controls.Clear();
System\Windows\Forms\Controls\TabControl\TabControl.TabPageCollection.cs (5)
85_owner.Controls.Add(value); 228_owner.Controls.Add(tabPage); 235_owner.Controls.SetChildIndex(tabPage, index); 319_owner.Controls.Remove(value); 334public void RemoveAt(int index) => _owner.Controls.RemoveAt(index);
System\Windows\Forms\Controls\TabControl\TabPage.TabPageAccessibleObject.cs (3)
33if (index < 0 || index > owningTabPage.Controls.Count - 1) 38return owningTabPage.Controls[index].AccessibilityObject; 44=> this.IsOwnerHandleCreated(out TabPage? owningTabPage) ? owningTabPage.Controls.Count : -1;
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (1)
469get => base.Controls;
System\Windows\Forms\Controls\ToolStrips\ToolStripContainer.cs (1)
347get => base.Controls;
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (4)
982return GetFirstMenuStripRecursive(control.Controls); 1012if ((controlsToLookIn[i].Controls is not null) && controlsToLookIn[i].Controls.Count > 0) 1015MenuStrip? menuStrip = GetFirstMenuStripRecursive(controlsToLookIn[i].Controls);
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.cs (8)
517if (Controls.Count > 0) 521Control[] controls = new Control[Controls.Count]; 522Point[] controlLocations = new Point[Controls.Count]; 534Controls.Clear(); 614ToolStripPanelControlCollection? controls = Controls as ToolStripPanelControlCollection; 765Controls.Add(toolStripToDrag); 1079foreach (Control c1 in Controls) 1081foreach (Control c2 in Controls)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.ToolStripPanelRowControlCollection.cs (1)
228_owner.ToolStripPanel.Controls.Remove(control);
System\Windows\Forms\Controls\ToolStrips\ToolStripSettingsManager.cs (10)
29FindControls(true, _form.Controls, toolStripControls); 51FindControls(true, _form.Controls, toolStripControls); 135FindControls(true, _form.Controls, toolStripPanels); 139foreach (Control c in toolStripPanel.Controls) 215FindControls(true, _form.Controls, toolStripControls); 262if ((controlsToLookIn[i].Controls is not null) && controlsToLookIn[i].Controls.Count > 0) 265FindControls(searchAllChildren, controlsToLookIn[i].Controls, foundControls); 287Control.ControlCollection controlsCollection = start.Controls; 301Control.ControlCollection controlsCollection = start.Controls;
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (1)
65Controls.AddRange([_upDownButtons, _upDownEdit]);
System\Windows\Forms\Controls\WebBrowser\WebBrowserContainer.cs (1)
265foreach (Control c in ctl.Controls)
System\Windows\Forms\Design\ComponentEditorForm.cs (2)
293Controls.Clear(); 294Controls.AddRange(
System\Windows\Forms\Design\ComponentEditorPage.cs (1)
228site?.GetControl()?.Controls.Add(this);
System\Windows\Forms\Dialogs\ThreadExceptionDialog.cs (5)
263Controls.Add(_pictureBox); 268Controls.Add(_message); 305Controls.Add(button); 316Controls.Add(button); 330Controls.Add(_details);
System\Windows\Forms\Form.cs (7)
1110Controls.Add(new MdiClient()); 3817if (Controls.Count > 1) 3819for (int index = 0; index < Controls.Count; index++) 3821Control ctl = Controls[index]; 4268foreach (Control c in Controls) 4608foreach (Control c in Controls) 5090foreach (Control control in Controls)
System\Windows\Forms\Layout\Containers\ContainerControl.cs (5)
616foreach (Control c in start.Controls) 1033ControlCollection controlsCollection = start.Controls; 1054ControlCollection controlsCollection = start.Controls; 1250if (Controls.Count == 0) 1969ControlCollection children = Controls;
System\Windows\Forms\Layout\Containers\SplitContainer.cs (4)
279get => base.Controls; 1794if ((Panel1.Controls.Count > 0 || Panel2.Controls.Count > 0) || TabStop) 2031foreach (Control child in control.Controls)
System\Windows\Forms\Layout\DefaultLayout.cs (1)
697ControlCollection controls = control.Controls;
System\Windows\Forms\MDI\MDIClient.cs (2)
243for (int i = 0; i < Controls.Count; i++) 247if (Controls[i] is Form child && child.CanRecreateHandle() && child.WindowState == FormWindowState.Minimized)
System\Windows\Forms\MDI\MDIWindowDialog.cs (2)
137Controls.Add(_okCancelTableLayoutPanel); 138Controls.Add(_itemList);
System\Windows\Forms\Panels\Panel.PanelAccessibleObject.cs (3)
24!this.IsOwnerHandleCreated(out Panel? owner) || index < 0 || index >= owner.Controls.Count 26: owner.Controls[index].AccessibilityObject; 31=> this.IsOwnerHandleCreated(out Panel? owner) ? owner.Controls.Count : -1;
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutPanel.cs (1)
100public new TableLayoutControlCollection Controls => (TableLayoutControlCollection)base.Controls;
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutSettings.TableLayoutSettingsStub.cs (1)
44foreach (Control tableControl in appliedControl.Controls)
System\Windows\Forms\Printing\PrintControllerWithStatusDialog.StatusDialog.cs (1)
81Controls.Add(_tableLayoutPanel);
System\Windows\Forms\Printing\PrintPreviewControl.cs (2)
77Controls.Add(_hScrollBar); 90Controls.Add(_vScrollBar);
System\Windows\Forms\Printing\PrintPreviewDialog.cs (2)
967Controls.Add(_previewControl); 968Controls.Add(_toolStrip1);
System\Windows\Forms\Scrolling\ScrollableControl.cs (8)
329if (Controls.Count != 0) 341for (int i = 0; i < Controls.Count; i++) 343Control current = Controls[i]; 394else if (Controls.Count != 0) 397for (int i = 0; i < Controls.Count; i++) 402Control current = Controls[i]; 803for (int i = 0; i < Controls.Count; i++) 805Control ctl = Controls[i];
System.Windows.Forms.Design (224)
System\ComponentModel\Design\BinaryEditor.BinaryUI.cs (2)
204_groupBoxMode.Controls.Add(_radioButtonsTableLayoutPanel); 285Controls.Add(_overarchingTableLayoutPanel);
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (1)
500Controls.Add(_overArchingTableLayoutPanel);
System\ComponentModel\Design\CollectionEditor.FilterListBox.cs (1)
25foreach (Control c in Parent.Controls)
System\ComponentModel\Design\DateTimeEditor.DateTimeUI.cs (1)
66Controls.Add(_monthCalendar);
System\ComponentModel\Design\DesignerActionPanel.cs (3)
871oldLine.RemoveControls(Controls); 883Controls.AddRange(controls); 894excessLine.RemoveControls(Controls);
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.FlyoutDialog.cs (1)
34Controls.Add(hostedControl);
System\ComponentModel\Design\ToolStripContainerActionList.cs (8)
53foreach (Control control in panel.Controls) 103&& root.Controls.Count > 1; 118root.Controls.Add(_toolStripContainer); 137|| root.Controls.Count <= 1) 152Control[] childControls = new Control[root.Controls.Count]; 153root.Controls.CopyTo(childControls, 0); 179oldParent.Controls.Remove(control); 185newParent.Controls.Add(control);
System\Drawing\Design\ColorEditor.ColorUI.ColorEditorTabControl.cs (2)
21if (selectedTab is not null && selectedTab.Controls.Count > 0) 23selectedTab.Controls[0].Focus();
System\Drawing\Design\ColorEditor.ColorUI.cs (6)
223_paletteTabPage.Controls.Add(_pal); 224_systemTabPage.Controls.Add(_lbSystem); 225_commonTabPage.Controls.Add(_lbCommon); 227Controls.Add(_tabControl); 325if (selectedPage is not null && selectedPage.Controls.Count > 0) 327selectedPage.Controls[0].Focus();
System\Drawing\Design\ContentAlignmentEditor.ContentUI.cs (8)
106protected override ControlCollection SelectionOptions => Controls; 209Controls.Clear(); 250Controls.AddRange( 434nextTabIndex = Controls.Count - 1; 436else if (nextTabIndex >= Controls.Count) 441for (int i = 0; i < Controls.Count; i++) 443if (Controls[i] is RadioButton button && Controls[i].TabIndex == nextTabIndex)
System\Windows\Forms\Design\AnchorEditor.AnchorUI.cs (4)
115Controls.Clear(); 116Controls.AddRange( 121_container.Controls.Clear(); 122_container.Controls.AddRange(
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (12)
218foreach (Control control in c.Controls) 256dragSource.Controls.Remove(currentControl); 258dragTarget.Controls.Add(currentControl); 284dragTarget.Controls.SetChildIndex(currentControl, newIndex); 402numberOfOriginalTrayControls = tray is not null ? tray.Controls.Count : 0; 502componentChangeSvcTarget.OnComponentChanged(dragTarget, targetProp, dragTarget.Controls, dragTarget.Controls); 505componentChangeSvcSource.OnComponentChanged(dragSource, sourceProp, dragSource.Controls, dragSource.Controls); 528int numberOfTrayControlsAdded = tray.Controls.Count - numberOfOriginalTrayControls; 535listOfTrayControls.Add(tray.Controls[numberOfOriginalTrayControls + i]); 972_dragComponents[i].zorderIndex = primaryParent.Controls.GetChildIndex(dragControl, false /*throwException*/);
System\Windows\Forms\Design\Behavior\SelectionManager.cs (1)
116foreach (Control control in parent.Controls)
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionBehavior.cs (2)
169oldParent.Controls.Remove(control); 175newParent.Controls.Add(control);
System\Windows\Forms\Design\BorderSidesEditor.BorderSidesEditorUI.cs (1)
158Controls.Add(_tableLayoutPanel);
System\Windows\Forms\Design\ChangeToolStripParentVerb.cs (2)
71oldParent.Controls.Remove(toolStrip); 78newParent.Controls.Add(toolStrip);
System\Windows\Forms\Design\CommandSet.cs (9)
1786if (controlCommonParent.Controls.Count > 0) 1788Control? parent = controlCommonParent.Controls[0]; 1855int numberOfOriginalTrayControls = tray is not null ? tray.Controls.Count : 0; 2137int numberOfTrayControlsAdded = tray.Controls.Count - numberOfOriginalTrayControls; 2144listOfTrayControls.Add(tray.Controls[numberOfOriginalTrayControls + i]); 3307foreach (Control child in parentControl.Controls) 3440foreach (Control c in parentControl.Controls) 3518return c1.Parent == c2.Parent && c1.Parent is not null ? c1.Parent.Controls.GetChildIndex(c1) - c1.Parent.Controls.GetChildIndex(c2) : 1;
System\Windows\Forms\Design\ComponentTray.cs (6)
221ControlCollection children = Controls; 444get => Controls.Count; 710Controls.Add(trayctl); 1022foreach (Control control in Controls) 1377int controlCount = Controls.Count; 1380Control child = Controls[i];
System\Windows\Forms\Design\ControlCodeDomSerializer.cs (7)
83foreach (Control child in parent.Controls) 99foreach (Control control in parent.Controls) 127foreach (Control control in parent.Controls) 299for (int i = 0; i < parent.Controls.Count; i++) 301if (parent.Controls[i] == control) 417for (int i = control.Controls.Count - 1; i >= 0; i--) 421Control child = control.Controls[i];
System\Windows\Forms\Design\ControlCommandSet.cs (10)
1142if (_baseControl is not null && _baseControl.Controls.Count > 0) 1392if (current.Controls.Count > 0) 1394next = current.Controls[0]; 1509Control.ControlCollection ctlControls = ctl.Controls; 1541Control.ControlCollection parentControls = p.Controls; 1609Control.ControlCollection parentControls = p.Controls; 1677Control.ControlCollection ctlControls = ctl.Controls; 1696ctlControls = ctl.Controls; 1739else if (parent.Controls.GetChildIndex(cX) > parent.Controls.GetChildIndex(cY))
System\Windows\Forms\Design\ControlDesigner.cs (6)
115foreach (Control control in Control.Controls) 862foreach (Control child in firstChild.Controls) 1116foreach (Control control in Control.Controls) 1166foreach (Control c in parentControl.Controls) 1675foreach (Control child in firstChild.Controls) 2495foreach (Control c in Control.Controls)
System\Windows\Forms\Design\ControlDesigner.DesignerControlCollection.cs (1)
20public DesignerControlCollection(Control owner) : base(owner) => _realCollection = owner.Controls;
System\Windows\Forms\Design\DataGridViewAddColumnDialog.cs (1)
457Controls.Add(_overarchingTableLayoutPanel);
System\Windows\Forms\Design\DataGridViewCellStyleBuilder.cs (2)
222_previewGroupBox.Controls.Add(_sampleViewTableLayoutPanel); 240Controls.Add(_overarchingTableLayoutPanel);
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (1)
619Controls.Add(_overarchingTableLayoutPanel);
System\Windows\Forms\Design\DataGridViewColumnTypeEditor.Picker.cs (1)
33Controls.Add(_typesListBox);
System\Windows\Forms\Design\DesignBindingPicker.cs (19)
199_addNewPanel.Controls.Add(_addNewCtrl); 200_addNewPanel.Controls.Add(addNewIcon); 201_addNewPanel.Controls.Add(addNewDiv); 203_helpTextPanel.Controls.Add(_helpTextCtrl); 204_helpTextPanel.Controls.Add(helpTextDiv); 208Controls.Add(_addNewPanel); 209Controls.Add(_helpTextPanel); 306_addNewPanel.Controls.Add(_addNewCtrl); 307_addNewPanel.Controls.Add(addNewIcon); 308_addNewPanel.Controls.Add(addNewDiv); 332_helpTextPanel.Controls.Add(_helpTextCtrl); 333_helpTextPanel.Controls.Add(helpTextDiv); 337Controls.Add(_treeViewCtrl); 338Controls.Add(_addNewPanel); 339Controls.Add(_helpTextPanel); 463_addNewPanel.Controls.Clear(); 464_helpTextPanel.Controls.Clear(); 465Controls.Remove(_addNewPanel); 466Controls.Remove(_helpTextPanel);
System\Windows\Forms\Design\DesignerFrame.cs (9)
48Controls.Add(_designerRegion); 106_designerRegion.Controls.Add(_designer); 293Controls.Add(_splitter); 294Controls.Add(window); 304Controls.Remove(window); 305Controls.Remove(_splitter); 318List<ThemedScrollbarWindow> windows = new(Controls.Count); 319foreach (Control c in Controls) 547foreach (Control c in Owner!.Controls)
System\Windows\Forms\Design\DockEditor.DockUI.cs (5)
169protected override ControlCollection SelectionOptions => _container.Controls; 205Controls.Clear(); 206Controls.Add(_container); 208_container.Controls.Clear(); 209_container.Controls.AddRange(
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (6)
78foreach (object child in Control.Controls) 170var children = Control.Controls; 598var children = Control.Controls; 733Control.Controls.SetChildIndex(e.Control, _insertionIndex); 886_insertionIndex = FlowLayoutPanel.Controls.Count; 902Control.Controls.Contains(_primaryDragControl))
System\Windows\Forms\Design\FlowPanelDesigner.cs (1)
37internal override void AddChildControl(Control newChild) => Control.Controls.Add(newChild);
System\Windows\Forms\Design\FormatControl.Designer.cs (3)
60formatGroupBox.Controls.Add(this.tableLayoutPanel3); 92sampleGroupBox.Controls.Add(this.sampleLabel); 175Controls.Add(formatGroupBox);
System\Windows\Forms\Design\FormatStringDialog.cs (3)
214Controls.Add(_okButton); 215Controls.Add(_formatControl1); 216Controls.Add(_cancelButton);
System\Windows\Forms\Design\InheritanceUI.cs (2)
68foreach (Control child in c.Controls) 93foreach (Control child in c.Controls)
System\Windows\Forms\Design\LinkAreaEditor.LinkAreaUI.cs (3)
102Controls.Add(_okCancelTableLayoutPanel); 103Controls.Add(_sampleEdit); 104Controls.Add(_caption);
System\Windows\Forms\Design\MaskDesignerDialog.cs (1)
282Controls.Add(_overarchingTableLayoutPanel);
System\Windows\Forms\Design\MaskedTextBoxTextEditorDropDown.cs (1)
48Controls.Add(_cloneMtb);
System\Windows\Forms\Design\OleDragDropHandler.cs (2)
312DisableDragDropChildren(c.Controls, allowDropCache); 516DisableDragDropChildren(ctl.Controls, allowDropChanged);
System\Windows\Forms\Design\ParentControlDesigner.cs (29)
192foreach (Control child in Control.Controls) 270foreach (Control child in Control.Controls) 408foreach (Control child in Control.Controls) 428Control.Controls.Add(newChild); 429Control.Controls.SetChildIndex(newChild, 0); 588_changeService?.OnComponentChanged(Control, controlsProp, Control.Controls, Control.Controls); 608Control[] children = new Control[parent.Controls.Count]; 609parent.Controls.CopyTo(children, 0); 652parent.Controls.Add(children[i]); 656int childIndex = parent.Controls.GetChildIndex(children[i]); 657parent.Controls.Remove(children[i]); 658parent.Controls.Add(children[i]); 659parent.Controls.SetChildIndex(children[i], childIndex); 869int controlCount = control.Controls.Count; 873Control child = control.Controls[i]; 2176oldParent.Controls.Remove(control); 2180newParent.Controls.Add(control); 2189if (oldParent.Controls.Contains(newParent)) 2412cParent.Controls.Remove(c); 2413_changeService?.OnComponentChanged(cParent, controlsProp, cParent.Controls, cParent.Controls); 2421parent.Controls.Add(c); 2425_changeService?.OnComponentChanged(parent, controlsProp, parent.Controls, parent.Controls); 2430int childIndex = parent.Controls.GetChildIndex(c); 2431parent.Controls.Remove(c); 2432parent.Controls.Add(c); 2433parent.Controls.SetChildIndex(c, childIndex);
System\Windows\Forms\Design\ShortcutKeysEditor.ShortcutKeysUI.cs (1)
216Controls.AddRange([_innerPanel, _outerPanel]);
System\Windows\Forms\Design\SplitContainerDesigner.cs (1)
148components.AddRange(panel.Controls.Cast<Control>());
System\Windows\Forms\Design\SplitterPanelDesigner.cs (2)
132if (_splitterPanel.Controls.Count == 0) 211if (_splitterPanel.Controls.Count == 0)
System\Windows\Forms\Design\StringCollectionEditor.StringCollectionForm.cs (1)
123Controls.Add(_overarchingLayoutPanel);
System\Windows\Forms\Design\StyleEditorForm.cs (2)
373_sizeTypeGroupBox.Controls.Add(_sizeTypeTableLayoutPanel); 442Controls.Add(_overarchingTableLayoutPanel);
System\Windows\Forms\Design\TabControlDesigner.cs (3)
75_removeVerb.Enabled = Control.Controls.Count > 0; 118_removeVerb.Enabled = Control.Controls.Count > 0; 294tc.Controls.Add(page);
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (2)
1181for (int i = 0; i < Control.Controls.Count; i++) 1183TypeDescriptor.AddAttributes(Control.Controls[i], InheritanceAttribute.InheritedReadOnly);
System\Windows\Forms\Design\TabOrder.cs (5)
361for (int n = 0; n < ctl.Controls.Count; n++) 363if (GetTabbable(ctl.Controls[n])) 420int count = control.Controls.Count; 423ctlTab = control.Controls[i]; 430if (ctlTab.Controls.Count > 0)
System\Windows\Forms\Design\ToolStripCollectionEditor.ToolStripItemEditorForm.cs (1)
312Controls.Add(_tableLayoutPanel);
System\Windows\Forms\Design\ToolStripContainerDesigner.cs (1)
153foreach (Control control in parent.Controls)
System\Windows\Forms\Design\ToolStripDesigner.cs (10)
1519ComponentChangeService.OnComponentChanged(parentPanel, controlsProp, parentPanel.Controls, parentPanel.Controls); 1535foreach (Control c in parent.Controls) 1539index = parent.Controls.IndexOf(c); 1546index = parent.Controls.Count - 1; 1549parent.Controls.SetChildIndex(ToolStrip, index); 1556foreach (Control c in parent.Controls) 1568index = parent.Controls.IndexOf(c); 1576index = parent.Controls.Count; 1579parent.Controls.SetChildIndex(ToolStrip, index - 1);
System\Windows\Forms\Design\ToolStripDropDownDesigner.cs (2)
274form.Controls.Remove(_designMenu); 398form.Controls.Add(_designMenu);
System\Windows\Forms\Design\ToolStripEditorManager.cs (3)
57_behaviorService.AdornerWindowControl.Controls.Remove(_editor); 87_behaviorService.AdornerWindowControl.Controls.Add(_editor); 130Controls.Add(editorToolStrip);
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (5)
333Control.ControlCollection parentControls = p.Controls; 388Control.ControlCollection parentControls = p.Controls; 793selSvc.SetSelectedComponents(parentToolStripPanel.Controls, SelectionTypes.Replace); 1703next = current.Controls.Count > 0 ? current.Controls[0] : (object)current;
System\Windows\Forms\Design\ToolStripPanelDesigner.cs (1)
391if (Control.Controls.Count == 0)
System\Windows\Forms\Design\TreeNodeCollectionEditor.cs (1)
335Controls.Add(_overarchingTableLayoutPanel);
System.Windows.Forms.Design.Tests (23)
ControlDesignerTests.cs (2)
203_designer._control.Controls.Add(childControl); 218_designer._control.Controls.Add(childControl);
System\Resources\Tools\StronglyTypedResourceBuilderTests.cs (1)
616form.Controls.Add(mediaPlayer);
System\Windows\Forms\Design\ControlDesigner.DesignerControlCollectionTests.cs (14)
54_collection.IsReadOnly.Should().Be(_control.Controls.IsReadOnly); 62_control.Controls.Cast<Control>().Should().Contain(control); 72_control.Controls.Cast<Control>().Should().Contain(controls); 86var other = _control.Controls; 93_collection.GetEnumerator().Should().BeEquivalentTo(_control.Controls.GetEnumerator()); 99_collection.GetHashCode().Should().Be(_control.Controls.GetHashCode()); 107((IList)_collection).IndexOf(control).Should().Be(_control.Controls.IndexOf(control)); 118_control.Controls[0].Should().Be(control); 127_control.Controls.Contains(control).Should().BeFalse(); 136_control.Controls.Contains(control).Should().BeFalse(); 144_collection.GetChildIndex(control, throwException: false).Should().Be(_control.Controls.GetChildIndex(control, throwException: false)); 153_control.Controls.GetChildIndex(control).Should().Be(0); 162_control.Controls.Contains(control).Should().BeTrue(); 165_control.Controls.Contains(control).Should().BeFalse();
System\Windows\Forms\Design\DesignerFrameTests.cs (6)
47designerFrame.Controls.Cast<Control>().Should().HaveCount(1); 64List<Control> controls = designerFrame.Controls.Cast<Control>().ToList(); 69Control? containedControl = designerRegion?.Controls.Cast<Control>().FirstOrDefault(); 75designerFrame.Controls.Cast<Control>().Should().NotContain(control); 123designerFrame.Controls.Add(control); 125designerFrame.Controls.Cast<Control>().Should().Contain(control);
System.Windows.Forms.Tests (821)
NumericUpDownTests.cs (5)
33form.Controls.Add(upDown); 53upDown.Controls[0].PrintToMetafile(emfButtons); 76form.Controls.Add(upDown); 112form.Controls.Add(upDown); 195upDown.Controls[0].PrintToMetafile(emfButtons);
System\Windows\Forms\AccessibleObjects\AccessibleObjectTests.cs (5)
548form.Controls.Add(first); 549form.Controls.Add(second); 575form.Controls.Add(control); 2625form.Controls.Add(button); 2656form.Controls.Add(comboBox);
System\Windows\Forms\AccessibleObjects\Control.ControlAccessibleObjectTests.cs (4)
900ownerControl.Controls.Add(child); 1205ownerControl.Controls.Add(child); 1699form.Controls.Add(label); 1700form.Controls.Add(control);
System\Windows\Forms\AccessibleObjects\DateTimePicker.DateTimePickerAccessibleObjectTests.cs (3)
366form.Controls.Add(dateTimePicker2); 367form.Controls.Add(label1); 368form.Controls.Add(dateTimePicker1);
System\Windows\Forms\AccessibleObjects\ErrorProvider.ControlItem.ControlItemAccessibleObjectTests.cs (1)
47parentControl.Controls.Add(control);
System\Windows\Forms\AccessibleObjects\ErrorProviderAccessibleObjectTests.cs (2)
37_form.Controls.Add(_control1); 38_form.Controls.Add(_control2);
System\Windows\Forms\AccessibleObjects\Form.FormAccessibleObjectTests.cs (3)
130form.Controls.Add(control); 150form.Controls.Add(control); 195form.Controls.Add(embeddedForm);
System\Windows\Forms\AccessibleObjects\ListBoxAccessibleObjectTests.cs (1)
138form.Controls.Add(listBox);
System\Windows\Forms\AccessibleObjects\ListViewGroup.ListViewGroupAccessibleObjectTests.cs (2)
289form.Controls.Add(list); 323form.Controls.Add(listView);
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemDetailsAccessibleObjectTests.cs (2)
195form.Controls.Add(listView1); 219form.Controls.Add(listView1);
System\Windows\Forms\AccessibleObjects\Panel.PanelAccessibleObjectTests.cs (6)
195parentPanel.Controls.Add(childPanel); 233parentPanel.Controls.Add(childPanel); 249panel.Controls.Add(buttonFirst); 252panel.Controls.Add(buttonLast); 266panel1.Controls.Add(button1); 274form.Controls.Add(panel1);
System\Windows\Forms\AccessibleObjects\PrintPreviewControl.PrintPreviewControlAccessibleObjectTests.cs (1)
86panel.Controls.Add(control);
System\Windows\Forms\AccessibleObjects\TabPage.TabPageAccessibleObjectTests.cs (3)
533tabControl.Controls.Add(tabPage); 541tabPage.Controls.Add(button); 546form.Controls.Add(tabControl);
System\Windows\Forms\Application.ParkingWindowTests.cs (1)
47form.Controls.Add(comboBox);
System\Windows\Forms\AxHost.VisualBasic6Tests.cs (1)
24form.Controls.Add(control);
System\Windows\Forms\AxHostTests.cs (10)
57Assert.Empty(control.Controls); 58Assert.Same(control.Controls, control.Controls); 151Assert.Empty(control.Controls); 152Assert.Same(control.Controls, control.Controls); 471control.Controls.Add(child1); 472control.Controls.Add(child2); 501control.Controls.Add(child1); 502control.Controls.Add(child2);
System\Windows\Forms\AxSystemMonitorTests.cs (1)
21_form.Controls.Add(_control);
System\Windows\Forms\AxWebBrowserTests.cs (1)
23_form.Controls.Add(_control);
System\Windows\Forms\ButtonBaseTests.cs (31)
48Assert.Empty(control.Controls); 49Assert.Same(control.Controls, control.Controls); 2878Assert.Empty(oldParent.Controls); 2884Assert.Empty(oldParent.Controls); 2897Assert.Same(control, Assert.Single(parent.Controls)); 2903Assert.Same(control, Assert.Single(parent.Controls)); 4564Assert.Empty(control.Controls); 4579Assert.Empty(control.Controls); 4590Assert.Empty(control.Controls); 4616Assert.Empty(control.Controls); 4631Assert.Empty(control.Controls); 4642Assert.Empty(control.Controls); 4671Assert.Empty(control.Controls); 4686Assert.Empty(control.Controls); 4697Assert.Empty(control.Controls); 4719Assert.Empty(control.Controls); 4734Assert.Empty(control.Controls); 4745Assert.Empty(control.Controls); 4771Assert.Empty(control.Controls); 4786Assert.Empty(control.Controls); 4797Assert.Empty(control.Controls); 4826Assert.Empty(control.Controls); 4841Assert.Empty(control.Controls); 4852Assert.Empty(control.Controls); 4878Assert.Empty(control.Controls); 4889Assert.Empty(control.Controls); 4919Assert.Empty(control.Controls); 4930Assert.Empty(control.Controls); 4963Assert.Empty(control.Controls); 4974Assert.Empty(control.Controls);
System\Windows\Forms\ButtonRenderingTests.cs (1)
218form.Controls.Add(button);
System\Windows\Forms\ButtonTests.cs (3)
50Assert.Empty(control.Controls); 51Assert.Same(control.Controls, control.Controls);
System\Windows\Forms\CheckBoxRendererTests.cs (4)
22form.Controls.Add(control); 58form.Controls.Add(control); 95form.Controls.Add(control); 131form.Controls.Add(control);
System\Windows\Forms\CheckBoxTests.cs (5)
52Assert.Empty(control.Controls); 53Assert.Same(control.Controls, control.Controls); 820form.Controls.Add(control); 853form.Controls.Add(checkBox);
System\Windows\Forms\ComboBoxTests.cs (3)
53Assert.Empty(control.Controls); 54Assert.Same(control.Controls, control.Controls);
System\Windows\Forms\ContainerControlTests.cs (38)
55Assert.Empty(control.Controls); 56Assert.Same(control.Controls, control.Controls); 154control.Controls.Add(child); 155child.Controls.Add(grandchild); 204control.Controls.Add(child); 569control.Controls.Add(child); 616control.Controls.Add(child); 798child1.Controls.Add(grandchild1); 801child2.Controls.Add(grandchild2); 804child3.Controls.Add(grandchild3); 823control.Controls.Add(child1); 824control.Controls.Add(child2); 825control.Controls.Add(child3); 826control.Controls.Add(child4); 827control.Controls.Add(child5); 828control.Controls.Add(child6); 829control.Controls.Add(child7); 830control.Controls.Add(child8); 1024child1.Controls.Add(grandchild1); 1027child2.Controls.Add(grandchild2); 1030child3.Controls.Add(grandchild3); 1049control.Controls.Add(child1); 1050control.Controls.Add(child2); 1051control.Controls.Add(child3); 1052control.Controls.Add(child4); 1053control.Controls.Add(child5); 1054control.Controls.Add(child6); 1055control.Controls.Add(child7); 1056control.Controls.Add(child8); 1259control.Controls.Add(child1); 1260control.Controls.Add(child2); 1289control.Controls.Add(child1); 1290control.Controls.Add(child2); 1319container.Controls.Add(control); 1344container.Controls.Add(control); 1369container.Controls.Add(control); 1385container.Controls.Add(control);
System\Windows\Forms\ControlTests.ControlCollection.cs (33)
61Assert.Empty(owner.Controls); 74Assert.Empty(owner.Controls); 89Assert.Empty(owner.Controls); 113Control.ControlCollection collection = owner.Controls; 137Assert.Same(control1, Assert.Single(owner.Controls)); 150Assert.Equal(new Control[] { control1, control2 }, owner.Controls.Cast<Control>()); 166Assert.Equal(new Control[] { control2, control1 }, owner.Controls.Cast<Control>()); 190Control.ControlCollection collection1 = owner1.Controls; 191Control.ControlCollection collection2 = owner2.Controls; 212Assert.Same(control, Assert.Single(owner2.Controls)); 227Control.ControlCollection collection = owner.Controls; 254Assert.Same(control, Assert.Single(owner.Controls)); 266Assert.Same(control, Assert.Single(owner.Controls)); 282Control.ControlCollection collection = owner.Controls; 336Control.ControlCollection collection = owner.Controls; 365Control.ControlCollection collection = owner.Controls; 433Control.ControlCollection collection = owner.Controls; 470Control.ControlCollection collection = owner.Controls; 1211Control.ControlCollection collection = owner.Controls; 1462child3.Controls.Add(grandchild1); 1463child3.Controls.Add(grandchild2); 1464child3.Controls.Add(grandchild3); 1465Control.ControlCollection collection = owner.Controls; 1503Control.ControlCollection collection = owner.Controls; 2047Control.ControlCollection collection = owner.Controls; 2123Control.ControlCollection collection = owner.Controls; 3164Control.ControlCollection collection = owner.Controls; 3243Control.ControlCollection collection = owner.Controls; 3337Control.ControlCollection collection = owner.Controls; 3436IList collection = owner.Controls; 3460Assert.Same(control1, Assert.Single(owner.Controls)); 3474Assert.Equal(new Control[] { control1, control2 }, owner.Controls.Cast<Control>()); 3490Assert.Equal(new Control[] { control2, control1 }, owner.Controls.Cast<Control>());
System\Windows\Forms\ControlTests.cs (34)
43Assert.Empty(control.Controls); 44Assert.Same(control.Controls, control.Controls); 132Assert.Empty(control.Controls); 133Assert.Same(control.Controls, control.Controls); 228Assert.Empty(control.Controls); 229Assert.Same(control.Controls, control.Controls); 324Assert.Empty(control.Controls); 325Assert.Same(control.Controls, control.Controls); 420Assert.Empty(control.Controls); 421Assert.Same(control.Controls, control.Controls); 728control.Controls.Add(childControl); 789control.Controls.AddRange(new Button[] { button1, button2, button3 }); 808control.Controls.AddRange(new Button[] { button1, button2, button3 }); 827control.Controls.AddRange(new Button[] { button1, button2, button3 }); 848control.Controls.AddRange(new Button[] { button1, button2, button3 }); 870control.Controls.Add(table); 879panelRadioButtons.Controls.Add(radioButton1); 881panelRadioButtons.Controls.Add(radioButton2); 890panelCheckBoxes.Controls.Add(checkBox1); 892panelCheckBoxes.Controls.Add(checkBox2); 901panelButtons.Controls.Add(button1); 903panelButtons.Controls.Add(button2); 956form.Controls.AddRange(new ToolStrip[] { toolStrip1, toolStrip2 }); 1013form.Controls.AddRange(new ToolStrip[] { toolStrip1, toolStrip2 }); 1061form.Controls.Add(checkedListBox1); 1062form.Controls.Add(button1); 1063form.Controls.Add(listBox1); 1064form.Controls.Add(listView1); 1101form.Controls.Add(control);
System\Windows\Forms\ControlTests.Handlers.cs (50)
136control.Controls.Add(child1); 137control.Controls.Add(child2); 189control.Controls.Add(child1); 190control.Controls.Add(child2); 331control.Controls.Add(child1); 332control.Controls.Add(child2); 388control.Controls.Add(child1); 389control.Controls.Add(child2); 512control.Controls.Add(child1); 513control.Controls.Add(child2); 565control.Controls.Add(child1); 566control.Controls.Add(child2); 660control.Controls.Add(child1); 661control.Controls.Add(child2); 715control.Controls.Add(child1); 716control.Controls.Add(child2); 1110control.Controls.Add(child1); 1111control.Controls.Add(child2); 1165control.Controls.Add(child1); 1166control.Controls.Add(child2); 1507control.Controls.Add(child1); 1508control.Controls.Add(child2); 1560control.Controls.Add(child1); 1561control.Controls.Add(child2); 1742control.Controls.Add(child1); 1743control.Controls.Add(child2); 1797control.Controls.Add(child1); 1798control.Controls.Add(child2); 1963control.Controls.Add(child1); 1964control.Controls.Add(child2); 2016control.Controls.Add(child1); 2017control.Controls.Add(child2); 2806control.Controls.Add(child1); 2807control.Controls.Add(child2); 2906control.Controls.Add(child1); 2907control.Controls.Add(child2); 2983control.Controls.Add(child1); 2984control.Controls.Add(child2); 5037control.Controls.Add(child1); 5038control.Controls.Add(child2); 5090control.Controls.Add(child1); 5091control.Controls.Add(child2); 5365control.Controls.Add(child1); 5366control.Controls.Add(child2); 5728child1.Controls.Add(grandchild1); 5729control.Controls.Add(child1); 5730control.Controls.Add(child2); 5810child1.Controls.Add(grandchild1); 5811control.Controls.Add(child1); 5812control.Controls.Add(child2);
System\Windows\Forms\ControlTests.Internals.cs (6)
312control.Controls.AddRange(unordered); 341control.Controls.AddRange(unordered); 370control.Controls.AddRange(tabOrder); 398control.Controls.AddRange(tabOrder); 418form.Controls.Add(control); 420form.Controls.Remove(control);
System\Windows\Forms\ControlTests.Methods.cs (106)
139parent.Controls.Add(child1); 140parent.Controls.Add(child2); 141Assert.Equal(new Control[] { child1, child2 }, parent.Controls.Cast<Control>()); 156Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 165Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 181parent.Controls.Add(child1); 182parent.Controls.Add(child2); 183Assert.Equal(new Control[] { child1, child2 }, parent.Controls.Cast<Control>()); 205Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 217Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 236parent.Controls.Add(child1); 237parent.Controls.Add(child2); 238Assert.Equal(new Control[] { child1, child2 }, parent.Controls.Cast<Control>()); 266Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 281Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 303parent.Controls.Add(child1); 304parent.Controls.Add(child2); 305Assert.Equal(new Control[] { child1, child2 }, parent.Controls.Cast<Control>()); 328Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 340Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 980Assert.Empty(control.Controls); 994Assert.Empty(control.Controls); 1004Assert.Empty(control.Controls); 1031Assert.Empty(control.Controls); 1045Assert.Empty(control.Controls); 1056Assert.Empty(control.Controls); 1076control.Controls.Add(child1); 1077control.Controls.Add(child2); 1085Assert.Empty(control.Controls); 1103Assert.Empty(control.Controls); 1124Assert.Empty(control.Controls); 1158Assert.Empty(control.Controls); 1172Assert.Empty(control.Controls); 1182Assert.Empty(control.Controls); 1213Assert.Empty(control.Controls); 1227Assert.Empty(control.Controls); 1241Assert.Empty(control.Controls); 1282Assert.Empty(control.Controls); 1296Assert.Empty(control.Controls); 1306Assert.Empty(control.Controls); 1331Assert.Empty(control.Controls); 1341Assert.Empty(control.Controls); 1368Assert.Empty(control.Controls); 1382Assert.Empty(control.Controls); 1393Assert.Empty(control.Controls); 1425Assert.Empty(control.Controls); 1436Assert.Empty(control.Controls); 1456control.Controls.Add(child1); 1457control.Controls.Add(child2); 1465Assert.Empty(control.Controls); 1483Assert.Empty(control.Controls); 1504Assert.Empty(control.Controls); 1534control.Controls.Add(child1); 1535control.Controls.Add(child2); 1551Assert.Equal(new Control[] { child1, child2 }, control.Controls.Cast<Control>()); 1572Assert.Equal(new Control[] { child1, child2 }, control.Controls.Cast<Control>()); 1606Assert.Empty(control.Controls); 1620Assert.Empty(control.Controls); 1630Assert.Empty(control.Controls); 1658Assert.Empty(control.Controls); 1668Assert.Empty(control.Controls); 1699Assert.Empty(control.Controls); 1713Assert.Empty(control.Controls); 1727Assert.Empty(control.Controls); 1766Assert.Empty(control.Controls); 1780Assert.Empty(control.Controls); 2226cont.Controls.AddRange(tabOrder); 2254cont.Controls.AddRange(tabOrder); 2282cont.Controls.AddRange(tabOrder); 2310cont.Controls.AddRange(tabOrder); 3037control.Controls.Add(child); 3155control.Controls.Add(child); 3290control.Controls.Add(child); 3431control.Controls.Add(child); 3568control.Controls.Add(child); 3711control.Controls.Add(child); 4564control.Controls.Add(child1); 4565control.Controls.Add(child2); 4664control.Controls.Add(child1); 4665control.Controls.Add(child2); 6716control.Controls.Add(child); 6764control.Controls.Add(child); 6993parent.Controls.Add(child1); 6994parent.Controls.Add(child2); 6995Assert.Equal(new Control[] { child1, child2 }, parent.Controls.Cast<Control>()); 7010Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 7019Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 7035parent.Controls.Add(child1); 7036parent.Controls.Add(child2); 7037Assert.Equal(new Control[] { child1, child2 }, parent.Controls.Cast<Control>()); 7059Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 7071Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 7090parent.Controls.Add(child1); 7091parent.Controls.Add(child2); 7092Assert.Equal(new Control[] { child1, child2 }, parent.Controls.Cast<Control>()); 7120Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 7135Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 7157parent.Controls.Add(child1); 7158parent.Controls.Add(child2); 7159Assert.Equal(new Control[] { child1, child2 }, parent.Controls.Cast<Control>()); 7182Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 7194Assert.Equal(new Control[] { child2, child1 }, parent.Controls.Cast<Control>()); 12281parent.Controls.Add(child1); 12282parent.Controls.Add(child2); 12328parent.Controls.Add(child1); 12329parent.Controls.Add(child2);
System\Windows\Forms\ControlTests.Properties.cs (78)
1294control.Controls.Add(child1); 1295control.Controls.Add(child2); 1324control.Controls.Add(child1); 1325control.Controls.Add(child2); 1442control.Controls.Add(child1); 1443control.Controls.Add(child2); 1528control.Controls.Add(child1); 1529control.Controls.Add(child2); 1694control.Controls.Add(child1); 1695control.Controls.Add(child2); 1724control.Controls.Add(child1); 1725control.Controls.Add(child2); 1813control.Controls.Add(child1); 1814control.Controls.Add(child2); 1906control.Controls.Add(child1); 1907control.Controls.Add(child2); 2260control.Controls.Add(child1); 2261control.Controls.Add(child2); 2353control.Controls.Add(child1); 2354control.Controls.Add(child2); 3660Assert.Same(result, control.Controls); 3661Assert.Same(control.Controls, control.Controls); 3675PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Controls)]; 3679Assert.Empty(control.Controls); 3683control.Controls.Add(child); 3684Assert.Same(child, Assert.Single(control.Controls)); 3688Assert.Same(child, Assert.Single(control.Controls)); 3695PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.Controls)]; 3699Assert.Empty(control.Controls); 3703control.Controls.Add(child); 3704Assert.Same(child, Assert.Single(control.Controls)); 3708Assert.Same(child, Assert.Single(control.Controls)); 3859control.Controls.Add(child1); 3860control.Controls.Add(child2); 3889control.Controls.Add(child1); 3890control.Controls.Add(child2); 3952control.Controls.Add(child1); 3953control.Controls.Add(child2); 4045control.Controls.Add(child1); 4046control.Controls.Add(child2); 4613control.Controls.Add(child1); 4614control.Controls.Add(child2); 4696control.Controls.Add(child1); 4697control.Controls.Add(child2); 5069control.Controls.Add(child1); 5070control.Controls.Add(child2); 5162control.Controls.Add(child1); 5163control.Controls.Add(child2); 5334control.Controls.Add(child1); 5335control.Controls.Add(child2); 5364control.Controls.Add(child1); 5365control.Controls.Add(child2); 5483control.Controls.Add(child1); 5484control.Controls.Add(child2); 5569control.Controls.Add(child1); 5570control.Controls.Add(child2); 9712Assert.Empty(oldParent.Controls); 9718Assert.Empty(oldParent.Controls); 9731Assert.Same(control, Assert.Single(parent.Controls)); 9737Assert.Same(control, Assert.Single(parent.Controls)); 9819control.Controls.Add(child); 9844control.Controls.Add(child); 9862control.Controls.Add(child); 10098control.Controls.Add(child1); 10099control.Controls.Add(child2); 10128control.Controls.Add(child1); 10129control.Controls.Add(child2); 10279control.Controls.Add(child1); 10280control.Controls.Add(child2); 10365control.Controls.Add(child1); 10366control.Controls.Add(child2); 12630control.Controls.Add(child1); 12631control.Controls.Add(child2); 12915control.Controls.Add(child1); 12916control.Controls.Add(child2); 12998control.Controls.Add(child1); 12999control.Controls.Add(child2);
System\Windows\Forms\DataGridViewCellTests.cs (7)
203form.Controls.Add(control); 846form.Controls.Add(control); 882form.Controls.Add(control); 4050form.Controls.Add(control); 4093form.Controls.Add(control); 4357form.Controls.Add(control); 5149form.Controls.Add(control);
System\Windows\Forms\DataGridViewHeaderCellTests.cs (2)
2416form.Controls.Add(control); 3683form.Controls.Add(control);
System\Windows\Forms\DataGridViewRowTests.cs (8)
111form.Controls.Add(control); 329form.Controls.Add(control); 356form.Controls.Add(control); 944form.Controls.Add(control); 1874form.Controls.Add(control); 2343form.Controls.Add(control); 4335form.Controls.Add(control); 4460form.Controls.Add(control);
System\Windows\Forms\DataGridViewTests.cs (5)
852Assert.Empty(oldParent.Controls); 858Assert.Empty(oldParent.Controls); 871Assert.Same(control, Assert.Single(parent.Controls)); 877Assert.Same(control, Assert.Single(parent.Controls)); 2363form.Controls.Add(dataGridView);
System\Windows\Forms\DataGridViewTests.Rendering.cs (2)
30form.Controls.Add(dataGrid); 160form.Controls.Add(dataGridView);
System\Windows\Forms\DataGridViewTextBoxEditingControlTests.cs (3)
54Assert.Empty(control.Controls); 55Assert.Same(control.Controls, control.Controls);
System\Windows\Forms\DateTimePickerTests.cs (3)
57Assert.Empty(control.Controls); 58Assert.Same(control.Controls, control.Controls);
System\Windows\Forms\Design\ComponentEditorFormTests.cs (3)
64Assert.NotEmpty(control.Controls); 65Assert.Same(control.Controls, control.Controls);
System\Windows\Forms\Design\ComponentEditorPageTests.cs (7)
52Assert.Empty(control.Controls); 53Assert.Same(control.Controls, control.Controls); 819Assert.Same(control, Assert.Single(result.Controls)); 827Assert.Same(control, Assert.Single(result.Controls)); 835Assert.Same(control, Assert.Single(result.Controls)); 843Assert.Same(control, Assert.Single(result.Controls));
System\Windows\Forms\DomainUpDownTests.cs (3)
75_sub.Controls.Should().NotBeNull(); 76_sub.Controls.Should().BeSameAs(_sub.Controls);
System\Windows\Forms\FlowLayoutPanelTests.cs (3)
50Assert.Empty(control.Controls); 51Assert.Same(control.Controls, control.Controls);
System\Windows\Forms\FormTests.cs (9)
63Assert.Empty(control.Controls); 64Assert.Same(control.Controls, control.Controls); 965Assert.Empty(oldParent.Controls); 972Assert.Empty(oldParent.Controls); 1108Assert.Same(control, Assert.Single(parent.Controls)); 1114Assert.Same(control, Assert.Single(parent.Controls)); 1233parent.Controls.Add(menuStrip); 2604parent.Controls.Add(control);
System\Windows\Forms\GroupBoxTests.cs (4)
46Assert.Empty(control.Controls); 47Assert.Same(control.Controls, control.Controls); 931control.Controls.Add(child);
System\Windows\Forms\HScrollBarTests.cs (3)
50Assert.Empty(control.Controls); 51Assert.Same(control.Controls, control.Controls);
System\Windows\Forms\LabelTests.cs (4)
46Assert.Empty(control.Controls); 47Assert.Same(control.Controls, control.Controls); 298form.Controls.Add(label);
System\Windows\Forms\Layout\FlowLayoutTests.cs (28)
76control.Controls.Add(child1); 77control.Controls.Add(child2); 78control.Controls.Add(largeChild); 79control.Controls.Add(emptyChild); 80control.Controls.Add(emptyChildWithMargin); 81control.Controls.Add(child3); 82control.Controls.Add(child4); 137control.Controls.Add(child1); 138control.Controls.Add(child2); 139control.Controls.Add(largeChild); 140control.Controls.Add(emptyChild); 141control.Controls.Add(emptyChildWithMargin); 142control.Controls.Add(child3); 143control.Controls.Add(child4); 198control.Controls.Add(child1); 199control.Controls.Add(child2); 200control.Controls.Add(largeChild); 201control.Controls.Add(emptyChild); 202control.Controls.Add(emptyChildWithMargin); 203control.Controls.Add(child3); 204control.Controls.Add(child4); 259control.Controls.Add(child1); 260control.Controls.Add(child2); 261control.Controls.Add(largeChild); 262control.Controls.Add(emptyChild); 263control.Controls.Add(emptyChildWithMargin); 264control.Controls.Add(child3); 265control.Controls.Add(child4);
System\Windows\Forms\ListBoxTests.cs (3)
48Assert.Empty(control.Controls); 49Assert.Same(control.Controls, control.Controls);
System\Windows\Forms\ListControlTests.cs (3)
47Assert.Empty(control.Controls); 48Assert.Same(control.Controls, control.Controls);
System\Windows\Forms\ListViewTests.cs (3)
61Assert.Empty(control.Controls); 62Assert.Same(control.Controls, control.Controls);
System\Windows\Forms\MdiClientTests.cs (4)
43Assert.Same(control, Assert.IsType<MdiClient.ControlCollection>(control.Controls).Owner); 44Assert.Empty(control.Controls); 45Assert.Same(control.Controls, control.Controls);
System\Windows\Forms\MdiControlStripTests.cs (3)
210mdiParent.Controls.Add(menuStrip); 256mdiParent.Controls.Add(menuStrip); 321mdiParent.Controls.Add(menuStrip);
System\Windows\Forms\MixedDpiHostingTests.cs (1)
30form.Controls.Add(control);
System\Windows\Forms\MonthCalendarTests.cs (3)
59Assert.Empty(control.Controls); 60Assert.Same(control.Controls, control.Controls);
System\Windows\Forms\PanelTests.cs (5)
50Assert.Empty(control.Controls); 51Assert.Same(control.Controls, control.Controls); 618control.Controls.Add(child); 633control.Controls.Add(child);
System\Windows\Forms\PictureBoxTests.cs (7)
49Assert.Empty(control.Controls); 50Assert.Same(control.Controls, control.Controls); 1150Assert.Empty(oldParent.Controls); 1155Assert.Empty(oldParent.Controls); 1167Assert.Same(control, Assert.Single(parent.Controls)); 1172Assert.Same(control, Assert.Single(parent.Controls));
System\Windows\Forms\ProgressBarTests.cs (3)
45Assert.Empty(control.Controls); 46Assert.Same(control.Controls, control.Controls);
System\Windows\Forms\RadioButtonRendererTests.cs (4)
22form.Controls.Add(control); 53form.Controls.Add(control); 90form.Controls.Add(control); 119form.Controls.Add(control);
System\Windows\Forms\RadioButtonTests.cs (3)
51Assert.Empty(control.Controls); 52Assert.Same(control.Controls, control.Controls);
System\Windows\Forms\RichTextBoxTests.cs (3)
60Assert.Empty(control.Controls); 61Assert.Same(control.Controls, control.Controls);
System\Windows\Forms\ScrollableControlTests.cs (10)
49Assert.Empty(control.Controls); 50Assert.Same(control.Controls, control.Controls); 235control.Controls.Add(child); 2342control.Controls.Add(child); 2414control.Controls.Add(child); 2513parentControl.Controls.Add(childControl); 2522parentControl.Controls.Add(childControl); 2541control.Controls.Add(activeControl.Parent ?? activeControl); 2547control.Controls.Clear();
System\Windows\Forms\ScrollBarTests.cs (3)
44Assert.Empty(control.Controls); 45Assert.Same(control.Controls, control.Controls);
System\Windows\Forms\SplitterPanelTests.cs (3)
54Assert.Empty(control.Controls); 55Assert.Same(control.Controls, control.Controls);
System\Windows\Forms\SplitterTests.cs (3)
45Assert.Empty(control.Controls); 46Assert.Same(control.Controls, control.Controls);
System\Windows\Forms\StatusStripTests.Rendering.cs (1)
24form.Controls.Add(statusStrip);
System\Windows\Forms\TabControl.ControlCollectionTests.cs (17)
49TabControl.ControlCollection collection = Assert.IsType<TabControl.ControlCollection>(owner.Controls); 172TabControl.ControlCollection collection = Assert.IsType<TabControl.ControlCollection>(owner.Controls); 332TabControl.ControlCollection collection = Assert.IsType<TabControl.ControlCollection>(owner.Controls); 473TabControl.ControlCollection collection = Assert.IsType<TabControl.ControlCollection>(owner.Controls); 667TabControl.ControlCollection collection = Assert.IsType<TabControl.ControlCollection>(owner.Controls); 701TabControl.ControlCollection collection = Assert.IsType<TabControl.ControlCollection>(owner.Controls); 724TabControl.ControlCollection collection = Assert.IsType<TabControl.ControlCollection>(owner.Controls); 735TabControl.ControlCollection collection = Assert.IsType<TabControl.ControlCollection>(owner.Controls); 766TabControl.ControlCollection collection = Assert.IsType<TabControl.ControlCollection>(owner.Controls); 834TabControl.ControlCollection collection = Assert.IsType<TabControl.ControlCollection>(owner.Controls); 1123TabControl.ControlCollection collection = Assert.IsType<TabControl.ControlCollection>(owner.Controls); 1235TabControl.ControlCollection collection = Assert.IsType<TabControl.ControlCollection>(owner.Controls); 1359TabControl.ControlCollection collection = Assert.IsType<TabControl.ControlCollection>(owner.Controls); 1396TabControl.ControlCollection collection = Assert.IsType<TabControl.ControlCollection>(owner.Controls); 1430TabControl.ControlCollection collection = Assert.IsType<TabControl.ControlCollection>(owner.Controls); 1475TabControl.ControlCollection collection = Assert.IsType<TabControl.ControlCollection>(owner.Controls); 1533TabControl.ControlCollection collection = Assert.IsType<TabControl.ControlCollection>(owner.Controls);
System\Windows\Forms\TabControl.TabPageCollectionTests.cs (64)
57Assert.Same(value1, Assert.Single(owner.Controls)); 76Assert.Equal(new Control[] { value1, value2 }, owner.Controls.Cast<Control>()); 105Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 190Assert.Same(value1, Assert.Single(owner.Controls)); 218Assert.Equal(new Control[] { value1, value2 }, owner.Controls.Cast<Control>()); 260Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 360Assert.Same(value1, Assert.Single(owner.Controls)); 382Assert.Equal(new Control[] { value1, value2 }, owner.Controls.Cast<Control>()); 417Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 511Assert.Same(value1, Assert.Single(owner.Controls)); 542Assert.Equal(new Control[] { value1, value2 }, owner.Controls.Cast<Control>()); 590Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 748Assert.Equal(items, owner.Controls.Cast<Control>()); 1314Assert.Empty(owner.Controls); 1323Assert.Empty(owner.Controls); 1365Assert.Empty(owner.Controls); 1380Assert.Empty(owner.Controls); 1421Assert.Empty(owner.Controls); 1433Assert.Empty(owner.Controls); 1486Assert.Empty(owner.Controls); 1504Assert.Empty(owner.Controls); 1999Assert.Same(value1, Assert.Single(owner.Controls)); 2018Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 2049Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 2127Assert.Same(value1, Assert.Single(owner.Controls)); 2155Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 2199Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 2303Assert.Same(value1, Assert.Single(owner.Controls)); 2325Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 2362Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 2460Assert.Same(value1, Assert.Single(owner.Controls)); 2491Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 2541Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 2698Assert.Equal(items, owner.Controls.Cast<TabPage>()); 3045Assert.Same(value1, Assert.Single(owner.Controls)); 3064Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 3095Assert.Equal(new Control[] { value2, value1 }, owner.Controls.Cast<Control>()); 3380Assert.Equal(new Control[] { page1, page2, page3 }, owner.Controls.Cast<Control>()); 3425Assert.Equal(new Control[] { page1, page2, page3 }, owner.Controls.Cast<Control>()); 3465Assert.Equal(new Control[] { page1, page2, page3 }, owner.Controls.Cast<Control>()); 3521Assert.Equal(new Control[] { page1, page2, page3 }, owner.Controls.Cast<Control>()); 3779Assert.Equal(new Control[] { page1, page2, page3 }, owner.Controls.Cast<Control>()); 3823Assert.Equal(new Control[] { page1, page2, page3 }, owner.Controls.Cast<Control>()); 3862Assert.Equal(new Control[] { page1, page2, page3 }, owner.Controls.Cast<Control>()); 3917Assert.Equal(new Control[] { page1, page2, page3 }, owner.Controls.Cast<Control>()); 4011Assert.Same(value1, Assert.Single(owner.Controls)); 4032Assert.Same(value1, Assert.Single(owner.Controls)); 4053Assert.Empty(owner.Controls); 4126Assert.Same(value1, Assert.Single(owner.Controls)); 4150Assert.Same(value1, Assert.Single(owner.Controls)); 4177Assert.Empty(owner.Controls); 4249Assert.Same(value1, Assert.Single(owner.Controls)); 4273Assert.Same(value1, Assert.Single(owner.Controls)); 4297Assert.Empty(owner.Controls); 4373Assert.Same(value1, Assert.Single(owner.Controls)); 4397Assert.Same(value1, Assert.Single(owner.Controls)); 4424Assert.Empty(owner.Controls); 5016Assert.Equal(page2, TabControl.Controls[1]); 5022Assert.Equal(page3, TabControl.Controls[1]); 5024Assert.Equal(page2, TabControl.Controls[2]); 5040Assert.Equal(page1, TabControl.Controls[0]); 5046Assert.Equal(page2, TabControl.Controls[1]); 5052Assert.Equal(page3, TabControl.Controls[1]); 5054Assert.Equal(page2, TabControl.Controls[2]);
System\Windows\Forms\TabControlTests.cs (18)
47Assert.Empty(control.Controls); 48Assert.Same(control.Controls, control.Controls); 4858Assert.Empty(control.Controls); 4866Assert.Empty(control.Controls); 4875Assert.Empty(control.Controls); 4891Assert.Equal(new Control[] { page1, page2 }, control.Controls.Cast<Control>()); 4899Assert.Equal(new Control[] { page1, page2 }, control.Controls.Cast<Control>()); 4908Assert.Equal(new Control[] { page1, page2 }, control.Controls.Cast<Control>()); 4981Assert.Empty(control.Controls); 4989Assert.Empty(control.Controls); 5027Assert.Empty(control.Controls); 5041Assert.Empty(control.Controls); 5080Assert.Empty(control.Controls); 5091Assert.Empty(control.Controls); 5140Assert.Empty(control.Controls); 5157Assert.Empty(control.Controls); 5717form.Controls.Add(control);
System\Windows\Forms\TableLayoutPanelTests.cs (2)
338PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(TableLayoutPanel))[nameof(Control.Controls)]; 358PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(TableLayoutPanel))[nameof(Control.Controls)];
System\Windows\Forms\TabPageTests.cs (12)
54Assert.Empty(control.Controls); 55Assert.Same(control.Controls, control.Controls); 56Assert.IsType<TabPage.TabPageControlCollection>(control.Controls); 163Assert.Empty(control.Controls); 164Assert.Same(control.Controls, control.Controls); 165Assert.IsType<TabPage.TabPageControlCollection>(control.Controls); 2510Assert.Empty(oldParent.Controls); 2516Assert.Empty(oldParent.Controls); 2529Assert.Same(control, Assert.Single(parent.Controls)); 2535Assert.Same(control, Assert.Single(parent.Controls));
System\Windows\Forms\TabPageTests.TabPageControlCollection.cs (4)
32TabPage.TabPageControlCollection collection = Assert.IsType<TabPage.TabPageControlCollection>(owner.Controls); 56Assert.Same(control1, Assert.Single(owner.Controls)); 69Assert.Equal(new Control[] { control1, control2 }, owner.Controls.Cast<Control>()); 85Assert.Equal(new Control[] { control2, control1 }, owner.Controls.Cast<Control>());
System\Windows\Forms\TextBoxRendererTests.cs (3)
29form.Controls.Add(textbox); 58form.Controls.Add(textbox); 93form.Controls.Add(textbox);
System\Windows\Forms\ToolStripButtonTests.Rendering.cs (6)
23form.Controls.Add(toolStrip); 49form.Controls.Add(toolStrip); 73form.Controls.Add(toolStrip); 99form.Controls.Add(toolStrip); 125form.Controls.Add(toolStrip); 152form.Controls.Add(toolStrip);
System\Windows\Forms\ToolStripContentPanelTests.cs (3)
52Assert.Empty(control.Controls); 53Assert.Same(control.Controls, control.Controls);
System\Windows\Forms\ToolStripControlHostTests.cs (4)
3069Assert.Empty(c.Controls); 3091Assert.Empty(c.Controls); 3258Assert.Empty(c.Controls); 3280Assert.Empty(c.Controls);
System\Windows\Forms\ToolStripPanelRow.ToolStripPanelRowControlCollectionTests.cs (3)
25toolStripContainer.TopToolStripPanel.Controls.Add(toolStrip1); 26toolStripContainer.TopToolStripPanel.Controls.Add(toolStrip2); 31form.Controls.Add(toolStripContainer);
System\Windows\Forms\ToolStripPanelTests.cs (5)
51Assert.Empty(control.Controls); 52Assert.Same(control.Controls, control.Controls); 351toolStripContainer.TopToolStripPanel.Controls.Add(toolStrip1); 352var exception = Record.Exception(() => toolStripContainer.TopToolStripPanel.Controls.Add(toolStrip2));
System\Windows\Forms\ToolStripSettingsManagerTests.cs (1)
19mainForm.Controls.Add(toolStrip);
System\Windows\Forms\ToolStripTests.cs (2)
1635form.Controls.Add(toolStrip1); 1655form.Controls.Add(toolStrip1);
System\Windows\Forms\ToolStripTests.Rendering.cs (1)
22form.Controls.Add(toolStrip);
System\Windows\Forms\ToolTipTests.cs (6)
810topLevelControl.Controls.Add(control); 844tabControl.Controls.Add(tabPage); 845form.Controls.Add(tabControl); 886tabControl.Controls.Add(tabPage1); 887tabControl.Controls.Add(tabPage2); 888form.Controls.Add(tabControl);
System\Windows\Forms\TreeViewTests.cs (3)
47Assert.Empty(control.Controls); 48Assert.Same(control.Controls, control.Controls);
System\Windows\Forms\UpDownBaseTests.cs (3)
62Assert.NotEmpty(control.Controls); 63Assert.Same(control.Controls, control.Controls);
System\Windows\Forms\UserControlTests.cs (29)
55Assert.Empty(control.Controls); 56Assert.Same(control.Controls, control.Controls); 1264child1.Controls.Add(grandchild1); 1267child2.Controls.Add(grandchild2); 1270child3.Controls.Add(grandchild3); 1289control.Controls.Add(child1); 1290control.Controls.Add(child2); 1291control.Controls.Add(child3); 1292control.Controls.Add(child4); 1293control.Controls.Add(child5); 1294control.Controls.Add(child6); 1295control.Controls.Add(child7); 1296control.Controls.Add(child8); 1490child1.Controls.Add(grandchild1); 1493child2.Controls.Add(grandchild2); 1496child3.Controls.Add(grandchild3); 1515control.Controls.Add(child1); 1516control.Controls.Add(child2); 1517control.Controls.Add(child3); 1518control.Controls.Add(child4); 1519control.Controls.Add(child5); 1520control.Controls.Add(child6); 1521control.Controls.Add(child7); 1522control.Controls.Add(child8); 1725control.Controls.Add(child1); 1726control.Controls.Add(child2); 1755control.Controls.Add(child1); 1756control.Controls.Add(child2);
System\Windows\Forms\VScrollBarTests.cs (3)
49Assert.Empty(control.Controls); 50Assert.Same(control.Controls, control.Controls);
System\Windows\Forms\WebBrowserTests.cs (22)
44Assert.Empty(control.Controls); 45Assert.Same(control.Controls, control.Controls); 1408Assert.Same(control, Assert.Single(parent.Controls)); 1413Assert.Same(control, Assert.Single(parent.Controls)); 2530Assert.Empty(control.Controls); 2545Assert.Empty(control.Controls); 2556Assert.Empty(control.Controls); 2585Assert.Empty(control.Controls); 2600Assert.Empty(control.Controls); 2611Assert.Empty(control.Controls); 2633Assert.Empty(control.Controls); 2648Assert.Empty(control.Controls); 2659Assert.Empty(control.Controls); 2692Assert.Empty(control.Controls); 2703Assert.Empty(control.Controls); 2732Assert.Empty(control.Controls); 2747Assert.Empty(control.Controls); 2758Assert.Empty(control.Controls); 2784Assert.Empty(control.Controls); 2795Assert.Empty(control.Controls); 4773form.Controls.Add(browser);
TextBoxTests.cs (3)
53Assert.Empty(control.Controls); 54Assert.Same(control.Controls, control.Controls);
TextBoxTests.Rendering.cs (1)
25form.Controls.Add(textBox);
TrackBarTests.cs (3)
46Assert.Empty(control.Controls); 47Assert.Same(control.Controls, control.Controls);
System.Windows.Forms.UI.IntegrationTests (27)
AnchorLayoutTests.cs (12)
62form.Controls.Remove(button); 85form.Controls.Add(button); 106form.Controls.Add(button); 128form.Controls.Add(button); 149container.Controls.Add(button); 154form.Controls.Add(container); 178container.Controls.Add(button); 183form.Controls.Add(container); 192container.Controls.Remove(button); 196form.Controls.Add(button); 212form.Controls.Add(button); 246form.Controls.Add(button);
DesignBehaviorsTests.cs (1)
86form.Controls.Add(rootView);
Dpi\SplitContainerTests.cs (1)
59form.Controls.Add(splitContainer);
DragDropTests.cs (3)
695Controls.AddRange( 989Controls.AddRange( 1038Controls.Add(tableLayoutPanel);
ImageListTests.cs (1)
113form.Controls.Add(listView1);
Infra\ControlTestBase.cs (3)
236form.Controls.Add(control); 264form.Controls.Add(control); 293form.Controls.Add(tableLayout);
ListBoxAccesibleObjectTests.cs (2)
17form.Controls.Add(listBox); 18form.Controls.Add(textBox);
MenuStripTests.cs (1)
21form.Controls.Add(menuStrip);
TabControlTests.cs (1)
118Assert.Equal(tabControl.Controls[i], tabControl.TabPages[i]);
ToolStripTests.cs (2)
43form.Controls.Add(toolStrip); 82form.Controls.Add(menuStrip);
TestPassApp (203)
CommonControl1.Designer.cs (48)
95this.groupBox1.Controls.Add(this.button12); 96this.groupBox1.Controls.Add(this.button1); 97this.groupBox1.Controls.Add(this.button10); 98this.groupBox1.Controls.Add(this.button9); 99this.groupBox1.Controls.Add(this.button8); 100this.groupBox1.Controls.Add(this.button3); 101this.groupBox1.Controls.Add(this.button4); 102this.groupBox1.Controls.Add(this.button5); 103this.groupBox1.Controls.Add(this.button2); 104this.groupBox1.Controls.Add(this.button6); 228this.groupBox2.Controls.Add(this.checkedListBox1); 229this.groupBox2.Controls.Add(this.label7); 230this.groupBox2.Controls.Add(this.checkBox3); 231this.groupBox2.Controls.Add(this.checkBox2); 232this.groupBox2.Controls.Add(this.checkBox1); 303this.groupBox3.Controls.Add(this.comboBox2); 304this.groupBox3.Controls.Add(this.label11); 305this.groupBox3.Controls.Add(this.comboBox1); 306this.groupBox3.Controls.Add(this.label10); 369this.groupBox4.Controls.Add(this.listView1); 370this.groupBox4.Controls.Add(this.label8); 406this.groupBox5.Controls.Add(this.linkLabel6); 407this.groupBox5.Controls.Add(this.linkLabel5); 408this.groupBox5.Controls.Add(this.linkLabel4); 409this.groupBox5.Controls.Add(this.linkLabel3); 410this.groupBox5.Controls.Add(this.label6); 411this.groupBox5.Controls.Add(this.label5); 412this.groupBox5.Controls.Add(this.label4); 413this.groupBox5.Controls.Add(this.label3); 414this.groupBox5.Controls.Add(this.linkLabel2); 415this.groupBox5.Controls.Add(this.linkLabel1); 416this.groupBox5.Controls.Add(this.label2); 417this.groupBox5.Controls.Add(this.label1); 561this.groupBox6.Controls.Add(this.listBox1); 562this.groupBox6.Controls.Add(this.label12); 599this.groupBox7.Controls.Add(this.maskedTextBox1); 600this.groupBox7.Controls.Add(this.label9); 630this.groupBox8.Controls.Add(this.dateTimePicker3); 631this.groupBox8.Controls.Add(this.dateTimePicker2); 632this.groupBox8.Controls.Add(this.dateTimePicker1); 683this.Controls.Add(this.groupBox8); 684this.Controls.Add(this.groupBox7); 685this.Controls.Add(this.groupBox6); 686this.Controls.Add(this.groupBox5); 687this.Controls.Add(this.groupBox4); 688this.Controls.Add(this.groupBox3); 689this.Controls.Add(this.groupBox2); 690this.Controls.Add(this.groupBox1);
CommonControl2.Designer.cs (17)
262this.Controls.Add(this.label1); 263this.Controls.Add(this.monthCalendar1); 264this.Controls.Add(this.label2); 265this.Controls.Add(this.numericUpDown1); 266this.Controls.Add(this.label3); 267this.Controls.Add(this.pictureBox1); 268this.Controls.Add(this.label4); 269this.Controls.Add(this.progressBar1); 270this.Controls.Add(this.radioButton1); 271this.Controls.Add(this.label5); 272this.Controls.Add(this.richTextBox1); 273this.Controls.Add(this.label6); 274this.Controls.Add(this.textBox1); 275this.Controls.Add(this.label7); 276this.Controls.Add(this.treeView1); 277this.Controls.Add(this.label8); 278this.Controls.Add(this.webBrowser1);
ContainerControls.Designer.cs (53)
124this.flowLayoutPanel2.Controls.Add(this.button2); 125this.flowLayoutPanel2.Controls.Add(this.button5); 126this.flowLayoutPanel2.Controls.Add(this.button6); 196this.groupBox1.Controls.Add(this.button7); 218this.groupBox2.Controls.Add(this.button8); 241this.groupBox3.Controls.Add(this.button9); 264this.groupBox4.Controls.Add(this.button10); 419this.tabControl5.Controls.Add(this.tabPage9); 420this.tabControl5.Controls.Add(this.tabPage10); 430this.tabPage9.Controls.Add(this.button19); 452this.tabPage10.Controls.Add(this.tabControl6); 464this.tabControl6.Controls.Add(this.tabPage11); 465this.tabControl6.Controls.Add(this.tabPage12); 476this.tabPage11.Controls.Add(this.button20); 498this.tabPage12.Controls.Add(this.button21); 523this.flowLayoutPanel1.Controls.Add(this.button4); 524this.flowLayoutPanel1.Controls.Add(this.button1); 525this.flowLayoutPanel1.Controls.Add(this.button3); 575this.panel2.Controls.Add(this.tabControl2); 584this.tabControl2.Controls.Add(this.tabPage1); 585this.tabControl2.Controls.Add(this.tabPage2); 606this.tabPage2.Controls.Add(this.button12); 640this.panel1.Controls.Add(this.tabControl1); 649this.tabControl1.Controls.Add(this.tabPage3); 650this.tabControl1.Controls.Add(this.tabPage4); 660this.tabPage3.Controls.Add(this.button11); 682this.tabPage4.Controls.Add(this.button13); 706this.flowLayoutPanel3.Controls.Add(this.button14); 707this.flowLayoutPanel3.Controls.Add(this.button22); 708this.flowLayoutPanel3.Controls.Add(this.button23); 747this.panel3.Controls.Add(this.tabControl3); 756this.tabControl3.Controls.Add(this.tabPage5); 757this.tabControl3.Controls.Add(this.tabPage6); 778this.tabPage6.Controls.Add(this.button24); 804this.Controls.Add(this.panel3); 805this.Controls.Add(this.flowLayoutPanel3); 806this.Controls.Add(this.panel1); 807this.Controls.Add(this.label5); 808this.Controls.Add(this.label1); 809this.Controls.Add(this.flowLayoutPanel1); 810this.Controls.Add(this.tabControl5); 811this.Controls.Add(this.label10); 812this.Controls.Add(this.label7); 813this.Controls.Add(this.label6); 814this.Controls.Add(this.panel2); 815this.Controls.Add(this.groupBox4); 816this.Controls.Add(this.groupBox3); 817this.Controls.Add(this.groupBox2); 818this.Controls.Add(this.groupBox1); 819this.Controls.Add(this.label4); 820this.Controls.Add(this.label2); 821this.Controls.Add(this.label3); 822this.Controls.Add(this.flowLayoutPanel2);
ContainerControls2.Designer.cs (20)
91this.splitContainer1.Panel1.Controls.Add(this.button15); 97this.splitContainer1.Panel2.Controls.Add(this.button16); 359this.tabControl4.Controls.Add(this.tabPage7); 360this.tabControl4.Controls.Add(this.tabPage8); 421this.Controls.Add(this.tableLayoutPanel2); 422this.Controls.Add(this.label18); 423this.Controls.Add(this.tabControl4); 424this.Controls.Add(this.label17); 425this.Controls.Add(this.splitContainer2); 426this.Controls.Add(this.label16); 427this.Controls.Add(this.panel4); 428this.Controls.Add(this.label15); 429this.Controls.Add(this.groupBox5); 430this.Controls.Add(this.label14); 431this.Controls.Add(this.flowLayoutPanel4); 432this.Controls.Add(this.label13); 433this.Controls.Add(this.tableLayoutPanel1); 434this.Controls.Add(this.label9); 435this.Controls.Add(this.splitContainer1); 436this.Controls.Add(this.label8);
DataBindingExample.Designer.cs (19)
111this.panel1.Controls.Add(this.comboBox1); 112this.panel1.Controls.Add(this.label1); 113this.panel1.Controls.Add(this.textBox1); 114this.panel1.Controls.Add(this.button1); 115this.panel1.Controls.Add(this.linkLabel1); 116this.panel1.Controls.Add(this.maskedTextBox1); 117this.panel1.Controls.Add(this.checkBox1); 118this.panel1.Controls.Add(this.richTextBox1); 119this.panel1.Controls.Add(this.domainUpDown1); 120this.panel1.Controls.Add(this.numericUpDown1); 121this.panel1.Controls.Add(this.radioButton1); 274this.Controls.Add(this.dataGridView1); 275this.Controls.Add(this.panel1); 276this.Controls.Add(this.label2); 277this.Controls.Add(this.treeView1); 278this.Controls.Add(this.listBox1); 279this.Controls.Add(this.label3); 280this.Controls.Add(this.listView1); 281this.Controls.Add(this.label4);
DataControls.Designer.cs (3)
353this.Controls.Add(this.dataGridView2); 354this.Controls.Add(this.dataGridView1); 355this.Controls.Add(this.bindingNavigator1);
DialogControls.Designer.cs (4)
85this.Controls.Add(this.SaveFileDialog); 86this.Controls.Add(this.OpenFileDialog); 87this.Controls.Add(this.FolderBrowserDialog); 88this.Controls.Add(this.ColorDialog);
Main.Designer.cs (11)
169this.Controls.Add(this.button12); 170this.Controls.Add(this.button10); 171this.Controls.Add(this.button9); 172this.Controls.Add(this.button8); 173this.Controls.Add(this.button7); 174this.Controls.Add(this.button6); 175this.Controls.Add(this.button5); 176this.Controls.Add(this.button4); 177this.Controls.Add(this.button3); 178this.Controls.Add(this.button2); 179this.Controls.Add(this.button1);
Menu_Toolbars_controls.Designer.cs (3)
595Controls.Add(toolStrip1); 596Controls.Add(statusStrip1); 597Controls.Add(menuStrip1);
MenuForm.Designer.cs (2)
62this.Controls.Add(this.button2); 63this.Controls.Add(this.button1);
PrintingControls.cs (2)
61((ToolStripButton)((ToolStrip)printPreviewDialog1.Controls[1]).Items[0]).Enabled = false;// disable the direct print from printpreview.as when we click that Print button PrintPage event fires again. 62foreach (ToolStripItem item in ((ToolStrip)printPreviewDialog1.Controls[1]).Items)
PrintingControls.Designer.cs (8)
162this.Controls.Add(this.printPreviewControl1); 163this.Controls.Add(this.label2); 164this.Controls.Add(this.button1); 165this.Controls.Add(this.btnPrint); 166this.Controls.Add(this.btnPreView); 167this.Controls.Add(this.btnSetting); 168this.Controls.Add(this.txtPrint); 169this.Controls.Add(this.label1);
RemainingControls.Designer.cs (8)
119this.Controls.Add(this.trackBar1); 120this.Controls.Add(this.label2); 121this.Controls.Add(this.domainUpDown1); 122this.Controls.Add(this.label1); 123this.Controls.Add(this.propertyGrid2); 124this.Controls.Add(this.propertyGrid1); 125this.Controls.Add(this.vScrollBar1); 126this.Controls.Add(this.hScrollBar1);
ToolStripContainer.Designer.cs (5)
102this.toolStripContainer2.ContentPanel.Controls.Add(this.toolStrip1); 103this.toolStripContainer2.ContentPanel.Controls.Add(this.statusStrip1); 115this.toolStripContainer2.TopToolStripPanel.Controls.Add(this.menuStrip1); 594this.Controls.Add(this.button1); 595this.Controls.Add(this.toolStripContainer2);
TrimTest (4)
Form1.Designer.cs (4)
52splitContainer1.Panel1.Controls.Add(textBox1); 56splitContainer1.Panel2.Controls.Add(button1); 57splitContainer1.Panel2.Controls.Add(comboBox1); 101Controls.Add(splitContainer1);
TrimTestBinaryDeserialization (1)
Form1.Designer.cs (1)
61Controls.Add(listView1);
UnsupportedTypes (3)
CreateFrameworkTypes.cs (3)
75form.Controls.Add(dataGrid); 129form.Controls.Add(toolBar); 162form.Controls.Add(statusBar);
WindowsFormsIntegration (3)
System\Windows\Integration\WindowsFormsHost.cs (3)
736{ Controls.Remove(Child); } 739{ Controls.Add(value); } 813Controls.Add(_focusTarget);
WinFormsControlsTest (308)
AnchorLayoutTests.Designer.cs (9)
141this.Controls.Add(this.button9); 142this.Controls.Add(this.button8); 143this.Controls.Add(this.button7); 144this.Controls.Add(this.button6); 145this.Controls.Add(this.button5); 146this.Controls.Add(this.button4); 147this.Controls.Add(this.button3); 148this.Controls.Add(this.button2); 149this.Controls.Add(this.button1);
Buttons.cs (4)
38Controls.Add(table); 58panel.Controls.Add(radioButton); 79panel.Controls.Add(checkBox); 101panel.Controls.Add(button);
Calendar.Designer.cs (16)
235this.Controls.Add(this.currentDPILabel1); 236this.Controls.Add(this.label5); 237this.Controls.Add(this.showTodayCheckBox); 238this.Controls.Add(this.showWeekNumbersCheckBox); 239this.Controls.Add(this.resetMaxDateButton); 240this.Controls.Add(this.resetMinDateButton); 241this.Controls.Add(this.label4); 242this.Controls.Add(this.daysOfWeekComboBox); 243this.Controls.Add(this.label3); 244this.Controls.Add(this.label2); 245this.Controls.Add(this.setMaxDateButton); 246this.Controls.Add(this.maxDateDateTimePicker); 247this.Controls.Add(this.label1); 248this.Controls.Add(this.setMinDateButton); 249this.Controls.Add(this.minDateDateTimePicker); 250this.Controls.Add(this.monthCalendar1);
ChartControl.Designer.cs (4)
416this.Controls.Add(this.chart4); 417this.Controls.Add(this.chart3); 418this.Controls.Add(this.chart2); 419this.Controls.Add(this.chart1);
CollectionEditors.Designer.cs (7)
109this.Controls.Add(this.domainUpDown1); 110this.Controls.Add(this.label1); 111this.Controls.Add(this.propertyGrid1); 112this.Controls.Add(this.listView1); 113this.Controls.Add(this.textBox1); 114this.Controls.Add(this.maskedTextBox1); 115this.Controls.Add(this.comboBox1);
ComboBoxes.Designer.cs (16)
269this.Controls.Add(this.currentDPILabel1); 270this.Controls.Add(this.label1); 271this.Controls.Add(this.dataBoundLabel); 272this.Controls.Add(this.dataBoundComboBox); 273this.Controls.Add(this.comboBox9); 274this.Controls.Add(this.comboBox10); 275this.Controls.Add(this.comboBox11); 276this.Controls.Add(this.comboBox12); 277this.Controls.Add(this.comboBox8); 278this.Controls.Add(this.comboBox7); 279this.Controls.Add(this.comboBox6); 280this.Controls.Add(this.comboBox5); 281this.Controls.Add(this.comboBox4); 282this.Controls.Add(this.comboBox3); 283this.Controls.Add(this.comboBox2); 284this.Controls.Add(this.comboBox1);
ComboBoxesWithScrollBars.Designer.cs (22)
107this.changeHeightGroupBox1.Controls.Add(this.label1); 108this.changeHeightGroupBox1.Controls.Add(this.changeDDH_UpDown1); 109this.changeHeightGroupBox1.Controls.Add(this.label2); 110this.changeHeightGroupBox1.Controls.Add(this.changeCBHeight_UpDown2); 111this.changeHeightGroupBox1.Controls.Add(this.label3); 112this.changeHeightGroupBox1.Controls.Add(this.changeDDH_UpDown3); 197this.changeMaxDropDownItemsGroupBox2.Controls.Add(this.maxDropDownItemsUpDown1); 198this.changeMaxDropDownItemsGroupBox2.Controls.Add(this.maxDropDownItemsUpDown2); 199this.changeMaxDropDownItemsGroupBox2.Controls.Add(this.maxDropDownItemsUpDown3); 251this.changeIntegralHeightGroupBox3.Controls.Add(this.integralHeightCheckBox1); 252this.changeIntegralHeightGroupBox3.Controls.Add(this.integralHeightCheckBox2); 253this.changeIntegralHeightGroupBox3.Controls.Add(this.integralHeightCheckBox3); 298this.changeHeightsStyleGroupBox4.Controls.Add(this.useDifferentHeightsCheckBox1); 299this.changeHeightsStyleGroupBox4.Controls.Add(this.useDifferentHeightsCheckBox2); 300this.changeHeightsStyleGroupBox4.Controls.Add(this.useDifferentHeightsCheckBox3); 350this.Controls.Add(this.changeHeightGroupBox1); 351this.Controls.Add(this.changeMaxDropDownItemsGroupBox2); 352this.Controls.Add(this.changeIntegralHeightGroupBox3); 353this.Controls.Add(this.changeHeightsStyleGroupBox4); 354this.Controls.Add(this.comboBox1); 355this.Controls.Add(this.comboBox2); 356this.Controls.Add(this.comboBox3);
CustomComCtl32Button.cs (1)
72Controls.Add(control);
DataGridViewInVirtualModeTest.Designer.cs (1)
86this.Controls.Add(this.dataGridView1);
DataGridViewTest.Designer.cs (6)
210this.Controls.Add(this.resetFontButton); 211this.Controls.Add(this.label1); 212this.Controls.Add(this.numericUpDown1); 213this.Controls.Add(this.currentDPILabel1); 214this.Controls.Add(this.changeFontButton); 215this.Controls.Add(this.dataGridView1);
DateTimePicker.Designer.cs (5)
98this.Controls.Add(dateTimePicker5); 99this.Controls.Add(dateTimePicker4); 100this.Controls.Add(dateTimePicker3); 101this.Controls.Add(dateTimePicker2); 102this.Controls.Add(dateTimePicker1);
DesignTimeAligned.Designer.cs (5)
97this.Controls.Add(this.currentDPILabel1); 98this.Controls.Add(this.textBox1); 99this.Controls.Add(this.button1); 100this.Controls.Add(this.label2); 101this.Controls.Add(this.label1);
Dialogs.Designer.cs (8)
123this.flowLayoutPanel1.Controls.Add(this.btnColorDialog); 124this.flowLayoutPanel1.Controls.Add(this.btnThreadExceptionDialog); 125this.flowLayoutPanel1.Controls.Add(this.btnPrintDialog); 126this.flowLayoutPanel1.Controls.Add(this.btnFolderBrowserDialog); 127this.flowLayoutPanel1.Controls.Add(this.btnOpenFileDialog); 128this.flowLayoutPanel1.Controls.Add(this.btnSaveFileDialog); 151this.Controls.Add(this.propertyGrid1); 152this.Controls.Add(this.flowLayoutPanel1);
DockLayoutTests.Designer.cs (5)
98this.Controls.Add(this.button5); 99this.Controls.Add(this.button4); 100this.Controls.Add(this.button2); 101this.Controls.Add(this.button3); 102this.Controls.Add(this.button1);
DragDrop.cs (1)
458Controls.Add(tableLayoutPanel);
DragDrop.Designer.cs (1)
200Controls.Add(tableLayoutPanel1);
ErrorProviderTest.Designer.cs (7)
131this.Controls.Add(this.label1); 132this.Controls.Add(this.label1_2); 133this.Controls.Add(this.textBox1); 134this.Controls.Add(this.label2); 135this.Controls.Add(this.label2_1); 136this.Controls.Add(this.textBox2); 137this.Controls.Add(this.submitButton);
FormBorderStyles.Designer.cs (2)
58this.Controls.Add(this.lblFormBorderStyle); 59this.Controls.Add(this.btnChangeFormBorderStyle);
FormOwnerTestForm.cs (1)
46Controls.Add(new Label()
FormShowInTaskbar.cs (2)
26Controls.Add(btnTest); 58form.Controls.Add(btnTest);
ListBoxes.Designer.cs (21)
229this.Controls.Add(this.label1); 230this.Controls.Add(this.listBox1); 231this.Controls.Add(this.textBox1); 232this.Controls.Add(this.addButton1); 233this.Controls.Add(this.deleteButton1); 234this.Controls.Add(this.label2); 235this.Controls.Add(this.listBox2); 236this.Controls.Add(this.textBox2); 237this.Controls.Add(this.addButton2); 238this.Controls.Add(this.deleteButton2); 239this.Controls.Add(this.label3); 240this.Controls.Add(this.listBox3); 241this.Controls.Add(this.textBox3); 242this.Controls.Add(this.addButton3); 243this.Controls.Add(this.deleteButton3); 244this.Controls.Add(this.label4); 245this.Controls.Add(this.listBox4); 246this.Controls.Add(this.textBox4); 247this.Controls.Add(this.addButton4); 248this.Controls.Add(this.deleteButton4); 249this.Controls.Add(this.propertyGrid);
ListViewTest.cs (1)
140Controls.Add(listView2);
ListViewTest.Designer.cs (5)
153this.Controls.Add(this.btnReplaceImageListView1); 154this.Controls.Add(this.btnLoadImagesListView1); 155this.Controls.Add(this.btnClearListView1); 156this.Controls.Add(this.listView1); 157this.Controls.Add(this.listView3);
MainForm.cs (5)
38overarchingFlowLayoutPanel.Controls.Add(button); 237overarchingFlowLayoutPanel.Controls[(int)MainFormControlsTabOrder.ButtonsButton].Focus(); 247foreach (Control control in overarchingFlowLayoutPanel.Controls) 291int padding = overarchingFlowLayoutPanel.Controls[0].Margin.All; 295((int)Math.Ceiling((overarchingFlowLayoutPanel.Controls.Count + 1) / 3.0) * (biggestButton.Height + (padding * 2)))
MainForm.Designer.cs (1)
51this.Controls.Add(this.overarchingFlowLayoutPanel);
MdiChild.cs (4)
64Controls.Add(_menuStrip); 68Controls.Remove(_menuStrip); 76MyParent.Controls.Add(MyParent.MainMenu); 80MyParent.Controls.Remove(MyParent.MainMenu);
MdiChild.Designer.cs (8)
47this.panel1.Controls.Add(this.chkRightToLeft); 48this.panel1.Controls.Add(this.chkChildAlign); 49this.panel1.Controls.Add(this.chkAddMenustrip); 50this.panel1.Controls.Add(this.chkAddParentMenustrip); 51this.panel1.Controls.Add(this.chkSetMenustrip); 52this.panel1.Controls.Add(this.chkSetParentMenustrip); 53this.panel1.Controls.Add(this.btnOpenChild); 143this.Controls.Add(this.panel1);
MediaPlayer.Designer.cs (1)
56this.Controls.Add(this.axWindowsMediaPlayer1);
MenuStripAndCheckedListBox.Designer.cs (2)
286this.Controls.Add(this.currentDpiLabel); 287this.Controls.Add(this.menuStrip1);
MessageBoxes.Designer.cs (1)
54this.Controls.Add(this.propertyGrid1);
MultipleControls.cs (1)
102Controls.Add(listView2);
MultipleControls.Designer.cs (21)
127this.tabControl1.Controls.Add(this.tabPage1); 128this.tabControl1.Controls.Add(this.tabPage2); 139this.tabPage1.Controls.Add(this.comboBox1); 158this.tabPage2.Controls.Add(this.checkBox1); 159this.tabPage2.Controls.Add(this.checkBox2); 214this.groupBox1.Controls.Add(this.radioButton2); 215this.groupBox1.Controls.Add(this.radioButton1); 302this.Controls.Add(this.checkedListBox2); 303this.Controls.Add(this.domainUpDown1); 304this.Controls.Add(this.numericUpDown1); 305this.Controls.Add(this.checkedListBox1); 306this.Controls.Add(this.groupBox1); 307this.Controls.Add(this.tabControl1); 308this.Controls.Add(this.textBox1); 309this.Controls.Add(this.richTextBox1); 310this.Controls.Add(this.maskedTextBox1); 311this.Controls.Add(this.label1); 312this.Controls.Add(this.button1); 313this.Controls.Add(this.progressBar1); 314this.Controls.Add(this.linkLabel1); 315this.Controls.Add(this.linkLabel2);
Panels.Designer.cs (1)
91this.Controls.Add(this.tableLayoutPanel1);
Password.Designer.cs (20)
240Controls.Add(label11); 241Controls.Add(label10); 242Controls.Add(label9); 243Controls.Add(label8); 244Controls.Add(label7); 245Controls.Add(label6); 246Controls.Add(label5); 247Controls.Add(label4); 248Controls.Add(label3); 249Controls.Add(textBox5); 250Controls.Add(textBox4); 251Controls.Add(button1); 252Controls.Add(textBox3); 253Controls.Add(maskedTextBox3); 254Controls.Add(maskedTextBox2); 255Controls.Add(maskedTextBox1); 256Controls.Add(label2); 257Controls.Add(label1); 258Controls.Add(textBox2); 259Controls.Add(textBox1);
PictureBoxes.Designer.cs (3)
84this.Controls.Add(this.imageUri); 85this.Controls.Add(this.btnloadImage); 86this.Controls.Add(this.pictureBox1);
PropertyGrid.Designer.cs (1)
52this.Controls.Add(this.propertyGrid1);
RichTextBoxes.cs (3)
132prompt.Controls.Add(textBox); 133prompt.Controls.Add(confirmation); 134prompt.Controls.Add(textLabel);
RichTextBoxes.Designer.cs (2)
65this.Controls.Add(this.richTextBox2); 66this.Controls.Add(this.richTextBox1);
ScalingBeforeChanges.Designer.cs (1)
52this.Controls.Add(this.checkBox1);
ScrollableControls.Designer.cs (33)
92flowLayoutPanel1.Controls.Add(button1); 93flowLayoutPanel1.Controls.Add(button2); 94flowLayoutPanel1.Controls.Add(button3); 95flowLayoutPanel1.Controls.Add(button4); 96flowLayoutPanel1.Controls.Add(button5); 160panel1.Controls.Add(button9); 161panel1.Controls.Add(button8); 162panel1.Controls.Add(button7); 163panel1.Controls.Add(button6); 223splitContainer1.Panel1.Controls.Add(button16); 224splitContainer1.Panel1.Controls.Add(button15); 225splitContainer1.Panel1.Controls.Add(button10); 230splitContainer1.Panel2.Controls.Add(button14); 231splitContainer1.Panel2.Controls.Add(button13); 232splitContainer1.Panel2.Controls.Add(button12); 233splitContainer1.Panel2.Controls.Add(button11); 312tabControl1.Controls.Add(tabPage1); 313tabControl1.Controls.Add(tabPage2); 323tabPage1.Controls.Add(button17); 439Controls.Add(listBox1); 440Controls.Add(label7); 441Controls.Add(label6); 442Controls.Add(treeView1); 443Controls.Add(textBox1); 444Controls.Add(label5); 445Controls.Add(label4); 446Controls.Add(tabControl1); 447Controls.Add(label3); 448Controls.Add(splitContainer1); 449Controls.Add(label2); 450Controls.Add(panel1); 451Controls.Add(label1); 452Controls.Add(flowLayoutPanel1);
ScrollBars.Designer.cs (9)
138this.Controls.Add(this.lblVValue); 139this.Controls.Add(this.lblHValue); 140this.Controls.Add(this.lblMaximum); 141this.Controls.Add(this.lblMinimum); 142this.Controls.Add(this.chbRightToLeft); 143this.Controls.Add(this.numericMaximum); 144this.Controls.Add(this.numericMinimum); 145this.Controls.Add(this.vScrollBar); 146this.Controls.Add(this.hScrollBar);
Splitter.Designer.cs (1)
63this.Controls.Add(this.splitContainer1);
TaskDialogSamples.cs (1)
41flowLayout.Controls.Add(button);
TextBoxes.Designer.cs (6)
154this.Controls.Add(this.textBox); 155this.Controls.Add(this.RTLTextBox); 156this.Controls.Add(this.multilineTextBox); 157this.Controls.Add(this.RTLMultilineTextBox); 158this.Controls.Add(this.richTextBox); 159this.Controls.Add(this.RTLRichTextBox);
ToolStripSeparatorPreferredSize.cs (3)
88Controls.Add(_toolStrip1); 89Controls.Add(_label1); 90Controls.Add(_buttonChangeOrientation);
ToolStripTests.Designer.cs (6)
438this.Controls.Add(this.label1); 439this.Controls.Add(this.statusStrip1); 440this.Controls.Add(this.toolStrip4); 441this.Controls.Add(this.toolStrip3); 442this.Controls.Add(this.toolStrip2); 443this.Controls.Add(this.toolStrip1);
ToolTipTests.Designer.cs (8)
84this.flowLayoutPanel1.Controls.Add(this.automaticDelayButton); 85this.flowLayoutPanel1.Controls.Add(this.autoPopDelayButton); 86this.flowLayoutPanel1.Controls.Add(this.delaysNotSetButton); 87this.flowLayoutPanel1.Controls.Add(this.defaultAutomaticDelayButton); 88this.flowLayoutPanel1.Controls.Add(this.defaultAutoPopDelayButton); 89this.flowLayoutPanel1.Controls.Add(this.initialDelayButton); 90this.flowLayoutPanel1.Controls.Add(this.autoEllipsisButton); 162this.Controls.Add(this.flowLayoutPanel1);
TrackBars.Designer.cs (15)
96this.gbOrientation.Controls.Add(this.rbHorizontal); 97this.gbOrientation.Controls.Add(this.rbVertical); 250this.Controls.Add(this.lblTrackBarValue); 251this.Controls.Add(this.lblTrackBarSize); 252this.Controls.Add(this.lblTickFrequency); 253this.Controls.Add(this.lblMaximum); 254this.Controls.Add(this.lblMinimum); 255this.Controls.Add(this.numericFrequency); 256this.Controls.Add(this.numericMaximum); 257this.Controls.Add(this.numericMinimum); 258this.Controls.Add(this.chbRightToLeftLayout); 259this.Controls.Add(this.chbRightToLeft); 260this.Controls.Add(this.gbOrientation); 261this.Controls.Add(this.trackBar1); 262this.Controls.Add(this.tickstyleNone);
TreeViewTest.Designer.cs (1)
65this.Controls.Add(this.treeView1);