2 overrides of GetChildIndex
System.Windows.Forms.Design (2)
System\Windows\Forms\Design\ControlDesigner.DesignerControlCollection.cs (1)
62
public override int
GetChildIndex
(Control child, bool throwException)
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (1)
2201
public 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)
397
public int GetChildIndex(Control child) =>
GetChildIndex
(child, true);
System\Windows\Forms\Control.cs (1)
10855
newIndex = 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)
2201
public 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)
1544
Assert.Equal(0, collection.
GetChildIndex
(child1, throwException: true));
1545
Assert.Equal(1, collection.
GetChildIndex
(child2, throwException: true));
1558
Assert.Equal(0, collection.
GetChildIndex
(child1, throwException: false));
1559
Assert.Equal(1, collection.
GetChildIndex
(child2, throwException: false));
1560
Assert.Equal(-1, collection.
GetChildIndex
(new Control(), throwException: false));
1561
Assert.Equal(-1, collection.
GetChildIndex
(null, throwException: false));