470 references to Nodes
Accessibility_Core_App (2)
CommonControl2.Designer.cs (1)
194
this.treeView1.
Nodes
.AddRange(new System.Windows.Forms.TreeNode[] {
DataBindingExample.cs (1)
81
treeView1.
Nodes
.Add(node);
System.Windows.Forms (20)
System\Windows\Forms\Controls\TreeView\TreeNode.TreeNodeAccessibleObject.cs (1)
122
internal int Index => _owningTreeView.
Nodes
.IndexOf(_owningTreeNode);
System\Windows\Forms\Controls\TreeView\TreeView.cs (13)
22
[DefaultProperty(nameof(
Nodes
))]
180
foreach (TreeNode rootNode in
Nodes
)
1236
if (Sorted && TreeViewNodeSorter is null &&
Nodes
.Count >= 1)
1717
foreach (TreeNode node in
Nodes
)
2332
TreeNode[] nodes = new TreeNode[
Nodes
.Count];
2333
Nodes
.CopyTo(nodes, 0);
2335
Nodes
.Clear();
2336
Nodes
.AddRange(nodes);
2405
if (
Nodes
is not null)
2407
s += $", Nodes.Count: {
Nodes
.Count}";
2408
if (
Nodes
.Count > 0)
2410
s += $", Nodes[0]: {
Nodes
[0]}";
3134
foreach (TreeNode rootNode in
Nodes
)
System\Windows\Forms\Controls\TreeView\TreeView.TreeViewAccessibleObject.cs (4)
35
? owningTreeView.
Nodes
[index].AccessibilityObject
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\ComponentEditorForm.cs (2)
212
_selector.
Nodes
.Add(new TreeNode(title, n, n));
320
_selector.SelectedNode = _selector.
Nodes
[_initialActivePage];
System.Windows.Forms.Design (34)
System\ComponentModel\Design\ObjectSelectorEditor.Selector.cs (4)
50
Nodes
.Add(newNode);
80
Nodes
.Clear();
140
nodes ??=
Nodes
;
181
SetSelection(value,
Nodes
);
System\Windows\Forms\Design\DesignBindingPicker.cs (9)
511
_treeViewCtrl?.
Nodes
.Clear();
539
_treeViewCtrl?.
Nodes
.Add(_noneNode);
562
_treeViewCtrl?.
Nodes
.Add(_otherNode);
568
AddDataSourceContents(_treeViewCtrl?.
Nodes
, _rootDataSource, _rootDataMember, null);
629
AddDataSource(_treeViewCtrl?.
Nodes
, comp, null);
1614
_helpTextCtrl.Text = (_treeViewCtrl?.
Nodes
.Count > 1) ? (SR.DesignBindingPickerHelpGenPickMember) : "";
1616
else if (_treeViewCtrl?.
Nodes
.Count > 1 && _treeViewCtrl.
Nodes
[1] is DataSourceNode)
2017
=> GetMaxItemWidth(
Nodes
);
System\Windows\Forms\Design\TreeNodeCollectionEditor.cs (20)
90
TreeNode lastNode = _treeView1.
Nodes
[_treeView1.
Nodes
.Count - 1];
159
newNode = _treeView1.
Nodes
.Add(baseNodeName + NextNode++.ToString(CultureInfo.InvariantCulture));
422
_treeView1.
Nodes
.Clear();
423
_treeView1.
Nodes
.AddRange(nodes);
541
_treeView1.
Nodes
.Remove(dragNode);
549
_treeView1.
Nodes
.Add(dragNode);
597
if (_treeView1.
Nodes
.Count == 0)
608
object[] values = new object[_treeView1.
Nodes
.Count];
611
values[i] = _treeView1.
Nodes
[i].Clone();
628
_treeView1.
Nodes
.RemoveAt(tempNode.Index);
629
_treeView1.
Nodes
[tempNode.Index].Nodes.Insert(0, tempNode);
642
_treeView1.
Nodes
.Insert(parent.Index + 1, tempNode);
662
_treeView1.
Nodes
.RemoveAt(tempNode.Index);
663
_treeView1.
Nodes
[tempNode.Index - 1].Nodes.Add(tempNode);
672
_treeView1.
Nodes
.Insert(parent.Index, tempNode);
691
bool nodesExist = _treeView1.
Nodes
.Count > 0;
698
&& _curNode != _treeView1.
Nodes
[_treeView1.
Nodes
.Count - 1];
699
_moveUpButton.Enabled = nodesExist && _curNode != _treeView1.
Nodes
[0];
System\Windows\Forms\Design\TreeViewActionList.cs (1)
21
public void InvokeNodesDialog() => EditorServiceContext.EditValue(_designer, Component!, nameof(TreeView.
Nodes
));
System.Windows.Forms.Design.Tests (2)
System\ComponentModel\Design\ObjectSelectorEditorTests.cs (2)
111
Assert.Single(underTest.
Nodes
);
115
Assert.Empty(underTest.
Nodes
);
System.Windows.Forms.Tests (409)
System\Windows\Forms\AccessibleObjects\TreeNode.TreeNodeAccessibleObjectTests.cs (36)
59
control.
Nodes
.Add(node);
105
control.
Nodes
.Add(node);
146
control.
Nodes
.Add(new TreeNode("Root node", [node]));
160
control.
Nodes
.Add(node);
179
control.
Nodes
.Add(node);
196
control.
Nodes
.AddRange([new(), new(), new()]);
198
AccessibleObject accessibleObject1 = control.
Nodes
[0].AccessibilityObject;
199
AccessibleObject accessibleObject2 = control.
Nodes
[1].AccessibilityObject;
200
AccessibleObject accessibleObject3 = control.
Nodes
[2].AccessibilityObject;
212
control.
Nodes
.AddRange([new(), new(), new()]);
214
AccessibleObject accessibleObject1 = control.
Nodes
[0].AccessibilityObject;
215
AccessibleObject accessibleObject2 = control.
Nodes
[1].AccessibilityObject;
216
AccessibleObject accessibleObject3 = control.
Nodes
[2].AccessibilityObject;
287
control.
Nodes
.AddRange([new(), new(), new()]);
289
TreeNodeAccessibleObject accessibleObject1 = control.
Nodes
[0].AccessibilityObject;
290
TreeNodeAccessibleObject accessibleObject2 = control.
Nodes
[1].AccessibilityObject;
291
TreeNodeAccessibleObject accessibleObject3 = control.
Nodes
[2].AccessibilityObject;
326
control.
Nodes
.Add(new TreeNode("Root node", [node]));
358
control.
Nodes
.Add(node);
374
control.
Nodes
.Add(node);
390
control.
Nodes
.Add(node);
418
control.
Nodes
.Add(node);
476
control.
Nodes
.Add("Node1");
477
control.
Nodes
.Add("Node2");
478
control.
Nodes
.Add("Node3");
479
control.
Nodes
.Add("Node4");
483
control.
Nodes
[1].AccessibilityObject.SelectItem();
486
control.
Nodes
[3].AccessibilityObject.SelectItem();
520
control.
Nodes
.Add(firstLevelNode);
540
control.
Nodes
.Add(firstLevelNode);
545
control.
Nodes
.Remove(firstLevelNode);
557
control.
Nodes
.Add(firstLevelNode);
564
control.
Nodes
.Clear();
577
control.
Nodes
.Add(firstLevelNode);
584
control.
Nodes
[0] = new TreeNode();
599
treeView.
Nodes
.Add(node);
System\Windows\Forms\AccessibleObjects\TreeView.TreeViewAccessibleObjectTests.cs (17)
68
control.
Nodes
.AddRange([new("Node 1"), new("Node 2"), new("Node 3")]);
71
AccessibleObject expected = control.
Nodes
[0].AccessibilityObject;
81
control.
Nodes
.AddRange([new("Node 1"), new("Node 2"), new("Node 3")]);
84
AccessibleObject expected = control.
Nodes
[^1].AccessibilityObject;
100
control.
Nodes
.AddRange([new("Node 1"), new("Node 2"), new("Node 3")]);
102
AccessibleObject expected = index >= 0 && index < control.
Nodes
.Count
103
? control.
Nodes
[index].AccessibilityObject
114
control.
Nodes
.AddRange([new("Node 1"), new("Node 2"), new("Node 3")]);
156
control.
Nodes
.Add("Node 1");
178
control.
Nodes
.Add("Item1");
217
control.
Nodes
.AddRange([new("Node 1"), new("Node 2"), new("Node 3")]);
218
control.SelectedNode = control.
Nodes
[1];
220
IRawElementProviderSimple.Interface[] expected = new[] { control.
Nodes
[1].AccessibilityObject };
231
control.
Nodes
.Add(node);
245
control.
Nodes
.Add(node);
260
control.
Nodes
.Add(node);
277
control.
Nodes
.AddRange(nodeNames.Select(name => new TreeNode(name)).ToArray());
System\Windows\Forms\AccessibleObjects\TreeViewLabelEditAccessibleObjectTests.cs (3)
56
Assert.Equal(treeView.
Nodes
[0].AccessibilityObject, accessibilityObject.FragmentNavigate(NavigateDirection.NavigateDirection_Parent));
115
Assert.Equal(treeView.
Nodes
[0].Text, accessibilityObject.Name);
159
treeView.
Nodes
.Add(node);
System\Windows\Forms\TreeNode.IKeyboardToolTipTests.cs (39)
22
treeView.
Nodes
.Add(treeNode);
43
treeView.
Nodes
.Add(treeNode);
64
treeView.
Nodes
.Add(treeNode);
86
treeView.
Nodes
.Add(treeNode);
107
treeView.
Nodes
.Add(treeNode);
121
treeView.
Nodes
.AddRange([.. treeNodesList]);
122
TreeNode firstTreeNode = treeView.
Nodes
[0];
127
Assert.Contains(GetRectangle(treeView, treeView.
Nodes
[1]), neighboringRectangles);
137
treeView.
Nodes
.AddRange([.. treeNodesList]);
138
TreeNode middleTreeNode = treeView.
Nodes
[1];
143
Assert.Contains(GetRectangle(treeView, treeView.
Nodes
[0]), neighboringRectangles);
144
Assert.Contains(GetRectangle(treeView, treeView.
Nodes
[2]), neighboringRectangles);
154
treeView.
Nodes
.AddRange([.. treeNodesList]);
155
TreeNode lastTreeNode = treeView.
Nodes
[0];
160
Assert.Contains(GetRectangle(treeView, treeView.
Nodes
[1]), neighboringRectangles);
170
treeView.
Nodes
.AddRange([.. treeNodesList]);
171
TreeNode rootNode = treeView.
Nodes
[0];
189
treeView.
Nodes
.AddRange([.. treeNodesList]);
190
TreeNode rootNode = treeView.
Nodes
[0];
208
treeView.
Nodes
.AddRange([.. treeNodesList]);
209
TreeNode rootNode = treeView.
Nodes
[0];
217
Assert.Contains(GetRectangle(treeView, treeView.
Nodes
[1]), neighboringRectangles);
227
treeView.
Nodes
.AddRange([.. treeNodesList]);
228
TreeNode rootNode = treeView.
Nodes
[0];
237
Assert.Contains(GetRectangle(treeView, treeView.
Nodes
[1]), neighboringRectangles);
248
treeView.
Nodes
.AddRange([.. treeNodesList]);
249
TreeNode firstNode = treeView.
Nodes
[0];
251
TreeNode middleNode = treeView.
Nodes
[1];
256
Assert.Contains(GetRectangle(treeView, treeView.
Nodes
[2]), neighboringRectangles);
267
treeView.
Nodes
.AddRange([.. treeNodesList]);
268
TreeNode firstNode = treeView.
Nodes
[0];
272
TreeNode middleNode = treeView.
Nodes
[1];
277
Assert.Contains(GetRectangle(treeView, treeView.
Nodes
[2]), neighboringRectangles);
288
treeView.
Nodes
.AddRange([.. treeNodesList]);
289
TreeNode rootNode = treeView.
Nodes
[0];
322
treeView.
Nodes
.Add(treeNode);
345
treeView.
Nodes
.Add(treeNode);
378
treeView.
Nodes
.Add(treeNode);
412
treeView.
Nodes
.Add(treeNode);
System\Windows\Forms\TreeNodeCollectionTests.cs (39)
15
TreeNodeCollection collection = treeView.
Nodes
;
63
TreeNodeCollection collection = treeView.
Nodes
;
74
TreeNodeCollection collection = treeView.
Nodes
;
83
TreeNodeCollection collection = treeView.
Nodes
;
93
TreeNodeCollection collection = treeView.
Nodes
;
104
TreeNodeCollection collection = treeView.
Nodes
;
115
anotherTreeView.
Nodes
.Add("Node 0");
118
TreeNodeCollection collection = treeView.
Nodes
;
120
TreeNode nodeOfAnotherTreeView = anotherTreeView.
Nodes
[0];
129
TreeNodeCollection collection = treeView.
Nodes
;
170
TreeNodeCollection collection = treeView.
Nodes
;
208
TreeNodeCollection collection = treeView.
Nodes
;
238
treeView.
Nodes
.Add(child1);
239
treeView.
Nodes
.Add(child2);
240
treeView.
Nodes
.Add(child3);
259
treeView.
Nodes
.AddRange(treeNodeArray);
261
TreeNode treeNode = treeView.
Nodes
.Find(key, searchAllChildren: true)[0];
263
treeView.
Nodes
.IndexOf(treeNode).Should().Be(3);
303
treeView2.
Nodes
.Add(child1);
304
treeView2.
Nodes
.Add(child2);
305
treeView2.
Nodes
.Add(child3);
309
treeView2.
Nodes
.AddRange(treeNodeArray);
311
treeNode = treeView2.
Nodes
.Find("2", searchAllChildren: true)[0];
313
treeView2.
Nodes
.IndexOf(treeNode).Should().Be(1);
314
treeView2.
Nodes
.Clear();
319
treeView3.
Nodes
.Add(child1);
320
treeView3.
Nodes
.Add(child2);
321
treeView3.
Nodes
.Add(child3);
325
treeView3.
Nodes
.AddRange(treeNodeArray);
327
treeNode = treeView3.
Nodes
.Find("2", searchAllChildren: true)[0];
329
treeView3.
Nodes
.IndexOf(treeNode).Should().Be(1);
337
var collection = treeView.
Nodes
;
348
TreeNodeCollection collection = treeView.
Nodes
;
377
TreeNodeCollection collection = treeView.
Nodes
;
388
TreeNodeCollection collection = treeView.
Nodes
;
413
TreeNodeCollection collection = treeView.
Nodes
;
428
TreeNodeCollection collection = treeView.
Nodes
;
447
TreeNodeCollection collection = treeView.
Nodes
;
489
TreeNodeCollection collection = treeView.
Nodes
;
System\Windows\Forms\TreeNodeTests.cs (152)
282
control.
Nodes
.Add(node);
306
control.
Nodes
.Add(node);
364
control.
Nodes
.Add(node);
392
control.
Nodes
.Add(node);
454
control.
Nodes
.Add(node);
469
control.
Nodes
.Add(node);
521
control.
Nodes
.Add(node);
532
control.
Nodes
.Add(node);
544
control.
Nodes
.Add(node);
583
control.
Nodes
.Add(node);
612
control.
Nodes
.Add(node);
657
control.
Nodes
.Add(node);
683
control.
Nodes
.Add(node);
723
control.
Nodes
.Add(node);
747
control.
Nodes
.Add(node);
805
control.
Nodes
.Add(node);
833
control.
Nodes
.Add(node);
904
control.
Nodes
.Add(node);
926
control.
Nodes
.Add(node);
950
control.
Nodes
.Add(node);
987
control.
Nodes
.Add(node);
1026
control.
Nodes
.Add(node);
1052
control.
Nodes
.Add(node);
1090
control.
Nodes
.Add(node);
1129
control.
Nodes
.Add(node);
1149
control.
Nodes
.Add(node);
1205
control.
Nodes
.Add(node);
1232
control.
Nodes
.Add(node);
1263
control.
Nodes
.Add(node);
1285
control.
Nodes
.Add(node);
1312
control.
Nodes
.Add(node);
1363
control.
Nodes
.Add(node);
1387
control.
Nodes
.Add(node);
1420
control.
Nodes
.Add(node);
1440
control.
Nodes
.Add(node);
1478
control.
Nodes
.Add(node);
1508
control.
Nodes
.Add(node);
1540
control.
Nodes
.Add(node);
1559
control.
Nodes
.Add(node);
1578
control.
Nodes
.Add(node);
1591
control.
Nodes
.Add(node);
1602
control.
Nodes
.Add(node);
1645
control.
Nodes
.Add(parent);
1667
control.
Nodes
.Add(parent);
1695
control.
Nodes
.Add(node);
1706
control.
Nodes
.Add(node);
1727
control.
Nodes
.Add(node);
1740
control.
Nodes
.Add(node);
1751
control.
Nodes
.Add(node);
1780
control.
Nodes
.Add(node);
1799
control.
Nodes
.Add(node);
1811
control.
Nodes
.Add(node);
1824
control.
Nodes
.Add(node);
1835
control.
Nodes
.Add(node);
1863
control.
Nodes
.Add(node);
1881
control.
Nodes
.Add(node);
1893
control.
Nodes
.Add(node);
1906
control.
Nodes
.Add(node);
1917
control.
Nodes
.Add(node);
1965
control.
Nodes
.Add(node);
1976
control.
Nodes
.Add(node);
1988
control.
Nodes
.Add(node);
2001
control.
Nodes
.Add(node);
2012
control.
Nodes
.Add(node);
2055
control.
Nodes
.Add(parent);
2077
control.
Nodes
.Add(parent);
2120
control.
Nodes
.Add(node);
2131
control.
Nodes
.Add(node);
2174
control.
Nodes
.Add(parent);
2196
control.
Nodes
.Add(parent);
2224
control.
Nodes
.Add(node);
2235
control.
Nodes
.Add(node);
2256
control.
Nodes
.Add(node);
2291
control.
Nodes
.Add(parent);
2313
control.
Nodes
.Add(parent);
2341
control.
Nodes
.Add(node);
2371
control.
Nodes
.Add(node);
2409
control.
Nodes
.Add(node);
2420
control.
Nodes
.Add(node);
2463
control.
Nodes
.Add(parent);
2485
control.
Nodes
.Add(parent);
2513
control.
Nodes
.Add(node);
2524
control.
Nodes
.Add(node);
2567
control.
Nodes
.Add(parent);
2589
control.
Nodes
.Add(parent);
2617
control.
Nodes
.Add(node);
2628
control.
Nodes
.Add(node);
2649
control.
Nodes
.Add(node);
2684
control.
Nodes
.Add(parent);
2706
control.
Nodes
.Add(parent);
2734
control.
Nodes
.Add(node);
2764
control.
Nodes
.Add(node);
2818
control.
Nodes
.Add(node);
2842
control.
Nodes
.Add(node);
2895
control.
Nodes
.Add(node);
2923
control.
Nodes
.Add(node);
2969
control.
Nodes
.Add(node);
3008
control.
Nodes
.Add(node);
3034
control.
Nodes
.Add(node);
3072
control.
Nodes
.Add(node);
3111
control.
Nodes
.Add(node);
3131
control.
Nodes
.Add(node);
3187
control.
Nodes
.Add(node);
3216
control.
Nodes
.Add(node);
3247
control.
Nodes
.Add(node);
3269
control.
Nodes
.Add(node);
3296
control.
Nodes
.Add(node);
3347
control.
Nodes
.Add(node);
3371
control.
Nodes
.Add(node);
3404
control.
Nodes
.Add(node);
3424
control.
Nodes
.Add(node);
3462
control.
Nodes
.Add(node);
3492
control.
Nodes
.Add(node);
3524
control.
Nodes
.Add(node);
3543
control.
Nodes
.Add(node);
3562
control.
Nodes
.Add(node);
3592
control.
Nodes
.Add(node);
3635
control.
Nodes
.Add(node);
3676
control.
Nodes
.Add(node);
3715
control.
Nodes
.Add(node);
3763
control.
Nodes
.Add(node);
3798
control.
Nodes
.Add(node);
3851
control.
Nodes
.Add(node);
3881
control.
Nodes
.Add(node);
3913
control.
Nodes
.Add(node);
3943
control.
Nodes
.Add(node);
3987
control.
Nodes
.Add(node);
4018
control.
Nodes
.Add(node);
4050
control.
Nodes
.Add(node);
4080
control.
Nodes
.Add(node);
4111
control.
Nodes
.Add(node);
4153
control.
Nodes
.Add(node);
4176
control.
Nodes
.Add(node);
4214
control.
Nodes
.Add(node);
4252
control.
Nodes
.Add(node);
4292
control.
Nodes
.Add(node);
4315
control.
Nodes
.Add(node);
4334
control.
Nodes
.Add(node);
4391
control.
Nodes
.Add(node);
4412
control.
Nodes
.Add(node);
4448
control.
Nodes
.Add(node);
4473
control.
Nodes
.Add(node);
4507
control.
Nodes
.Add(node);
4518
control.
Nodes
.Add(node);
4561
control.
Nodes
.Add(parent);
4583
control.
Nodes
.Add(parent);
4643
treeView.
Nodes
.Add(treeNode);
4679
treeView.
Nodes
.Add(node1);
4695
treeView.
Nodes
.Add(treeNode);
4740
treeView.
Nodes
.Add(treeNode);
4765
treeView.
Nodes
.Add(treeNode);
4846
treeView.
Nodes
.Add(node);
System\Windows\Forms\TreeViewTests.cs (123)
91
Assert.Same(control.
Nodes
, control.
Nodes
);
92
Assert.Empty(control.
Nodes
);
4743
treeView.
Nodes
.Add(node);
4795
control.
Nodes
.Add(node1);
4821
control.
Nodes
.Add(node1);
4863
control.
Nodes
.Add(node1);
4892
control.
Nodes
.Add(node1);
4934
control.
Nodes
.Add(node1);
4949
control.
Nodes
.Add(node1);
4991
control.
Nodes
.Add(node1);
5020
control.
Nodes
.Add(node1);
5123
control.
Nodes
.Add(node1);
5153
control.
Nodes
.Add(node1);
5203
control.
Nodes
.Add(node1);
5236
control.
Nodes
.Add(node1);
5286
control.
Nodes
.Add(node1);
5305
control.
Nodes
.Add(node1);
5355
control.
Nodes
.Add(node1);
5388
control.
Nodes
.Add(node1);
5783
control.
Nodes
.Add(node);
6029
control.
Nodes
.Add(node);
6110
control.
Nodes
.Add(node);
6224
control.
Nodes
.Add(node);
6656
treeView.
Nodes
.Add(treeNode);
6659
treeView.
Nodes
.Remove(treeNode);
6674
treeView.
Nodes
.AddRange([treeNode1, treeNode2, treeNode3]);
6692
treeView.
Nodes
.Add(treeNode);
6699
treeView.
Nodes
.Remove(treeNode);
6715
treeView.
Nodes
.Add(treeNode);
6720
treeView.
Nodes
.Remove(treeNode);
6733
treeView.
Nodes
.Add(treeNode);
6736
treeView.
Nodes
.Remove(treeNode);
6754
treeView.
Nodes
.Add(treeNode);
6760
treeView.
Nodes
.Remove(treeNode);
6776
treeView.
Nodes
.Insert(0, treeNode);
6794
treeView.
Nodes
.Add(treeNode);
6833
treeView.
Nodes
.AddRange([new("Test 1"), new("Test 2"), new("Test 3")]);
6835
treeView.SelectedNode = treeView.
Nodes
[0];
6837
Assert.True(treeView.
Nodes
[0].IsSelected);
6838
Assert.Equal(3, treeView.
Nodes
.Count);
6839
Assert.Equal(treeView.
Nodes
[0], treeView.SelectedNode);
6841
treeView.
Nodes
.Remove(treeView.
Nodes
[2]);
6843
Assert.True(treeView.
Nodes
[0].IsSelected);
6844
Assert.Equal(2, treeView.
Nodes
.Count);
6845
Assert.Equal(treeView.
Nodes
[0], treeView.SelectedNode);
6847
treeView.
Nodes
.Remove(treeView.
Nodes
[1]);
6849
Assert.True(treeView.
Nodes
[0].IsSelected);
6850
Assert.Single(treeView.
Nodes
);
6851
Assert.Equal(treeView.
Nodes
[0], treeView.SelectedNode);
6859
treeView.
Nodes
.AddRange([new("Test 1"), new("Test 2"), new("Test 3")]);
6861
treeView.SelectedNode = treeView.
Nodes
[0];
6863
for (int count = treeView.
Nodes
.Count; count > 1; count -= 1)
6865
TreeNode node = treeView.
Nodes
[0];
6868
Assert.Equal(count, treeView.
Nodes
.Count);
6871
treeView.
Nodes
.Remove(node);
6875
Assert.Equal(count, treeView.
Nodes
.Count);
6883
Assert.Equal(treeView.
Nodes
[0], treeView.SelectedNode);
6894
treeView.
Nodes
.Add("Test");
6895
TreeNode treeNode = treeView.
Nodes
[0];
6923
treeView.
Nodes
.Add("Test");
6924
TreeNode treeNode = treeView.
Nodes
[0];
6937
treeView.
Nodes
.Remove(node);
6945
Assert.Equal(treeView.
Nodes
[0], treeView.SelectedNode);
6960
treeView.
Nodes
.Add("Test");
6961
TreeNode treeNode = treeView.
Nodes
[0];
6969
Assert.Single(treeView.
Nodes
);
6971
treeView.
Nodes
.Remove(treeNode);
6975
Assert.Empty(treeView.
Nodes
);
6985
treeView.
Nodes
.AddRange([new("Test 1"), new("Test 2"), new("Test 3")]);
6987
treeView.
Nodes
[0].Checked = true;
6989
Assert.True(treeView.
Nodes
[0].Checked);
6990
Assert.Equal(3, treeView.
Nodes
.Count);
6992
treeView.
Nodes
.Remove(treeView.
Nodes
[2]);
6994
Assert.True(treeView.
Nodes
[0].Checked);
6995
Assert.Equal(2, treeView.
Nodes
.Count);
6997
treeView.
Nodes
.Remove(treeView.
Nodes
[1]);
6999
Assert.True(treeView.
Nodes
[0].Checked);
7000
Assert.Single(treeView.
Nodes
);
7010
treeView.
Nodes
.AddRange([new("Test 1"), new("Test 2"), new("Test 3")]);
7012
for (int count = treeView.
Nodes
.Count; count > 1; count -= 1)
7014
TreeNode node = treeView.
Nodes
[0];
7018
Assert.Equal(count, treeView.
Nodes
.Count);
7020
treeView.
Nodes
.Remove(node);
7024
Assert.Equal(count, treeView.
Nodes
.Count);
7036
treeView.
Nodes
.Add("Test");
7037
TreeNode treeNode = treeView.
Nodes
[0];
7064
treeView.
Nodes
.Add("Test");
7065
TreeNode treeNode = treeView.
Nodes
[0];
7076
treeView.
Nodes
.Remove(node);
7092
treeView.
Nodes
.Add("Test");
7093
TreeNode treeNode = treeView.
Nodes
[0];
7096
treeView.
Nodes
[0].Checked = true;
7102
Assert.Single(treeView.
Nodes
);
7104
treeView.
Nodes
.Remove(treeNode);
7109
Assert.Empty(treeView.
Nodes
);
7117
treeView.
Nodes
.Add("Root 1");
7118
treeView.
Nodes
[0].Nodes.Add("Child 1");
7119
treeView.
Nodes
[0].Nodes.Add("Child 2");
7121
treeView.
Nodes
.Add("Root 2");
7122
treeView.
Nodes
[1].Nodes.Add("Child 3");
7123
treeView.
Nodes
[1].Nodes.Add("Child 4");
7146
treeView.
Nodes
.Add(parent);
7169
treeView.
Nodes
.Add(parent);
7190
treeView.
Nodes
.Add(parent);
7225
treeView.
Nodes
.Add(parent);
7279
treeView.
Nodes
.AddRange(parent);
7323
treeView.
Nodes
.Add(rootNode);
7329
rootNode.Should().Be(treeView.
Nodes
[0]);
7378
treeView.
Nodes
.Add(node);
7416
treeView.
Nodes
.Add(rootNode);
7438
treeView.
Nodes
[0].IsExpanded.Should().BeFalse();
7439
treeView.
Nodes
[1].IsExpanded.Should().BeFalse();
7449
treeView.
Nodes
[0].IsExpanded.Should().BeTrue();
7450
treeView.
Nodes
[1].IsExpanded.Should().BeTrue();
7528
treeView.
Nodes
.Add(new TreeNode("Node1"));
7529
treeView.
Nodes
.Add(new TreeNode("Node2"));
7531
treeView.ToString().Should().Be($"System.Windows.Forms.TreeView, Nodes.Count: 2, Nodes[0]: {treeView.
Nodes
[0]}");
7562
treeView.
Nodes
.Add($"Node{i}");
System.Windows.Forms.UI.IntegrationTests (1)
DesignBehaviorsTests.cs (1)
54
TreeNode? node = treeView.
Nodes
.Add("root");
WinFormsControlsTest (2)
ScrollableControls.Designer.cs (1)
402
treeView1.
Nodes
.AddRange(new TreeNode[] { treeNode9 });
TreeViewTest.Designer.cs (1)
46
this.treeView1.
Nodes
.AddRange(new System.Windows.Forms.TreeNode[] {