Implemented interface member:
70 references to Count
System.Windows.Forms (24)
System\Windows\Forms\Controls\TreeView\TreeNode.cs (2)
670
if (_parent is not null && _index + 1 < _parent.Nodes.
Count
)
828
if (currentInd > 0 && currentInd <= _parent.Nodes.
Count
)
System\Windows\Forms\Controls\TreeView\TreeNode.TreeNodeAccessibleObject.cs (3)
194
if (_owningTreeNode.Nodes.
Count
== 0)
204
if (_owningTreeNode.Nodes.
Count
== 0)
216
if (_owningTreeNode.Nodes.
Count
== 0)
System\Windows\Forms\Controls\TreeView\TreeNodeCollection.cs (6)
258
for (int i = 0; i < treeNodeCollectionToLookIn.
Count
; i++)
274
for (int i = 0; i < treeNodeCollectionToLookIn.
Count
; i++)
281
if ((treeNodeCollectionToLookIn[i].Nodes is not null) && treeNodeCollectionToLookIn[i].Nodes.
Count
> 0)
381
for (int index = 0; index <
Count
; ++index)
418
for (int i = 0; i <
Count
; i++)
573
private bool IsValidIndex(int index) => (index >= 0) && (index <
Count
);
System\Windows\Forms\Controls\TreeView\TreeNodeConverter.cs (4)
50
if (node.Nodes.
Count
== 0)
59
TreeNode[] nodesArray = new TreeNode[node.Nodes.
Count
];
67
if (node.Nodes.
Count
== 0)
92
TreeNode[] nodesArray = new TreeNode[node.Nodes.
Count
];
System\Windows\Forms\Controls\TreeView\TreeView.cs (6)
1236
if (Sorted && TreeViewNodeSorter is null && Nodes.
Count
>= 1)
2332
TreeNode[] nodes = new TreeNode[Nodes.
Count
];
2407
s += $", Nodes.Count: {Nodes.
Count
}";
2408
if (Nodes.
Count
> 0)
2666
for (int i = node.Nodes.
Count
- 1; i >= 0; i--)
2674
for (int i = node.Nodes.
Count
- 1; i >= 0; i--)
System\Windows\Forms\Controls\TreeView\TreeView.TreeViewAccessibleObject.cs (3)
41
this.TryGetOwnerAs(out TreeView? owningTreeView) ? owningTreeView.Nodes.
Count
: base.GetChildCount();
51
&& owningTreeView.Enabled && owningTreeView.Nodes.
Count
== 0),
111
owningTreeView.Nodes.
Count
!= 0;
System.Windows.Forms.Design (19)
System\ComponentModel\Design\ObjectSelectorEditor.Selector.cs (2)
142
int length = nodes.
Count
;
159
if ((treeNodes[i].Nodes is not null) && (treeNodes[i].Nodes.
Count
!= 0))
System\Windows\Forms\Design\DesignBindingPicker.cs (9)
550
if (_projectNode.Nodes.
Count
> 0)
555
if (_instancesNode.Nodes.
Count
> 0)
560
if (_otherNode.Nodes.
Count
> 0)
846
Debug.Assert(nodes.
Count
== 0, "We only add data member content sub-nodes once.");
1614
_helpTextCtrl.Text = (_treeViewCtrl?.Nodes.
Count
> 1) ? (SR.DesignBindingPickerHelpGenPickMember) : "";
1616
else if (_treeViewCtrl?.Nodes.
Count
> 1 && _treeViewCtrl.Nodes[1] is DataSourceNode)
1621
else if (_instancesNode.Nodes.
Count
> 0 || _projectNode?.Nodes.
Count
> 0)
1715
int dataMemberCount = _selectedNode.Nodes.
Count
;
System\Windows\Forms\Design\TreeNodeCollectionEditor.cs (8)
90
TreeNode lastNode = _treeView1.Nodes[_treeView1.Nodes.
Count
- 1];
91
while (lastNode.Nodes.
Count
> 0)
93
lastNode = lastNode.Nodes[lastNode.Nodes.
Count
- 1];
597
if (_treeView1.Nodes.
Count
== 0)
608
object[] values = new object[_treeView1.Nodes.
Count
];
634
if (tempNode.Index < parent.Nodes.
Count
)
691
bool nodesExist = _treeView1.Nodes.
Count
> 0;
698
&& _curNode != _treeView1.Nodes[_treeView1.Nodes.
Count
- 1];
System.Windows.Forms.Tests (27)
System\Windows\Forms\AccessibleObjects\TreeView.TreeViewAccessibleObjectTests.cs (1)
102
AccessibleObject expected = index >= 0 && index < control.Nodes.
Count
System\Windows\Forms\TreeNodeTests.cs (2)
4729
clonedNode.Nodes.
Count
.Should().Be(treeNode.Nodes.
Count
);
System\Windows\Forms\TreeViewTests.cs (24)
6838
Assert.Equal(3, treeView.Nodes.
Count
);
6844
Assert.Equal(2, treeView.Nodes.
Count
);
6863
for (int count = treeView.Nodes.
Count
; count > 1; count -= 1)
6868
Assert.Equal(count, treeView.Nodes.
Count
);
6875
Assert.Equal(count, treeView.Nodes.
Count
);
6901
Assert.Equal(3, treeNode.Nodes.
Count
);
6907
Assert.Equal(2, treeNode.Nodes.
Count
);
6929
for (int count = treeNode.Nodes.
Count
; count > 1; count -= 1)
6934
Assert.Equal(count, treeNode.Nodes.
Count
);
6941
Assert.Equal(count, treeNode.Nodes.
Count
);
6990
Assert.Equal(3, treeView.Nodes.
Count
);
6995
Assert.Equal(2, treeView.Nodes.
Count
);
7012
for (int count = treeView.Nodes.
Count
; count > 1; count -= 1)
7018
Assert.Equal(count, treeView.Nodes.
Count
);
7024
Assert.Equal(count, treeView.Nodes.
Count
);
7043
Assert.Equal(3, treeNode.Nodes.
Count
);
7048
Assert.Equal(2, treeNode.Nodes.
Count
);
7068
for (int count = treeNode.Nodes.
Count
; count > 1; count -= 1)
7074
Assert.Equal(count, treeNode.Nodes.
Count
);
7080
Assert.Equal(count, treeNode.Nodes.
Count
);
7242
Assert.Equal(3, fifthSubNode1.Nodes.
Count
);
7243
Assert.Equal(2, parent.Nodes[0].Nodes.
Count
);
7287
Assert.Equal(4, parent.Nodes.
Count
);
7299
Assert.Equal(2, parent.Nodes.
Count
);