2 overrides of GetChildIndex
System.Windows.Forms.Design (2)
System\Windows\Forms\Design\ControlDesigner.DesignerControlCollection.cs (1)
62public override int GetChildIndex(Control child, bool throwException)
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (1)
2201public override int GetChildIndex(Control child, bool throwException) => _realCollection.GetChildIndex(child, throwException);
14 references to GetChildIndex
System.Windows.Forms (2)
System\Windows\Forms\Control.ControlCollection.cs (1)
397public int GetChildIndex(Control child) => GetChildIndex(child, true);
System\Windows\Forms\Control.cs (1)
10855newIndex = Controls.GetChildIndex(previousControl, throwException: false) + 1;
System.Windows.Forms.Design (4)
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (1)
972_dragComponents[i].zorderIndex = primaryParent.Controls.GetChildIndex(dragControl, false /*throwException*/);
System\Windows\Forms\Design\ControlDesigner.DesignerControlCollection.cs (1)
63=> _realCollection.GetChildIndex(child, throwException);
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (1)
623_insertionIndex = children.GetChildIndex(control, throwException: false);
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (1)
2201public override int GetChildIndex(Control child, bool throwException) => _realCollection.GetChildIndex(child, throwException);
System.Windows.Forms.Design.Tests (2)
System\Windows\Forms\Design\ControlDesigner.DesignerControlCollectionTests.cs (2)
146_collection.GetChildIndex(control, throwException: false).Should().Be(_control.Controls.GetChildIndex(control, throwException: false));
System.Windows.Forms.Tests (6)
System\Windows\Forms\ControlTests.ControlCollection.cs (6)
1544Assert.Equal(0, collection.GetChildIndex(child1, throwException: true)); 1545Assert.Equal(1, collection.GetChildIndex(child2, throwException: true)); 1558Assert.Equal(0, collection.GetChildIndex(child1, throwException: false)); 1559Assert.Equal(1, collection.GetChildIndex(child2, throwException: false)); 1560Assert.Equal(-1, collection.GetChildIndex(new Control(), throwException: false)); 1561Assert.Equal(-1, collection.GetChildIndex(null, throwException: false));