1 write to Owner
System.Windows.Forms (1)
System\Windows\Forms\Control.ControlCollection.cs (1)
26Owner = owner.OrThrowIfNull();
37 references to Owner
System.Windows.Forms (19)
System\Windows\Forms\Control.ControlCollection.cs (19)
56if (Owner.CreateThreadId != value.CreateThreadId) 61CheckParentingCycle(Owner, value); 63if (value._parent == Owner) 94using (SuspendLayoutScope scope = new(Owner, performLayout: false)) 102value.AssignParent(Owner); 106if (oldParent != value._parent && (Owner._state & States.Created) != 0) 108value.SetParentHandle(Owner.InternalHandle); 121LayoutTransaction.DoLayout(Owner, value, PropertyNames.Parent); 122Owner.OnControlAdded(new ControlEventArgs(value)); 148using SuspendLayoutScope scope = new(Owner, performLayout: true); 159ControlCollection ccOther = Owner.CreateControlsInstance(); 294if (value.ParentInternal == Owner) 301LayoutTransaction.DoLayout(Owner, value, PropertyNames.Parent); 302Owner.OnControlRemoved(new ControlEventArgs(value)); 305if (Owner.GetContainerControl() is ContainerControl cc) 307cc.AfterControlRemoved(value, Owner); 382using SuspendLayoutScope scope = new(Owner); 385CommonProperties.xClearAllPreferredSizeCaches(Owner); 438LayoutTransaction.DoLayout(Owner, child, PropertyNames.ChildIndex);
System.Windows.Forms.Tests (18)
System\Windows\Forms\ControlTests.ControlCollection.cs (2)
22Assert.Same(owner, collection.Owner); 1359Assert.Same(owner, collection.Owner);
System\Windows\Forms\ControlTests.Methods.cs (1)
614Assert.Same(control, controls.Owner);
System\Windows\Forms\DataGridView.DataGridViewControlCollectionTests.cs (1)
16Assert.Same(owner, collection.Owner);
System\Windows\Forms\Form.ControlCollectionTests.cs (1)
16Assert.Same(owner, collection.Owner);
System\Windows\Forms\MdiClient.ControlCollectionTests.cs (1)
16Assert.Same(owner, collection.Owner);
System\Windows\Forms\MdiClientTests.cs (1)
41Assert.Same(control, Assert.IsType<MdiClient.ControlCollection>(control.Controls).Owner);
System\Windows\Forms\ReadOnlyControlCollectionTests.cs (1)
16Assert.Same(owner, collection.Owner);
System\Windows\Forms\SplitContainer.SplitContainerTypedControlCollectionTests.cs (1)
16Assert.Same(owner, collection.Owner);
System\Windows\Forms\TabControl.ControlCollectionTests.cs (1)
20Assert.Same(owner, collection.Owner);
System\Windows\Forms\TabControlTests.cs (1)
2996Assert.Same(control, controls.Owner);
System\Windows\Forms\TableLayoutControlCollectionTests.cs (1)
14Assert.Equal(container, collection.Owner);
System\Windows\Forms\TableLayoutPanelTests.cs (1)
631Assert.Same(control, controls.Owner);
System\Windows\Forms\TabPageTests.cs (1)
3746Assert.Same(control, controls.Owner);
System\Windows\Forms\TabPageTests.TabPageControlCollection.cs (1)
15Assert.Same(owner, collection.Owner);
System\Windows\Forms\ToolStripTests.cs (2)
4237Assert.Same(control, controls.Owner); 4261Assert.Same(control, controls.Owner);
System\Windows\Forms\TypedControlCollectionTests.cs (1)
16Assert.Same(owner, collection.Owner);