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