29 overrides of GetChildCount
System.Windows.Forms (27)
System\Windows\Forms\Controls\DataGridView\DataGridView.AccessibleObject.cs (1)
112public override int GetChildCount()
System\Windows\Forms\Controls\DataGridView\DataGridView.SelectedCellsAccessibleObject.cs (1)
40public override int GetChildCount() =>
System\Windows\Forms\Controls\DataGridView\DataGridView.TopRowAccessibleObject.cs (1)
136public override int GetChildCount()
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.DataGridViewCellAccessibleObject.cs (1)
412public override int GetChildCount()
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.DataGridViewRowAccessibleObject.cs (1)
282public override int GetChildCount()
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.DataGridViewSelectedRowCellsAccessibleObject.cs (1)
65public override int GetChildCount()
System\Windows\Forms\Controls\Labels\LinkLabel.LinkLabelAccessibleObject.cs (1)
48public override int GetChildCount() => this.TryGetOwnerAs(out LinkLabel? owner) ? owner.Links.Count : 0;
System\Windows\Forms\Controls\ListBoxes\ListBox.AccessibleObject.cs (1)
214public override int GetChildCount()
System\Windows\Forms\Controls\ListView\ListView.ListViewAccessibleObject.cs (1)
106public override int GetChildCount()
System\Windows\Forms\Controls\ListView\ListViewGroup.ListViewGroupAccessibleObject.cs (1)
289public override int GetChildCount()
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemBaseAccessibleObject.cs (1)
161public override int GetChildCount()
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemImageAccessibleObject.cs (1)
52public override int GetChildCount() => 0;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyDescriptorGridEntry.PropertyDescriptorGridEntryAccessibleObject.cs (1)
96public override int GetChildCount()
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.PropertyGridViewAccessibleObject.cs (1)
400public override int GetChildCount() =>
System\Windows\Forms\Controls\TabControl\TabControl.TabControlAccessibleObject.cs (1)
61public override int GetChildCount()
System\Windows\Forms\Controls\TabControl\TabPage.TabPageAccessibleObject.cs (1)
43public override int GetChildCount()
System\Windows\Forms\Controls\ToolStrips\ToolStrip.ToolStripAccessibleObject.cs (1)
121public override int GetChildCount()
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownItemAccessibleObject.cs (1)
100public override int GetChildCount()
System\Windows\Forms\Controls\TrackBar\TrackBar.TrackBarAccessibleObject.cs (1)
86public override int GetChildCount()
System\Windows\Forms\Controls\TreeView\TreeView.TreeViewAccessibleObject.cs (1)
40public override int GetChildCount() =>
System\Windows\Forms\Controls\UpDown\DomainUpDown.DomainUpDownAccessibleObject.cs (1)
29public override int GetChildCount() => _upDownBaseAccessibleObject.GetChildCount();
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownBaseAccessibleObject.cs (1)
32public override int GetChildCount() => 2;
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.UpDownButtonsAccessibleObject.cs (1)
58public override int GetChildCount() => 2;
System\Windows\Forms\ErrorProvider\ErrorProvider.ErrorWindow.ErrorWindowAccessibleObject.cs (1)
56public override int GetChildCount() => _owner.ControlItems.Count;
System\Windows\Forms\Panels\Panel.PanelAccessibleObject.cs (1)
30public override int GetChildCount()
System\Windows\Forms\Printing\PrintPreviewControl.PrintPreviewControlAccessibleObject.cs (1)
28public override int GetChildCount()
System\Windows\Forms\Scrolling\ScrollBar.ScrollBarAccessibleObject.cs (1)
78public override int GetChildCount()
System.Windows.Forms.Design (2)
System\Drawing\Design\ColorEditor.ColorPalette.ColorPaletteAccessibleObject.cs (1)
23public override int GetChildCount() => CellsAcross * CellsDown;
System\Windows\Forms\Design\ControlDesigner.ControlDesignerAccessibleObject.cs (1)
79public override int GetChildCount() => _control.AccessibilityObject.GetChildCount();
198 references to GetChildCount
System.Windows.Forms (23)
System\Windows\Forms\Accessibility\AccessibleObject.cs (13)
429if (GetChildCount() >= 0) 431int count = GetChildCount(); 497if (GetChildCount() >= 0) 499int count = GetChildCount(); 540if (GetChildCount() >= 0) 542int count = GetChildCount(); 1914*pcountChildren = GetChildCount(); 2022if (index >= 0 && index < GetChildCount()) 2042return index >= 0 && index < GetChildCount() ? GetChild(index) : null; 2598if (GetChildCount() >= 0) 2605return GetChild(GetChildCount() - 1); 2609if (Parent?.GetChildCount() > 0) 2618if (Parent?.GetChildCount() > 0)
System\Windows\Forms\Accessibility\AccessibleObject.EnumVariantObject.cs (1)
83if ((childCount = _owner.GetChildCount()) >= 0)
System\Windows\Forms\Controls\DataGridView\DataGridView.SelectedCellsAccessibleObject.cs (1)
43: base.GetChildCount();
System\Windows\Forms\Controls\DataGridView\DataGridView.TopRowAccessibleObject.cs (2)
164if (_ownerDataGridView.AccessibilityObject.GetChildCount() > 1) 201if (Parent.GetChildCount() > 1)
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.DataGridViewCellAccessibleObject.cs (2)
513int childCount = previousRow.GetChildCount(); 547if (nextRow is not null && nextRow.GetChildCount() > 0)
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.DataGridViewSelectedRowCellsAccessibleObject.cs (2)
47for (int i = 1; i < _owningDataGridViewRow.AccessibilityObject.GetChildCount(); i++) 70for (int i = 1; i < _owningDataGridViewRow.AccessibilityObject.GetChildCount(); i++)
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownItemAccessibleObject.cs (1)
120return _owner.DropDown.AccessibilityObject.GetChildCount();
System\Windows\Forms\Controls\TreeView\TreeView.TreeViewAccessibleObject.cs (1)
41this.TryGetOwnerAs(out TreeView? owningTreeView) ? owningTreeView.Nodes.Count : base.GetChildCount();
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\ControlDesigner.ControlDesignerAccessibleObject.cs (1)
79public override int GetChildCount() => _control.AccessibilityObject.GetChildCount();
System.Windows.Forms.Tests (174)
System\Windows\Forms\AccessibleObjects\AccessibleObjectTests.cs (59)
84Assert.Equal(-1, accessibleObject.GetChildCount()); 99.Setup(a => a.GetChildCount()) 115.Setup(a => a.GetChildCount()) 139.Setup(a => a.GetChildCount()) 176.Setup(a => a.GetChildCount()) 208.Setup(a => a.GetChildCount()) 224.Setup(a => a.GetChildCount()) 248.Setup(a => a.GetChildCount()) 285.Setup(a => a.GetChildCount()) 318.Setup(a => a.GetChildCount()) 339.Setup(a => a.GetChildCount()) 363.Setup(a => a.GetChildCount()) 400.Setup(a => a.GetChildCount()) 434.Setup(a => a.GetChildCount()) 453.Setup(a => a.GetChildCount()) 488.Setup(a => a.GetChildCount()) 494.Setup(a => a.GetChildCount()) 505mockParentAccessibleObject.Verify(a => a.GetChildCount(), Times.Once()); 519.Setup(a => a.GetChildCount()) 823.Setup(a => a.GetChildCount()) 828mockAccessibleObject.Verify(a => a.GetChildCount(), Times.Once()); 877.Setup(a => a.GetChildCount()) 905.Setup(a => a.GetChildCount()) 967.Setup(a => a.GetChildCount()) 989.Setup(a => a.GetChildCount()) 1014.Setup(a => a.GetChildCount()) 1052.Setup(a => a.GetChildCount()) 1107.Setup(a => a.GetChildCount()) 1139.Setup(a => a.GetChildCount()) 1194.Setup(a => a.GetChildCount()) 1230.Setup(a => a.GetChildCount()) 1258.Setup(a => a.GetChildCount()) 1342.Setup(a => a.GetChildCount()) 1370.Setup(a => a.GetChildCount()) 1436.Setup(a => a.GetChildCount()) 1466.Setup(a => a.GetChildCount()) 1493.Setup(a => a.GetChildCount()) 1565.Setup(a => a.GetChildCount()) 1593.Setup(a => a.GetChildCount()) 1665.Setup(a => a.GetChildCount()) 1696.Setup(a => a.GetChildCount()) 1768.Setup(a => a.GetChildCount()) 1799.Setup(a => a.GetChildCount()) 1883.Setup(a => a.GetChildCount()) 1913.Setup(a => a.GetChildCount()) 1989.Setup(a => a.GetChildCount()) 2020.Setup(a => a.GetChildCount()) 2095.Setup(a => a.GetChildCount()) 2126.Setup(a => a.GetChildCount()) 2202.Setup(a => a.GetChildCount()) 2230.Setup(a => a.GetChildCount()) 2287.Setup(a => a.GetChildCount()) 2315.Setup(a => a.GetChildCount()) 2387.Setup(a => a.GetChildCount()) 2418.Setup(a => a.GetChildCount()) 2473.Setup(a => a.GetChildCount()) 2509.Setup(a => a.GetChildCount()) 2564.Setup(a => a.GetChildCount()) 2597.Setup(a => a.GetChildCount())
System\Windows\Forms\AccessibleObjects\CheckedListBoxAccessibleObjectTests.cs (1)
118int actual = checkedListBox.AccessibilityObject.GetChildCount();
System\Windows\Forms\AccessibleObjects\Control.ControlAccessibleObjectTests.cs (2)
879Assert.Equal(-1, accessibleObject.GetChildCount()); 889Assert.Equal(-1, accessibleObject.GetChildCount());
System\Windows\Forms\AccessibleObjects\DataGridViewAccessibleObjectTests.cs (10)
79Assert.Equal(0, accessibleObject.GetChildCount()); // dataGridView doesn't have items 91Assert.Equal(1, accessibleObject.GetChildCount()); // A first row only 102Assert.Equal(2, accessibleObject.GetChildCount()); // Column headers and a first Row 111Assert.Equal(0, accessibleObject.GetChildCount()); // dataGridView doesn't have an item 638Assert.Equal(1, dataGridView.AccessibilityObject.GetChildCount()); 657Assert.Equal(1, dataGridView.AccessibilityObject.GetChildCount()); 677Assert.Equal(0, dataGridView.AccessibilityObject.GetChildCount()); 695Assert.Equal(2, dataGridView.AccessibilityObject.GetChildCount()); 713Assert.Equal(2, dataGridView.AccessibilityObject.GetChildCount()); 732Assert.Equal(1, dataGridView.AccessibilityObject.GetChildCount());
System\Windows\Forms\AccessibleObjects\DataGridViewCellAccessibleObjectTests.cs (1)
395Assert.Throws<InvalidOperationException>(() => accessibleObject.GetChildCount());
System\Windows\Forms\AccessibleObjects\DataGridViewRowAccessibleObjectTests.cs (9)
278Assert.Throws<InvalidOperationException>(() => accessibleObject.GetChildCount()); 2257Assert.Equal(4, rowAccessibleObject.GetChildCount()); 2272Assert.Equal(3, rowAccessibleObject.GetChildCount()); 2288Assert.Equal(2, rowAccessibleObject.GetChildCount()); 2305Assert.Equal(1, rowAccessibleObject.GetChildCount()); 2319Assert.Equal(3, rowAccessibleObject.GetChildCount()); 2334Assert.Equal(2, rowAccessibleObject.GetChildCount()); 2350Assert.Equal(1, rowAccessibleObject.GetChildCount()); 2367Assert.Equal(0, rowAccessibleObject.GetChildCount());
System\Windows\Forms\AccessibleObjects\DataGridViewSelectedCellsAccessibleObjectTests.cs (3)
130Assert.Equal(selecetedCellsCount, accessibleObject.GetChildCount()); 165Assert.Equal(0, accessibleObject.GetChildCount()); 186Assert.Equal(1, accessibleObject.GetChildCount());
System\Windows\Forms\AccessibleObjects\DataGridViewSelectedRowCellsAccessibleObjectTests.cs (3)
134Assert.Equal(selecetedCellsCount, accessibleObject.GetChildCount()); 172Assert.Equal(0, accessibleObject.GetChildCount()); 194Assert.Equal(1, accessibleObject.GetChildCount());
System\Windows\Forms\AccessibleObjects\DataGridViewTopRowAccessibleObjectTests.cs (8)
1120Assert.Equal(4, topRowAccessibleObject.GetChildCount()); 1135Assert.Equal(3, topRowAccessibleObject.GetChildCount()); 1151Assert.Equal(2, topRowAccessibleObject.GetChildCount()); 1168Assert.Equal(1, topRowAccessibleObject.GetChildCount()); 1182Assert.Equal(3, topRowAccessibleObject.GetChildCount()); 1197Assert.Equal(2, topRowAccessibleObject.GetChildCount()); 1213Assert.Equal(1, topRowAccessibleObject.GetChildCount()); 1230Assert.Equal(0, topRowAccessibleObject.GetChildCount());
System\Windows\Forms\AccessibleObjects\ErrorProvider.ErrorWindow.ErrorWindowAccessibleObjectTests.cs (1)
114Assert.Equal(testCount, accessibleObject.GetChildCount());
System\Windows\Forms\AccessibleObjects\ErrorProviderAccessibleObjectTests.cs (1)
117int childCount = errorWindowAccessibilityObject.GetChildCount();
System\Windows\Forms\AccessibleObjects\HScrollBar.HScrollBarAccessibleObjectTests.cs (5)
129Assert.Equal(5, accessibleObject.GetChildCount()); 140Assert.Equal(4, accessibleObject.GetChildCount()); 151Assert.Equal(4, accessibleObject.GetChildCount()); 162Assert.Equal(3, accessibleObject.GetChildCount()); 173Assert.Equal(-1, accessibleObject.GetChildCount());
System\Windows\Forms\AccessibleObjects\HScrollBar.ScrollBarFirstLineButtonAccessibleObjectTests.cs (1)
33Assert.Equal(-1, accessibleObject.GetChildCount());
System\Windows\Forms\AccessibleObjects\HScrollBar.ScrollBarFirstPageButtonAccessibleObjectTests.cs (1)
33Assert.Equal(-1, accessibleObject.GetChildCount());
System\Windows\Forms\AccessibleObjects\HScrollBar.ScrollBarLastLineButtonAccessibleObjectTests.cs (1)
33Assert.Equal(-1, accessibleObject.GetChildCount());
System\Windows\Forms\AccessibleObjects\HScrollBar.ScrollBarLastPageButtonAccessibleObjectTests.cs (1)
33Assert.Equal(-1, accessibleObject.GetChildCount());
System\Windows\Forms\AccessibleObjects\HScrollBar.ScrollBarThumbAccessibleObjectTests.cs (1)
33Assert.Equal(-1, accessibleObject.GetChildCount());
System\Windows\Forms\AccessibleObjects\LinkLabel.LinkLabelAccessibleObjectTests.cs (1)
89int actual = linkLabel.AccessibilityObject.GetChildCount();
System\Windows\Forms\AccessibleObjects\ListBox.ListBoxItemAccessibleObjectTests.cs (1)
34Assert.Equal(persons.Count, accessibleObject.GetChildCount());
System\Windows\Forms\AccessibleObjects\ListBoxAccessibleObjectTests.cs (3)
18int childCount = listBox.AccessibilityObject.GetChildCount(); 239int childCount = accessibilityObject.GetChildCount(); 287accessibleObject.GetChildCount().Should().Be(expectedCount);
System\Windows\Forms\AccessibleObjects\ListVIew.ListViewAccessibleObjectTests.cs (13)
28Assert.Equal(-1, accessibleObject.GetChildCount()); // listView doesn't have items 198Assert.Equal(-1, accessibleObject.GetChildCount()); // listView doesn't have items 434Assert.Equal(expected, listView.AccessibilityObject.GetChildCount()); 473Assert.Equal(createHandle ? 0 : -1, listView.AccessibilityObject.GetChildCount()); 1258Assert.Equal(-1, listView.AccessibilityObject.GetChildCount()); 1271Assert.Equal(expectedCount, listView.AccessibilityObject.GetChildCount()); 1552Assert.Equal(2, accessibleObject.GetChildCount()); 1571Assert.Equal(2, accessibleObject.GetChildCount()); 1580Assert.Equal(4, accessibleObject.GetChildCount()); 1599Assert.Equal(2, accessibleObject.GetChildCount()); 1604Assert.Equal(1, accessibleObject.GetChildCount()); 1622Assert.Equal(2, accessibleObject.GetChildCount()); 1626Assert.Equal(1, accessibleObject.GetChildCount());
System\Windows\Forms\AccessibleObjects\ListViewGroup.ListViewGroupAccessibleObjectTests.cs (9)
527Assert.Equal(supportsGetChild ? 2 : -1, group1AccObj.GetChildCount()); 528Assert.Equal(supportsGetChild ? 3 : -1, group2AccObj.GetChildCount()); 529Assert.Equal(supportsGetChild ? 1 : -1, defaultGroupAccObj.GetChildCount()); 1024Assert.Equal(2, accessibleObject.GetChildCount()); 1043Assert.Equal(2, accessibleObject.GetChildCount()); 1048Assert.Equal(4, accessibleObject.GetChildCount()); 1067Assert.Equal(2, accessibleObject.GetChildCount()); 1071Assert.Equal(1, accessibleObject.GetChildCount()); 1075Assert.Equal(0, accessibleObject.GetChildCount());
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemAccessibleObjectTests.cs (2)
1789Assert.NotEqual(2, accessibleObject.GetChildCount()); 1793Assert.Throws<InvalidOperationException>(() => accessibleObject.GetChildCount());
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemDetailsAccessibleObjectTests.cs (2)
92Assert.Equal(-1, accessibleObject.GetChildCount()); 107Assert.Equal(control.Columns.Count, accessibleObject.GetChildCount());
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemWithImageAccessibleObjectTests.cs (2)
104Assert.Equal(AccessibleObject.InvalidIndex, listViewItemAccessibleObject.GetChildCount()); 127Assert.Equal(1, listViewItemAccessibleObject.GetChildCount());
System\Windows\Forms\AccessibleObjects\Panel.PanelAccessibleObjectTests.cs (3)
171Assert.Equal(-1, panelAccessibleObject.GetChildCount()); 182Assert.Equal(0, panelAccessibleObject.GetChildCount()); 199Assert.Equal(1, panelAccessibleObject.GetChildCount());
System\Windows\Forms\AccessibleObjects\ProgressBarAccessibleObjectTests.cs (1)
107Assert.Equal(-1, accessibilityObject.GetChildCount());
System\Windows\Forms\AccessibleObjects\PropertyGridView.PropertyGridViewAccessibleObjectTests.cs (3)
83Assert.Equal(0, accessibleObject.GetChildCount()); // propertyGrid doesn't have an item 100Assert.Equal(count, accessibleObject.GetChildCount()); // Properties 109Assert.Equal(0, accessibleObject.GetChildCount()); // propertyGrid doesn't have items
System\Windows\Forms\AccessibleObjects\TabControl.TabControlAccessibleObjectTests.cs (3)
140Assert.Equal(-1, accessibleObject.GetChildCount()); 152Assert.Equal(0, accessibleObject.GetChildCount()); 166Assert.Equal(4, accessibleObject.GetChildCount());
System\Windows\Forms\AccessibleObjects\TrackBar.TrackBarAccessibleObjectTests.cs (5)
147Assert.Equal(3, accessibilityObject.GetChildCount()); 159Assert.Equal(2, accessibilityObject.GetChildCount()); 171Assert.Equal(2, accessibilityObject.GetChildCount()); 184Assert.Equal(2, accessibilityObject.GetChildCount()); 195Assert.Equal(-1, accessibilityObject.GetChildCount());
System\Windows\Forms\AccessibleObjects\TrackBar.TrackBarFirstButtonAccessibleObjectTests.cs (1)
230Assert.Equal(-1, accessibleObject.GetChildCount());
System\Windows\Forms\AccessibleObjects\TrackBar.TrackBarLastButtonAccessibleObjectTests.cs (1)
231Assert.Equal(-1, accessibleObject.GetChildCount());
System\Windows\Forms\AccessibleObjects\TrackBar.TrackBarThumbAccessibleObjectTests.cs (1)
160Assert.Equal(-1, accessibleObject.GetChildCount());
System\Windows\Forms\AccessibleObjects\TreeView.TreeViewAccessibleObjectTests.cs (2)
118Assert.Equal(expected, control.AccessibilityObject.GetChildCount()); 284control.AccessibilityObject.GetChildCount().Should().Be(expected);
System\Windows\Forms\AccessibleObjects\VScrollBar.ScrollBarFirstLineButtonAccessibleObjectTests.cs (1)
33Assert.Equal(-1, accessibleObject.GetChildCount());
System\Windows\Forms\AccessibleObjects\VScrollBar.ScrollBarFirstPageButtonAccessibleObjectTests.cs (1)
33Assert.Equal(-1, accessibleObject.GetChildCount());
System\Windows\Forms\AccessibleObjects\VScrollBar.ScrollBarLastLineButtonAccessibleObjectTests.cs (1)
33Assert.Equal(-1, accessibleObject.GetChildCount());
System\Windows\Forms\AccessibleObjects\VScrollBar.ScrollBarLastPageButtonAccessibleObjectTests.cs (1)
33Assert.Equal(-1, accessibleObject.GetChildCount());
System\Windows\Forms\AccessibleObjects\VScrollBar.ScrollBarThumbAccessibleObjectTests.cs (1)
33Assert.Equal(-1, accessibleObject.GetChildCount());
System\Windows\Forms\AccessibleObjects\VScrollBar.VScrollBarAccessibleObjectTests.cs (4)
128Assert.Equal(5, accessibleObject.GetChildCount()); 139Assert.Equal(4, accessibleObject.GetChildCount()); 150Assert.Equal(4, accessibleObject.GetChildCount()); 161Assert.Equal(3, accessibleObject.GetChildCount());
System\Windows\Forms\Printing\PrintPreviewControl.PrintPreviewControlAccessibilityObjectTests.cs (4)
35Assert.Equal(0, accessibleObject.GetChildCount()); 39Assert.Equal(1, accessibleObject.GetChildCount()); 42Assert.Equal(1, accessibleObject.GetChildCount()); 45Assert.Equal(2, accessibleObject.GetChildCount());