14 references to GetChildIndex
System.Windows.Forms (3)
System\Windows\Forms\Control.ControlCollection.cs (1)
423int currentIndex = GetChildIndex(child);
System\Windows\Forms\Control.cs (2)
10848int currentIndex = Controls.GetChildIndex(control); 10919for (int i = Controls.GetChildIndex(control); --i >= 0;)
System.Windows.Forms.Design (6)
System\Windows\Forms\Design\CommandSet.cs (2)
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\ControlCommandSet.cs (2)
1739else if (parent.Controls.GetChildIndex(cX) > parent.Controls.GetChildIndex(cY))
System\Windows\Forms\Design\ParentControlDesigner.cs (2)
656int childIndex = parent.Controls.GetChildIndex(children[i]); 2430int childIndex = parent.Controls.GetChildIndex(c);
System.Windows.Forms.Design.Tests (1)
System\Windows\Forms\Design\ControlDesigner.DesignerControlCollectionTests.cs (1)
155_control.Controls.GetChildIndex(control).Should().Be(0);
System.Windows.Forms.Tests (4)
System\Windows\Forms\ControlTests.ControlCollection.cs (4)
1530Assert.Equal(0, collection.GetChildIndex(child1)); 1531Assert.Equal(1, collection.GetChildIndex(child2)); 1581Assert.Throws<ArgumentException>(() => collection.GetChildIndex(child)); 1582Assert.Throws<ArgumentException>(() => collection.GetChildIndex(child));