4 types derived from TreeNode
System.Windows.Forms.Design (2)
System\ComponentModel\Design\ObjectSelectorEditor.SelectorNode.cs (1)
10
public class SelectorNode :
TreeNode
System\Windows\Forms\Design\DesignBindingPicker.cs (1)
2110
internal class BindingPickerNode :
TreeNode
System.Windows.Forms.Tests (2)
System\Windows\Forms\AccessibleObjects\TreeNode.TreeNodeAccessibleObjectTests.cs (1)
622
private class AccessibilityObjectDisconnectTrackingTreeNode :
TreeNode
System\Windows\Forms\TreeNodeTests.cs (1)
4948
private class SubTreeNode :
TreeNode
491 instantiations of TreeNode
Accessibility_Core_App (9)
CommonControl2.Designer.cs (8)
31
System.Windows.Forms.TreeNode treeNode1 =
new
("Node10WinformsTeam");
32
System.Windows.Forms.TreeNode treeNode2 =
new
("Node11");
33
System.Windows.Forms.TreeNode treeNode3 =
new
("Node1", new [] {
36
System.Windows.Forms.TreeNode treeNode4 =
new
("Node20");
37
System.Windows.Forms.TreeNode treeNode5 =
new
("Node2", new [] {
39
System.Windows.Forms.TreeNode treeNode6 =
new
("Node0", new [] {
42
System.Windows.Forms.TreeNode treeNode7 =
new
("Node4");
43
System.Windows.Forms.TreeNode treeNode8 =
new
("Node3", new [] {
DataBindingExample.cs (1)
77
TreeNode node =
new
()
System.Windows.Forms (15)
System\Windows\Forms\Controls\TreeView\TreeNode.cs (1)
1349
? new
TreeNode
(_text, ImageIndexer.Index, SelectedImageIndexer.Index)
System\Windows\Forms\Controls\TreeView\TreeNodeCollection.cs (12)
130
TreeNode tn =
new
(text);
142
TreeNode tn =
new
(text)
155
TreeNode tn =
new
(text)
169
TreeNode tn =
new
(text)
183
TreeNode tn =
new
(text, imageIndex, selectedImageIndex)
196
TreeNode tn =
new
(text)
494
TreeNode tn =
new
(text);
504
TreeNode tn =
new
(text)
517
TreeNode tn =
new
(text)
531
TreeNode tn =
new
(text)
545
TreeNode tn =
new
(text, imageIndex, selectedImageIndex)
558
TreeNode tn =
new
(text)
System\Windows\Forms\Controls\TreeView\TreeView.cs (1)
164
_root = new
TreeNode
(this);
System\Windows\Forms\Design\ComponentEditorForm.cs (1)
212
_selector.Nodes.Add(new
TreeNode
(title, n, n));
System.Windows.Forms.Tests (458)
SerializableTypesTests.cs (3)
345
var children = new TreeNode[] {
new
("node2"),
new
("node3") };
346
TreeNode treeNodeIn =
new
("node1", 1, 2, children)
System\Windows\Forms\AccessibleObjects\TreeNode.TreeNodeAccessibleObjectTests.cs (6)
38
TreeNode node =
new
();
145
TreeNode node =
new
();
324
TreeNode node =
new
();
372
TreeNode node =
new
();
584
control.Nodes[0] = new
TreeNode
();
598
TreeNode node =
new
("Node");
System\Windows\Forms\AccessibleObjects\TreeView.TreeViewAccessibleObjectTests.cs (4)
230
TreeNode node =
new
("First node.");
244
TreeNode node =
new
("First node.");
259
TreeNode node =
new
("First node.");
277
control.Nodes.AddRange(nodeNames.Select(name => new
TreeNode
(name)).ToArray());
System\Windows\Forms\AccessibleObjects\TreeViewLabelEditAccessibleObjectTests.cs (1)
158
TreeNode node =
new
("node1");
System\Windows\Forms\BinaryFormat\WinFormsBinaryFormattedObjectTests.cs (1)
228
new
TreeNode
(),
System\Windows\Forms\DrawTreeNodeEventArgsTests.cs (3)
14
yield return new object[] { new
TreeNode
(), new Rectangle(1, 2, 3, 4), TreeNodeStates.Checked };
15
yield return new object[] { new
TreeNode
(), new Rectangle(-1, -2, -3, -4), TreeNodeStates.Checked };
38
DrawTreeNodeEventArgs e = new(graphics, new
TreeNode
(), new Rectangle(1, 2, 3, 4), TreeNodeStates.Checked)
System\Windows\Forms\NodeLabelEditEventArgsTests.cs (4)
12
yield return new object[] { new
TreeNode
() };
28
yield return new object[] { new
TreeNode
(), "" };
29
yield return new object[] { new
TreeNode
(), "label" };
47
NodeLabelEditEventArgs e = new(new
TreeNode
())
System\Windows\Forms\TreeNode.IKeyboardToolTipTests.cs (16)
19
TreeNode treeNode =
new
();
39
TreeNode treeNode =
new
();
60
TreeNode treeNode =
new
();
82
TreeNode treeNode =
new
() { ToolTipText = toolTipText };
101
TreeNode treeNode =
new
();
316
TreeNode treeNode =
new
();
339
TreeNode treeNode =
new
();
372
TreeNode treeNode =
new
();
408
TreeNode treeNode =
new
();
422
TreeNode rootNode1 =
new
();
423
TreeNode rootNode2 =
new
();
424
TreeNode rootNode3 =
new
();
426
TreeNode subNode1 =
new
();
427
TreeNode subNode2 =
new
();
428
TreeNode subNode3 =
new
();
430
TreeNode subSubNode =
new
();
System\Windows\Forms\TreeNodeCollectionTests.cs (22)
76
Assert.Throws<ArgumentOutOfRangeException>("index", () => collection[index] = new
TreeNode
());
84
TreeNode node =
new
("Node 0");
94
TreeNode node =
new
("Node 0");
131
collection[0] = new
TreeNode
("New node 1");
142
TreeNode child1 =
new
()
146
TreeNode child2 =
new
()
150
TreeNode child3 =
new
()
155
TreeNode grandchild1 =
new
()
159
TreeNode grandchild2 =
new
()
163
TreeNode grandchild3 =
new
()
196
TreeNode child1 =
new
()
200
TreeNode child2 =
new
()
204
TreeNode child3 =
new
()
222
TreeNode child1 =
new
()
227
TreeNode child2 =
new
()
232
TreeNode child3 =
new
()
269
TreeNode child1 =
new
()
274
TreeNode child2 =
new
()
279
TreeNode child3 =
new
()
346
TreeNode child1 =
new
() { Name = "name1" };
347
TreeNode child2 =
new
() { Name = "name2" };
513
TreeNode node =
new
(nodeName);
System\Windows\Forms\TreeNodeConverterTests.cs (1)
28
TreeNode node =
new
("Test");
System\Windows\Forms\TreeNodeMouseClickEventArgsTests.cs (2)
14
yield return new object[] { new
TreeNode
(), (MouseButtons)1, 0, 0, 0 };
15
yield return new object[] { new
TreeNode
(), (MouseButtons)3, -1, -1, -1 };
System\Windows\Forms\TreeNodeMouseHoverEventArgsTests.cs (1)
12
yield return new object[] { new
TreeNode
() };
System\Windows\Forms\TreeNodeTests.cs (306)
16
TreeNode node =
new
();
56
TreeNode node =
new
(text);
104
TreeNode node =
new
(text, children);
147
TreeNode node =
new
(text, imageIndex, selectedImageIndex);
195
TreeNode node =
new
(text, imageIndex, selectedImageIndex, children);
234
Assert.Throws<ArgumentNullException>("nodes", () => new
TreeNode
("text", null));
235
Assert.Throws<ArgumentNullException>("nodes", () => new
TreeNode
("text", 0, 0, null));
249
Assert.Throws<ArgumentOutOfRangeException>("value", () => new
TreeNode
("text", imageIndex, 0));
250
Assert.Throws<ArgumentOutOfRangeException>("value", () => new
TreeNode
("text", imageIndex, 0, Array.Empty<TreeNode>()));
257
Assert.Throws<ArgumentOutOfRangeException>("value", () => new
TreeNode
("text", 0, selectedImageIndex));
258
Assert.Throws<ArgumentOutOfRangeException>("value", () => new
TreeNode
("text", 0, selectedImageIndex, Array.Empty<TreeNode>()));
265
TreeNode node =
new
()
281
TreeNode node =
new
();
305
TreeNode node =
new
();
342
TreeNode node =
new
()
360
TreeNode node =
new
()
388
TreeNode node =
new
()
421
TreeNode node =
new
();
437
TreeNode node =
new
();
453
TreeNode node =
new
();
468
TreeNode node =
new
();
520
TreeNode node =
new
();
531
TreeNode node =
new
();
543
TreeNode node =
new
();
556
TreeNode node =
new
()
582
TreeNode node =
new
();
611
TreeNode node =
new
();
656
TreeNode node =
new
();
682
TreeNode node =
new
();
706
TreeNode node =
new
()
722
TreeNode node =
new
();
746
TreeNode node =
new
();
783
TreeNode node =
new
()
801
TreeNode node =
new
()
829
TreeNode node =
new
()
862
TreeNode node =
new
();
878
TreeNode node =
new
();
893
TreeNode node =
new
();
903
TreeNode node =
new
();
922
TreeNode node =
new
()
949
TreeNode node =
new
();
973
TreeNode node =
new
()
1011
TreeNode node =
new
()
1051
TreeNode node =
new
();
1089
TreeNode node =
new
();
1128
TreeNode node =
new
();
1148
TreeNode node =
new
();
1204
TreeNode node =
new
();
1231
TreeNode node =
new
();
1262
TreeNode node =
new
();
1284
TreeNode node =
new
();
1303
TreeNode node =
new
();
1311
TreeNode node =
new
();
1324
TreeNode node =
new
()
1343
TreeNode node =
new
()
1362
TreeNode node =
new
();
1386
TreeNode node =
new
();
1419
TreeNode node =
new
();
1439
TreeNode node =
new
();
1477
TreeNode node =
new
();
1507
TreeNode node =
new
();
1539
TreeNode node =
new
();
1558
TreeNode node =
new
();
1577
TreeNode node =
new
();
1590
TreeNode node =
new
();
1601
TreeNode node =
new
();
1621
TreeNode parent =
new
();
1622
TreeNode node1 =
new
();
1623
TreeNode node2 =
new
();
1624
TreeNode node3 =
new
();
1625
TreeNode node4 =
new
();
1640
TreeNode parent =
new
();
1641
TreeNode node1 =
new
();
1642
TreeNode node2 =
new
();
1643
TreeNode node3 =
new
();
1644
TreeNode node4 =
new
();
1662
TreeNode parent =
new
();
1663
TreeNode node1 =
new
();
1664
TreeNode node2 =
new
();
1665
TreeNode node3 =
new
();
1666
TreeNode node4 =
new
();
1694
TreeNode node =
new
();
1705
TreeNode node =
new
();
1726
TreeNode node =
new
();
1739
TreeNode node =
new
();
1750
TreeNode node =
new
();
1779
TreeNode node =
new
();
1798
TreeNode node =
new
();
1810
TreeNode node =
new
();
1823
TreeNode node =
new
();
1834
TreeNode node =
new
();
1862
TreeNode node =
new
();
1880
TreeNode node =
new
();
1892
TreeNode node =
new
();
1905
TreeNode node =
new
();
1916
TreeNode node =
new
();
1964
TreeNode node =
new
();
1975
TreeNode node =
new
();
1987
TreeNode node =
new
();
2000
TreeNode node =
new
();
2011
TreeNode node =
new
();
2031
TreeNode parent =
new
();
2032
TreeNode node1 =
new
();
2033
TreeNode node2 =
new
();
2034
TreeNode node3 =
new
();
2035
TreeNode node4 =
new
();
2050
TreeNode parent =
new
();
2051
TreeNode node1 =
new
();
2052
TreeNode node2 =
new
();
2053
TreeNode node3 =
new
();
2054
TreeNode node4 =
new
();
2072
TreeNode parent =
new
();
2073
TreeNode node1 =
new
();
2074
TreeNode node2 =
new
();
2075
TreeNode node3 =
new
();
2076
TreeNode node4 =
new
();
2104
TreeNode node =
new
()
2119
TreeNode node =
new
();
2130
TreeNode node =
new
();
2150
TreeNode parent =
new
();
2151
TreeNode node1 =
new
();
2152
TreeNode node2 =
new
();
2153
TreeNode node3 =
new
();
2154
TreeNode node4 =
new
();
2169
TreeNode parent =
new
();
2170
TreeNode node1 =
new
();
2171
TreeNode node2 =
new
();
2172
TreeNode node3 =
new
();
2173
TreeNode node4 =
new
();
2191
TreeNode parent =
new
();
2192
TreeNode node1 =
new
();
2193
TreeNode node2 =
new
();
2194
TreeNode node3 =
new
();
2195
TreeNode node4 =
new
();
2223
TreeNode node =
new
();
2234
TreeNode node =
new
();
2255
TreeNode node =
new
();
2267
TreeNode parent =
new
();
2268
TreeNode node1 =
new
();
2269
TreeNode node2 =
new
();
2270
TreeNode node3 =
new
();
2271
TreeNode node4 =
new
();
2286
TreeNode parent =
new
();
2287
TreeNode node1 =
new
();
2288
TreeNode node2 =
new
();
2289
TreeNode node3 =
new
();
2290
TreeNode node4 =
new
();
2308
TreeNode parent =
new
();
2309
TreeNode node1 =
new
();
2310
TreeNode node2 =
new
();
2311
TreeNode node3 =
new
();
2312
TreeNode node4 =
new
();
2340
TreeNode node =
new
();
2370
TreeNode node =
new
();
2408
TreeNode node =
new
();
2419
TreeNode node =
new
();
2439
TreeNode parent =
new
();
2440
TreeNode node1 =
new
();
2441
TreeNode node2 =
new
();
2442
TreeNode node3 =
new
();
2443
TreeNode node4 =
new
();
2458
TreeNode parent =
new
();
2459
TreeNode node1 =
new
();
2460
TreeNode node2 =
new
();
2461
TreeNode node3 =
new
();
2462
TreeNode node4 =
new
();
2480
TreeNode parent =
new
();
2481
TreeNode node1 =
new
();
2482
TreeNode node2 =
new
();
2483
TreeNode node3 =
new
();
2484
TreeNode node4 =
new
();
2512
TreeNode node =
new
();
2523
TreeNode node =
new
();
2543
TreeNode parent =
new
();
2544
TreeNode node1 =
new
();
2545
TreeNode node2 =
new
();
2546
TreeNode node3 =
new
();
2547
TreeNode node4 =
new
();
2562
TreeNode parent =
new
();
2563
TreeNode node1 =
new
();
2564
TreeNode node2 =
new
();
2565
TreeNode node3 =
new
();
2566
TreeNode node4 =
new
();
2584
TreeNode parent =
new
();
2585
TreeNode node1 =
new
();
2586
TreeNode node2 =
new
();
2587
TreeNode node3 =
new
();
2588
TreeNode node4 =
new
();
2616
TreeNode node =
new
();
2627
TreeNode node =
new
();
2648
TreeNode node =
new
();
2660
TreeNode parent =
new
();
2661
TreeNode node1 =
new
();
2662
TreeNode node2 =
new
();
2663
TreeNode node3 =
new
();
2664
TreeNode node4 =
new
();
2679
TreeNode parent =
new
();
2680
TreeNode node1 =
new
();
2681
TreeNode node2 =
new
();
2682
TreeNode node3 =
new
();
2683
TreeNode node4 =
new
();
2701
TreeNode parent =
new
();
2702
TreeNode node1 =
new
();
2703
TreeNode node2 =
new
();
2704
TreeNode node3 =
new
();
2705
TreeNode node4 =
new
();
2733
TreeNode node =
new
();
2763
TreeNode node =
new
();
2801
TreeNode node =
new
()
2817
TreeNode node =
new
();
2841
TreeNode node =
new
();
2872
TreeNode node =
new
()
2891
TreeNode node =
new
()
2919
TreeNode node =
new
()
2955
TreeNode node =
new
()
2993
TreeNode node =
new
()
3033
TreeNode node =
new
();
3071
TreeNode node =
new
();
3110
TreeNode node =
new
();
3130
TreeNode node =
new
();
3186
TreeNode node =
new
();
3215
TreeNode node =
new
();
3246
TreeNode node =
new
();
3268
TreeNode node =
new
();
3287
TreeNode node =
new
();
3295
TreeNode node =
new
();
3308
TreeNode node =
new
()
3327
TreeNode node =
new
()
3346
TreeNode node =
new
();
3370
TreeNode node =
new
();
3403
TreeNode node =
new
();
3423
TreeNode node =
new
();
3461
TreeNode node =
new
();
3491
TreeNode node =
new
();
3523
TreeNode node =
new
();
3542
TreeNode node =
new
();
3561
TreeNode node =
new
();
3578
TreeNode node =
new
()
3620
TreeNode node =
new
()
3675
TreeNode node =
new
();
3714
TreeNode node =
new
();
3762
TreeNode node =
new
();
3797
TreeNode node =
new
();
3850
TreeNode node =
new
();
3880
TreeNode node =
new
();
3912
TreeNode node =
new
();
3942
TreeNode node =
new
();
3978
TreeNode node =
new
();
3986
TreeNode node =
new
();
4004
TreeNode node =
new
()
4035
TreeNode node =
new
()
4079
TreeNode node =
new
();
4110
TreeNode node =
new
();
4152
TreeNode node =
new
();
4175
TreeNode node =
new
();
4213
TreeNode node =
new
();
4251
TreeNode node =
new
();
4291
TreeNode node =
new
();
4314
TreeNode node =
new
();
4333
TreeNode node =
new
();
4346
TreeNode node =
new
()
4361
TreeNode node =
new
()
4390
TreeNode node =
new
();
4411
TreeNode node =
new
();
4447
TreeNode node =
new
();
4472
TreeNode node =
new
();
4491
TreeNode node =
new
()
4506
TreeNode node =
new
();
4517
TreeNode node =
new
();
4537
TreeNode parent =
new
();
4538
TreeNode node1 =
new
();
4539
TreeNode node2 =
new
();
4540
TreeNode node3 =
new
();
4541
TreeNode node4 =
new
();
4556
TreeNode parent =
new
();
4557
TreeNode node1 =
new
();
4558
TreeNode node2 =
new
();
4559
TreeNode node3 =
new
();
4560
TreeNode node4 =
new
();
4578
TreeNode parent =
new
();
4579
TreeNode node1 =
new
();
4580
TreeNode node2 =
new
();
4581
TreeNode node3 =
new
();
4582
TreeNode node4 =
new
();
4609
TreeNode rootNode =
new
();
4610
TreeNode subNodeLevel1 =
new
();
4611
TreeNode subNodeLevel2 =
new
();
4612
TreeNode subNodeLevel3 =
new
();
4627
TreeNode treeNode =
new
();
4628
TreeNode treeSubNode =
new
();
4642
TreeNode treeNode =
new
("Node 1");
4663
TreeNode treeNode =
new
()
4677
TreeNode node1 =
new
(nodeName1);
4678
TreeNode node2 =
new
(nodeName2);
4694
TreeNode treeNode =
new
();
4717
TreeNode treeNode =
new
()
4723
treeNode.Nodes.Add(new
TreeNode
(childNode1));
4724
treeNode.Nodes.Add(new
TreeNode
(childNode2));
4739
TreeNode treeNode =
new
();
4755
TreeNode treeNode =
new
();
4764
TreeNode treeNode =
new
();
4773
TreeNode node =
new
();
4828
TreeNode node =
new
();
4831
TreeNode child =
new
();
4832
child.Nodes.Add(new
TreeNode
());
4845
TreeNode node =
new
();
System\Windows\Forms\TreeViewCancelEventArgsTests.cs (1)
12
yield return new object[] { new
TreeNode
(), true, TreeViewAction.ByKeyboard };
System\Windows\Forms\TreeViewEventArgsTests.cs (2)
12
yield return new object[] { new
TreeNode
() };
27
yield return new object[] { new
TreeNode
(), TreeViewAction.ByKeyboard };
System\Windows\Forms\TreeViewHitTestInfoTests.cs (2)
13
yield return new object[] { new
TreeNode
(), hitLocation };
17
yield return new object[] { new
TreeNode
(), 0 };
System\Windows\Forms\TreeViewTests.cs (83)
4742
TreeNode node =
new
();
4794
TreeNode node1 =
new
("Some Long Text");
4820
TreeNode node1 =
new
("Some Long Text");
4862
TreeNode node1 =
new
("Some Long Text");
4891
TreeNode node1 =
new
("Some Long Text");
4933
TreeNode node1 =
new
("Some Long Text");
4948
TreeNode node1 =
new
("Some Long Text");
4990
TreeNode node1 =
new
("Some Long Text");
5019
TreeNode node1 =
new
("Some Long Text");
5122
TreeNode node1 =
new
("Some Long Text");
5152
TreeNode node1 =
new
("Some Long Text");
5202
TreeNode node1 =
new
("Some Long Text");
5235
TreeNode node1 =
new
("Some Long Text");
5285
TreeNode node1 =
new
("Some Long Text");
5304
TreeNode node1 =
new
("Some Long Text");
5354
TreeNode node1 =
new
("Some Long Text");
5387
TreeNode node1 =
new
("Some Long Text");
5418
yield return new object[] { new TreeViewEventArgs(new
TreeNode
()) };
5419
yield return new object[] { new TreeViewEventArgs(new
TreeNode
(), TreeViewAction.ByMouse) };
5503
yield return new object[] { new NodeLabelEditEventArgs(new
TreeNode
()) };
5504
yield return new object[] { new NodeLabelEditEventArgs(new
TreeNode
(), "label") };
5563
yield return new object[] { new TreeViewCancelEventArgs(new
TreeNode
(), true, TreeViewAction.ByKeyboard) };
5670
yield return new object[] { new DrawTreeNodeEventArgs(graphics, new
TreeNode
(), new Rectangle(1, 2, 3, 4), TreeNodeStates.Checked) };
5782
TreeNode node =
new
();
6028
TreeNode node =
new
();
6109
TreeNode node =
new
();
6223
TreeNode node =
new
();
6418
yield return new object[] { new TreeNodeMouseClickEventArgs(new
TreeNode
(), MouseButtons.Right, 1, 2, 3) };
6473
yield return new object[] { new TreeNodeMouseHoverEventArgs(new
TreeNode
()) };
6655
TreeNode treeNode =
new
();
6669
TreeNode treeNode1 =
new
();
6670
TreeNode treeNode2 =
new
();
6671
TreeNode treeNode3 =
new
();
6688
TreeNode treeNode =
new
();
6689
TreeNode treeSubNodeLevel1 =
new
();
6690
TreeNode treeSubNodeLevel2 =
new
();
6709
TreeNode treeNode =
new
();
6710
TreeNode treeSubNodeLevel1 =
new
();
6711
TreeNode treeSubNodeLevel2 =
new
();
6730
TreeNode treeNode =
new
();
6748
TreeNode treeNode =
new
();
6749
TreeNode treeSubNodeLevel1 =
new
();
6750
TreeNode treeSubNodeLevel2 =
new
();
6774
TreeNode treeNode =
new
();
6788
TreeNode treeNode =
new
();
6789
TreeNode treeSubNodeLevel1 =
new
();
6790
TreeNode treeSubNodeLevel2 =
new
();
7145
TreeNode parent =
new
("Parent");
7148
TreeNode firstNode =
new
(firstNodeText);
7150
TreeNode secondNode =
new
(secondNodeText);
7168
TreeNode parent =
new
("Parent");
7171
TreeNode firstNode =
new
(firstNodeText);
7173
TreeNode secondNode =
new
(secondNodeText);
7189
TreeNode parent =
new
("Parent");
7192
TreeNode treeNode1 =
new
("Node1");
7193
TreeNode treeNode2 =
new
("Node0");
7194
TreeNode treeNode3 =
new
("Node2");
7224
TreeNode parent =
new
("Parent");
7227
TreeNode lastSubNode1 =
new
("Node1");
7228
TreeNode lastSubNode2 =
new
("Node2");
7229
TreeNode lastSubNode3 =
new
("Node3");
7231
TreeNode fifthSubNode2 =
new
("SubNode1-1-1-2");
7233
TreeNode fourthSubNode2 =
new
("SubNode1-1-2");
7235
TreeNode thirdSubNode2 =
new
("SubNode1-2");
7237
TreeNode secondSubNode2 =
new
("SubNode2");
7273
TreeNode treeNode1 =
new
("Node1");
7274
TreeNode treeNode2 =
new
("Node2");
7275
TreeNode treeNode3 =
new
("Node3");
7276
TreeNode treeNode4 =
new
("Node3");
7314
TreeNode treeNode1 =
new
("a0");
7315
TreeNode treeNode2 =
new
("b0");
7316
TreeNode treeNode3 =
new
("c0");
7317
TreeNode treeNode4 =
new
("a1");
7318
TreeNode treeNode5 =
new
("b1");
7319
TreeNode treeNode6 =
new
("c1");
7320
TreeNode treeNode7 =
new
("a2");
7321
TreeNode rootNode = new("Root", [new
TreeNode
("child")]);
7374
TreeNode node = nodeName is null ? null : new
TreeNode
(nodeName);
7415
TreeNode rootNode =
new
(root);
7420
TreeNode childNode =
new
(child);
7425
TreeNode grandChildNode =
new
(grandChild);
7528
treeView.Nodes.Add(new
TreeNode
("Node1"));
7529
treeView.Nodes.Add(new
TreeNode
("Node2"));
WinFormsControlsTest (9)
ScrollableControls.Designer.cs (9)
36
TreeNode treeNode1 = new
TreeNode
("Node8");
37
TreeNode treeNode2 = new
TreeNode
("Node7", new TreeNode[] { treeNode1 });
38
TreeNode treeNode3 = new
TreeNode
("Node6", new TreeNode[] { treeNode2 });
39
TreeNode treeNode4 = new
TreeNode
("Node5", new TreeNode[] { treeNode3 });
40
TreeNode treeNode5 = new
TreeNode
("Node4", new TreeNode[] { treeNode4 });
41
TreeNode treeNode6 = new
TreeNode
("Node3", new TreeNode[] { treeNode5 });
42
TreeNode treeNode7 = new
TreeNode
("Node2", new TreeNode[] { treeNode6 });
43
TreeNode treeNode8 = new
TreeNode
("Node1", new TreeNode[] { treeNode7 });
44
TreeNode treeNode9 = new
TreeNode
("Node0", new TreeNode[] { treeNode8 });
819 references to TreeNode
Accessibility_Core_App (10)
CommonControl2.Designer.cs (9)
31
System.Windows.Forms.
TreeNode
treeNode1 = new("Node10WinformsTeam");
32
System.Windows.Forms.
TreeNode
treeNode2 = new("Node11");
33
System.Windows.Forms.
TreeNode
treeNode3 = new("Node1", new [] {
36
System.Windows.Forms.
TreeNode
treeNode4 = new("Node20");
37
System.Windows.Forms.
TreeNode
treeNode5 = new("Node2", new [] {
39
System.Windows.Forms.
TreeNode
treeNode6 = new("Node0", new [] {
42
System.Windows.Forms.
TreeNode
treeNode7 = new("Node4");
43
System.Windows.Forms.
TreeNode
treeNode8 = new("Node3", new [] {
194
this.treeView1.Nodes.AddRange(new System.Windows.Forms.
TreeNode
[] {
DataBindingExample.cs (1)
77
TreeNode
node = new()
System.Windows.Forms (176)
System\Windows\Forms\Controls\TreeView\DrawTreeNodeEventArgs.cs (2)
18
TreeNode
? node,
36
public
TreeNode
? Node { get; }
System\Windows\Forms\Controls\TreeView\NodeLabelEditEventArgs.cs (3)
12
public NodeLabelEditEventArgs(
TreeNode
? node)
17
public NodeLabelEditEventArgs(
TreeNode
? node, string? label)
23
public
TreeNode
? Node { get; }
System\Windows\Forms\Controls\TreeView\TreeNode.cs (41)
95
internal
TreeNode
[] _children = [];
96
internal
TreeNode
? _parent;
136
public TreeNode(string? text,
TreeNode
[] children)
155
public TreeNode(string? text, int imageIndex, int selectedImageIndex,
TreeNode
[] children)
381
public
TreeNode
? FirstNode => _childCount == 0 ? null : _children[0];
383
private
TreeNode
? FirstVisibleParent
387
TreeNode
? node = this;
643
public
TreeNode
? LastNode
666
public
TreeNode
? NextNode
686
public
TreeNode
? NextVisibleNode
698
TreeNode
? node = FirstVisibleParent;
790
public
TreeNode
? Parent
810
public
TreeNode
? PrevNode
844
public
TreeNode
? PrevVisibleNode
850
TreeNode
? node = FirstVisibleParent;
1123
internal int AddSorted(TreeView parentTreeView,
TreeNode
node)
1191
public static
TreeNode
? FromHandle(TreeView tree, IntPtr handle) => tree.NodeFromHandle(handle);
1200
TreeNode
[] newOrder = new
TreeNode
[_childCount];
1348
TreeNode
node = clonedType == typeof(
TreeNode
)
1350
: (
TreeNode
)Activator.CreateInstance(clonedType)!;
1381
node._children = new
TreeNode
[_childCount];
1384
node.Nodes.Add((
TreeNode
)_children[i].Clone());
1573
TreeNode
[] childNodes = new
TreeNode
[childCount];
1577
childNodes[i] = (
TreeNode
)serializationInfo.GetValue($"children{i}", typeof(
TreeNode
))!;
1612
_children = new
TreeNode
[size];
1622
TreeNode
[] bigger = new
TreeNode
[newSize];
1707
TreeNode
node = this;
1716
internal List<
TreeNode
> GetSelfAndChildNodes()
1718
List<
TreeNode
> nodes = [this];
1722
void AggregateChildNodesToList(
TreeNode
parentNode)
1724
foreach (
TreeNode
child in parentNode.Nodes)
1769
internal void CheckParentingCycle(
TreeNode
candidateToAdd)
1771
TreeNode
? node = this;
1787
internal void InsertNodeAt(int index,
TreeNode
node)
1841
TreeNode
? prev = PrevNode;
2085
si.AddValue($"children{i}", _children[i], typeof(
TreeNode
));
System\Windows\Forms\Controls\TreeView\TreeNode.IKeyboardToolTip.cs (2)
22
TreeNode
? nextNode = NextVisibleNode;
23
TreeNode
? prevNode = PrevVisibleNode;
System\Windows\Forms\Controls\TreeView\TreeNode.TreeNodeAccessibleObject.cs (2)
14
private readonly
TreeNode
_owningTreeNode;
17
public TreeNodeAccessibleObject(
TreeNode
owningTreeNode, TreeView owningTreeView)
System\Windows\Forms\Controls\TreeView\TreeNode.TreeNodeImageIndexer.cs (2)
12
private readonly
TreeNode
_owner;
16
public TreeNodeImageIndexer(
TreeNode
node, ImageListType imageListType)
System\Windows\Forms\Controls\TreeView\TreeNodeCollection.cs (51)
14
private readonly
TreeNode
_owner;
21
internal TreeNodeCollection(
TreeNode
owner)
31
public virtual
TreeNode
this[int index]
47
TreeNode
actual = _owner._children[index];
76
if (value is
TreeNode
treeNode)
90
public virtual
TreeNode
? this[string? key]
128
public virtual
TreeNode
Add(string? text)
130
TreeNode
tn = new(text);
140
public virtual
TreeNode
Add(string? key, string? text)
142
TreeNode
tn = new(text)
153
public virtual
TreeNode
Add(string? key, string? text, int imageIndex)
155
TreeNode
tn = new(text)
167
public virtual
TreeNode
Add(string? key, string? text, string? imageKey)
169
TreeNode
tn = new(text)
181
public virtual
TreeNode
Add(string? key, string? text, int imageIndex, int selectedImageIndex)
183
TreeNode
tn = new(text, imageIndex, selectedImageIndex)
194
public virtual
TreeNode
Add(string? key, string? text, string? imageKey, string? selectedImageKey)
196
TreeNode
tn = new(text)
208
public virtual void AddRange(params
TreeNode
[] nodes)
218
if (tv is not null && nodes.Length >
TreeNode
.MAX_TREENODES_OPS)
235
if (tv is not null && nodes.Length >
TreeNode
.MAX_TREENODES_OPS)
241
public
TreeNode
[] Find(string key, bool searchAllChildren)
245
List<
TreeNode
> foundNodes = FindInternal(key, searchAllChildren, this, []);
250
private static List<
TreeNode
> FindInternal(
254
List<
TreeNode
> foundTreeNodes)
295
public virtual int Add(
TreeNode
node) => AddInternal(node, delta: 0);
297
private int AddInternal(
TreeNode
node, int delta)
314
foreach (
TreeNode
treeNode in node.GetSelfAndChildNodes())
360
if (node is
TreeNode
treeNode)
370
public bool Contains(
TreeNode
node) => IndexOf(node) != -1;
377
bool IList.Contains(object? node) => node is
TreeNode
treeNode && Contains(treeNode);
379
public int IndexOf(
TreeNode
node)
393
node is
TreeNode
treeNode
435
public virtual void Insert(int index,
TreeNode
node)
450
foreach (
TreeNode
treeNode in node.GetSelfAndChildNodes())
477
if (node is
TreeNode
treeNode)
492
public virtual
TreeNode
Insert(int index, string? text)
494
TreeNode
tn = new(text);
502
public virtual
TreeNode
Insert(int index, string? key, string? text)
504
TreeNode
tn = new(text)
515
public virtual
TreeNode
Insert(int index, string? key, string? text, int imageIndex)
517
TreeNode
tn = new(text)
529
public virtual
TreeNode
Insert(int index, string? key, string? text, string? imageKey)
531
TreeNode
tn = new(text)
543
public virtual
TreeNode
Insert(int index, string? key, string? text, int imageIndex, int selectedImageIndex)
545
TreeNode
tn = new(text, imageIndex, selectedImageIndex)
556
public virtual
TreeNode
Insert(int index, string? key, string? text, string? imageKey, string? selectedImageKey)
558
TreeNode
tn = new(text)
591
public void Remove(
TreeNode
node)
598
if (node is
TreeNode
treeNode)
629
return Array.Empty<
TreeNode
>().GetEnumerator();
System\Windows\Forms\Controls\TreeView\TreeNodeConverter.cs (11)
43
if (destinationType == typeof(InstanceDescriptor) && value is
TreeNode
node)
52
info = typeof(
TreeNode
).GetConstructor([typeof(string)]);
57
info = typeof(
TreeNode
).GetConstructor([typeof(string), typeof(
TreeNode
[])]);
59
TreeNode
[] nodesArray = new
TreeNode
[node.Nodes.Count];
69
info = typeof(
TreeNode
).GetConstructor(
84
info = typeof(
TreeNode
).GetConstructor(
89
typeof(
TreeNode
[])
92
TreeNode
[] nodesArray = new
TreeNode
[node.Nodes.Count];
System\Windows\Forms\Controls\TreeView\TreeNodeMouseClickEventArgs.cs (2)
13
TreeNode
? node,
28
public
TreeNode
? Node { get; }
System\Windows\Forms\Controls\TreeView\TreeNodeMouseHoverEventArgs.cs (2)
11
public TreeNodeMouseHoverEventArgs(
TreeNode
? node)
16
public
TreeNode
? Node { get; }
System\Windows\Forms\Controls\TreeView\TreeView.cs (46)
13
using static System.Windows.Forms.
TreeNode
;
48
internal
TreeNode
? _selectedNode;
52
private
TreeNode
? _prevHoveredNode;
127
internal
TreeNode
? _editNode;
128
internal
TreeNode
_root;
129
internal Dictionary<IntPtr,
TreeNode
> _nodesByHandle = [];
137
private
TreeNode
? _topNode;
180
foreach (
TreeNode
rootNode in Nodes)
182
foreach (
TreeNode
node in rootNode.GetSelfAndChildNodes())
1086
public
TreeNode
? SelectedNode
1299
public
TreeNode
? TopNode
1645
TreeNode
? node = hnode == 0 ? null : NodeFromHandle(hnode);
1653
internal bool TreeViewBeforeCheck(
TreeNode
? node, TreeViewAction actionTaken)
1660
internal void TreeViewAfterCheck(
TreeNode
node, TreeViewAction actionTaken)
1673
public
TreeNode
? GetNodeAt(Point pt) => GetNodeAt(pt.X, pt.Y);
1678
public
TreeNode
? GetNodeAt(int x, int y)
1698
private static void UpdateImagesRecursive(
TreeNode
node)
1706
foreach (
TreeNode
child in node.Nodes)
1717
foreach (
TreeNode
node in Nodes)
1726
private static void NotifyAboutGotFocus(
TreeNode
? treeNode)
1734
private static void NotifyAboutLostFocus(
TreeNode
? treeNode)
1830
internal
TreeNode
? NodeFromHandle(IntPtr handle)
1832
_nodesByHandle.TryGetValue(handle, out
TreeNode
? treeNode);
1850
TreeNode
? savedSelectedNode = _selectedNode;
2068
TreeNode
? tn = NodeFromHandle(hnode);
2259
TreeNode
? node = SelectedNode;
2332
TreeNode
[] nodes = new
TreeNode
[Nodes.Count];
2427
TreeNode
? node = NodeFromHandle(item.hItem);
2468
TreeNode
? node = NodeFromHandle(item.hItem);
2496
TreeNode
? node = NodeFromHandle(nmtv->itemNew.hItem);
2526
TreeNode
? node = NodeFromHandle(nmtv->itemNew.hItem);
2571
TreeNode
? editingNode = NodeFromHandle(nmtvdi.item.hItem);
2604
TreeNode
? node = NodeFromHandle(nmtvdi.item.hItem);
2659
private static void UpdateCheckedState(
TreeNode
node, bool update)
2719
TreeNode
? node = NodeFromHandle((nint)nmtvcd->nmcd.dwItemSpec);
2877
protected OwnerDrawPropertyBag GetItemRenderStyles(
TreeNode
? node, int state)
2960
TreeNode
? tn = NodeFromHandle(hnode);
3056
TreeNode
? treeNode = NodeFromHandle(hnode);
3107
/// Shows the context menu for the <see cref="
TreeNode
"/>.
3109
private void ShowContextMenu(
TreeNode
treeNode)
3134
foreach (
TreeNode
rootNode in Nodes)
3136
foreach (
TreeNode
node in rootNode.GetSelfAndChildNodes())
3208
TreeNode
node = NodeFromHandle(item->hItem)!;
3285
TreeNode
? node = NodeFromHandle(_mouseDownNode);
3427
TreeNode
? treeNode = SelectedNode;
System\Windows\Forms\Controls\TreeView\TreeView.TreeViewAccessibleObject.cs (2)
7
using static System.Windows.Forms.
TreeNode
;
65
TreeNode
? node = owningTreeView.GetNodeAt(p);
System\Windows\Forms\Controls\TreeView\TreeViewCancelEventArgs.cs (2)
16
public TreeViewCancelEventArgs(
TreeNode
? node, bool cancel, TreeViewAction action)
23
public
TreeNode
? Node { get; }
System\Windows\Forms\Controls\TreeView\TreeViewEventArgs.cs (3)
14
public TreeViewEventArgs(
TreeNode
? node)
20
public TreeViewEventArgs(
TreeNode
? node, TreeViewAction action)
26
public
TreeNode
? Node { get; }
System\Windows\Forms\Controls\TreeView\TreeViewHitTestInfo.cs (3)
12
private readonly
TreeNode
? _node;
17
public TreeViewHitTestInfo(
TreeNode
? hitNode, TreeViewHitTestLocations hitLocation)
37
public
TreeNode
? Node
System\Windows\Forms\Design\ComponentEditorForm.PageSelector.cs (2)
210
TreeNode
? itemNode =
TreeNode
.FromHandle(this, (nint)nmtvcd->nmcd.dwItemSpec);
System.Windows.Forms.Design (34)
System\ComponentModel\Design\ObjectSelectorEditor.Selector.cs (2)
148
TreeNode
[] treeNodes = new
TreeNode
[length];
System\Windows\Forms\Design\DesignBindingPicker.cs (8)
111
private
TreeNode
? _selectedNode; // Tree node that matches the initial selected item (selectedItem)
1754
TreeNode
? node = _treeViewCtrl?.GetNodeAt(pt);
1811
private void SelectTreeNode(
TreeNode
? node)
1834
private delegate void PostSelectTreeNodeDelegate(
TreeNode
node);
1836
private void PostSelectTreeNodeCallback(
TreeNode
node)
1842
private void PostSelectTreeNode(
TreeNode
? node)
2028
foreach (
TreeNode
node in nodes)
2046
public void SetSelectedItem(
TreeNode
? node)
System\Windows\Forms\Design\TreeNodeCollectionEditor.cs (24)
33
private
TreeNode
_curNode;
85
private
TreeNode
LastNode
90
TreeNode
lastNode = _treeView1.Nodes[_treeView1.Nodes.Count - 1];
152
private void Add(
TreeNode
parent)
154
TreeNode
newNode;
413
TreeNode
[] nodes = new
TreeNode
[items.Length];
419
nodes[i] = (
TreeNode
)((
TreeNode
)items[i]).Clone();
484
private void SetNodeProps(
TreeNode
node)
509
TreeNode
item = (
TreeNode
)e.Item;
515
if (e.Data.GetDataPresent(typeof(
TreeNode
)))
527
TreeNode
dragNode = (
TreeNode
)e.Data.GetData(typeof(
TreeNode
));
535
TreeNode
dropNode = _treeView1.GetNodeAt(position);
554
private static bool CheckParent(
TreeNode
child,
TreeNode
parent)
578
TreeNode
currentNode = _treeView1.GetNodeAt(position);
623
TreeNode
tempNode = _curNode;
624
TreeNode
parent = _curNode.Parent;
657
TreeNode
tempNode = _curNode;
658
TreeNode
parent = _curNode.Parent;
System.Windows.Forms.Design.Tests (8)
EnsureEditorsTests.cs (5)
138
[InlineData(typeof(
TreeNode
), "ImageIndex", typeof(ImageIndexEditor))]
139
[InlineData(typeof(
TreeNode
), "ImageKey", typeof(ImageIndexEditor))]
140
[InlineData(typeof(
TreeNode
), "SelectedImageKey", typeof(ImageIndexEditor))]
141
[InlineData(typeof(
TreeNode
), "StateImageKey", typeof(ImageIndexEditor))]
142
[InlineData(typeof(
TreeNode
), "StateImageIndex", typeof(ImageIndexEditor))]
TreeNodeCollectionEditorTests.cs (3)
11
Type type = typeof(
TreeNode
);
19
Type type = typeof(
TreeNode
);
28
Type type = typeof(
TreeNode
);
System.Windows.Forms.Tests (567)
SerializableAttributeTests.cs (1)
31
{ typeof(
TreeNode
).FullName },
SerializableTypesTests.cs (4)
345
var children = new
TreeNode
[] { new("node2"), new("node3") };
346
TreeNode
treeNodeIn = new("node1", 1, 2, children)
366
TreeNode
result = BinarySerialization.EnsureDeserialize<
TreeNode
>(blob);
System\Windows\Forms\AccessibleObjects\TreeNode.TreeNodeAccessibleObjectTests.cs (33)
6
using static System.Windows.Forms.
TreeNode
;
16
TreeNode
node = new(control);
38
TreeNode
node = new();
47
TreeNode
node = new(control);
58
TreeNode
node = new("Root node", [new()]);
76
TreeNode
node = new(control) { Checked = isChecked };
89
TreeNode
node = new(control) { Checked = isChecked };
104
TreeNode
node = new("Root node", [new()]);
123
TreeNode
node = new(control);
133
TreeNode
node = new(control);
145
TreeNode
node = new();
159
TreeNode
node = new("Root node", [new(), new(), new()]);
178
TreeNode
node = new("Root node", [new(), new(), new()]);
230
TreeNode
node = new(control);
247
TreeNode
node = new(control);
262
TreeNode
node = new(control);
277
TreeNode
node = new(control);
304
TreeNode
node = new(control) { Text = testText };
314
TreeNode
node = new(control);
324
TreeNode
node = new();
336
TreeNode
node = new(control);
346
TreeNode
node = new(control);
356
TreeNode
node = new("Root node", [new()]);
372
TreeNode
node = new();
388
TreeNode
node = new("Root node", [new()]);
405
TreeNode
node = new(control);
416
TreeNode
node = new("Root node", [new()]);
437
TreeNode
node = new(control);
448
TreeNode
node = new(control) { Checked = isChecked };
463
TreeNode
node = new(control) { Checked = isChecked };
497
TreeNode
node = new(control) { Text = testText };
507
TreeNode
node = new(control);
598
TreeNode
node = new("Node");
System\Windows\Forms\AccessibleObjects\TreeView.TreeViewAccessibleObjectTests.cs (3)
230
TreeNode
node = new("First node.");
244
TreeNode
node = new("First node.");
259
TreeNode
node = new("First node.");
System\Windows\Forms\AccessibleObjects\TreeViewLabelEditAccessibleObjectTests.cs (1)
158
TreeNode
node = new("node1");
System\Windows\Forms\DrawTreeNodeEventArgsTests.cs (1)
20
public void Ctor_Graphics_TreeNode_Rectangle_TreeNodeStates(
TreeNode
node, Rectangle bounds, TreeNodeStates state)
System\Windows\Forms\NodeLabelEditEventArgsTests.cs (2)
17
public void Ctor_TreeNode(
TreeNode
node)
34
public void Ctor_TreeNode_String(
TreeNode
node, string label)
System\Windows\Forms\OwnerDrawPropertyBagTests.cs (1)
132
public new OwnerDrawPropertyBag GetItemRenderStyles(
TreeNode
node, int state) => base.GetItemRenderStyles(node, state);
System\Windows\Forms\TreeNode.IKeyboardToolTipTests.cs (50)
19
TreeNode
treeNode = new();
39
TreeNode
treeNode = new();
60
TreeNode
treeNode = new();
82
TreeNode
treeNode = new() { ToolTipText = toolTipText };
101
TreeNode
treeNode = new();
119
List<
TreeNode
> treeNodesList = GetHierarchyNodes();
122
TreeNode
firstTreeNode = treeView.Nodes[0];
135
List<
TreeNode
> treeNodesList = GetHierarchyNodes();
138
TreeNode
middleTreeNode = treeView.Nodes[1];
152
List<
TreeNode
> treeNodesList = GetHierarchyNodes();
155
TreeNode
lastTreeNode = treeView.Nodes[0];
168
List<
TreeNode
> treeNodesList = GetHierarchyNodes();
171
TreeNode
rootNode = treeView.Nodes[0];
173
TreeNode
firstSubNode = rootNode.Nodes[0];
187
List<
TreeNode
> treeNodesList = GetHierarchyNodes();
190
TreeNode
rootNode = treeView.Nodes[0];
192
TreeNode
middleSubNode = rootNode.Nodes[1];
206
List<
TreeNode
> treeNodesList = GetHierarchyNodes();
209
TreeNode
rootNode = treeView.Nodes[0];
211
TreeNode
lastSubNode = rootNode.Nodes[2];
225
List<
TreeNode
> treeNodesList = GetHierarchyNodes();
228
TreeNode
rootNode = treeView.Nodes[0];
230
TreeNode
lastSubNode = rootNode.Nodes[2];
232
TreeNode
subSubNode = lastSubNode.Nodes[0];
246
List<
TreeNode
> treeNodesList = GetHierarchyNodes();
249
TreeNode
firstNode = treeView.Nodes[0];
251
TreeNode
middleNode = treeView.Nodes[1];
265
List<
TreeNode
> treeNodesList = GetHierarchyNodes();
268
TreeNode
firstNode = treeView.Nodes[0];
270
TreeNode
subNode = firstNode.Nodes[2];
272
TreeNode
middleNode = treeView.Nodes[1];
286
List<
TreeNode
> treeNodesList = GetHierarchyNodes();
289
TreeNode
rootNode = treeView.Nodes[0];
291
TreeNode
lastSubNode = rootNode.Nodes[2];
304
List<
TreeNode
> treeNodesList = GetHierarchyNodes();
316
TreeNode
treeNode = new();
339
TreeNode
treeNode = new();
372
TreeNode
treeNode = new();
408
TreeNode
treeNode = new();
418
private List<
TreeNode
> GetHierarchyNodes()
420
List<
TreeNode
> treeNodesList = [];
422
TreeNode
rootNode1 = new();
423
TreeNode
rootNode2 = new();
424
TreeNode
rootNode3 = new();
426
TreeNode
subNode1 = new();
427
TreeNode
subNode2 = new();
428
TreeNode
subNode3 = new();
430
TreeNode
subSubNode = new();
434
treeNodesList.AddRange(new
TreeNode
[] { rootNode1, rootNode2, rootNode3 });
438
private Rectangle GetRectangle(TreeView treeView,
TreeNode
treeNode)
System\Windows\Forms\TreeNodeCollectionTests.cs (33)
16
TreeNode
treeNode = collection.Add(text);
84
TreeNode
node = new("Node 0");
94
TreeNode
node = new("Node 0");
107
TreeNode
node = collection[0];
120
TreeNode
nodeOfAnotherTreeView = anotherTreeView.Nodes[0];
142
TreeNode
child1 = new()
146
TreeNode
child2 = new()
150
TreeNode
child3 = new()
155
TreeNode
grandchild1 = new()
159
TreeNode
grandchild2 = new()
163
TreeNode
grandchild3 = new()
196
TreeNode
child1 = new()
200
TreeNode
child2 = new()
204
TreeNode
child3 = new()
222
TreeNode
child1 = new()
227
TreeNode
child2 = new()
232
TreeNode
child3 = new()
245
TreeNode
[] treeNodeArray =
261
TreeNode
treeNode = treeView.Nodes.Find(key, searchAllChildren: true)[0];
269
TreeNode
child1 = new()
274
TreeNode
child2 = new()
279
TreeNode
child3 = new()
284
TreeNode
[] treeNodeArray =
298
TreeNode
treeNode;
346
TreeNode
child1 = new() { Name = "name1" };
347
TreeNode
child2 = new() { Name = "name2" };
389
TreeNode
treeNode;
414
TreeNode
treeNode = collection.Add(key, text, imageKey);
429
TreeNode
treeNode = collection.Add(key, text, imageKey, selectedImageKey);
448
TreeNode
treeNode;
490
TreeNode
treeNode;
513
TreeNode
node = new(nodeName);
530
var
nodeToRemove = collection[0];
System\Windows\Forms\TreeNodeConverterTests.cs (1)
28
TreeNode
node = new("Test");
System\Windows\Forms\TreeNodeMouseClickEventArgsTests.cs (1)
20
public void Ctor_TreeNode_MouseButtons_Int_Int_Int_Int(
TreeNode
node, MouseButtons button, int clicks, int x, int y)
System\Windows\Forms\TreeNodeMouseHoverEventArgsTests.cs (1)
17
public void Ctor_TreeNode(
TreeNode
node)
System\Windows\Forms\TreeNodeTests.cs (327)
16
TreeNode
node = new();
56
TreeNode
node = new(text);
96
TreeNode_Ctor_String_TreeNodeArray_Helper(null, Array.Empty<
TreeNode
>(), string.Empty);
97
TreeNode_Ctor_String_TreeNodeArray_Helper(string.Empty, Array.Empty<
TreeNode
>(), string.Empty);
102
private void TreeNode_Ctor_String_TreeNodeArray_Helper(string text,
TreeNode
[] children, string expectedText)
104
TreeNode
node = new(text, children);
125
Assert.Equal(children, node.Nodes.Cast<
TreeNode
>());
147
TreeNode
node = new(text, imageIndex, selectedImageIndex);
187
TreeNode_Ctor_String_Int_Int_TreeNodeArray_Helper(null, -1, -1, Array.Empty<
TreeNode
>(), "");
188
TreeNode_Ctor_String_Int_Int_TreeNodeArray_Helper(null, 0, 0, Array.Empty<
TreeNode
>(), "");
193
private void TreeNode_Ctor_String_Int_Int_TreeNodeArray_Helper(string text, int imageIndex, int selectedImageIndex,
TreeNode
[] children, string expectedText)
195
TreeNode
node = new(text, imageIndex, selectedImageIndex, children);
216
Assert.Equal(children, node.Nodes.Cast<
TreeNode
>());
250
Assert.Throws<ArgumentOutOfRangeException>("value", () => new TreeNode("text", imageIndex, 0, Array.Empty<
TreeNode
>()));
258
Assert.Throws<ArgumentOutOfRangeException>("value", () => new TreeNode("text", 0, selectedImageIndex, Array.Empty<
TreeNode
>()));
265
TreeNode
node = new()
281
TreeNode
node = new();
305
TreeNode
node = new();
342
TreeNode
node = new()
360
TreeNode
node = new()
388
TreeNode
node = new()
420
PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(
TreeNode
))[nameof(
TreeNode
.BackColor)];
421
TreeNode
node = new();
436
PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(
TreeNode
))[nameof(
TreeNode
.BackColor)];
437
TreeNode
node = new();
453
TreeNode
node = new();
468
TreeNode
node = new();
520
TreeNode
node = new();
531
TreeNode
node = new();
543
TreeNode
node = new();
556
TreeNode
node = new()
582
TreeNode
node = new();
611
TreeNode
node = new();
656
TreeNode
node = new();
682
TreeNode
node = new();
706
TreeNode
node = new()
722
TreeNode
node = new();
746
TreeNode
node = new();
783
TreeNode
node = new()
801
TreeNode
node = new()
829
TreeNode
node = new()
861
PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(
TreeNode
))[nameof(
TreeNode
.ForeColor)];
862
TreeNode
node = new();
877
PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(
TreeNode
))[nameof(
TreeNode
.ForeColor)];
878
TreeNode
node = new();
893
TreeNode
node = new();
903
TreeNode
node = new();
922
TreeNode
node = new()
949
TreeNode
node = new();
973
TreeNode
node = new()
1011
TreeNode
node = new()
1051
TreeNode
node = new();
1089
TreeNode
node = new();
1128
TreeNode
node = new();
1148
TreeNode
node = new();
1204
TreeNode
node = new();
1231
TreeNode
node = new();
1262
TreeNode
node = new();
1284
TreeNode
node = new();
1303
TreeNode
node = new();
1311
TreeNode
node = new();
1324
TreeNode
node = new()
1343
TreeNode
node = new()
1362
TreeNode
node = new();
1386
TreeNode
node = new();
1419
TreeNode
node = new();
1439
TreeNode
node = new();
1477
TreeNode
node = new();
1507
TreeNode
node = new();
1539
TreeNode
node = new();
1558
TreeNode
node = new();
1577
TreeNode
node = new();
1590
TreeNode
node = new();
1601
TreeNode
node = new();
1621
TreeNode
parent = new();
1622
TreeNode
node1 = new();
1623
TreeNode
node2 = new();
1624
TreeNode
node3 = new();
1625
TreeNode
node4 = new();
1640
TreeNode
parent = new();
1641
TreeNode
node1 = new();
1642
TreeNode
node2 = new();
1643
TreeNode
node3 = new();
1644
TreeNode
node4 = new();
1662
TreeNode
parent = new();
1663
TreeNode
node1 = new();
1664
TreeNode
node2 = new();
1665
TreeNode
node3 = new();
1666
TreeNode
node4 = new();
1694
TreeNode
node = new();
1705
TreeNode
node = new();
1726
TreeNode
node = new();
1739
TreeNode
node = new();
1750
TreeNode
node = new();
1779
TreeNode
node = new();
1798
TreeNode
node = new();
1810
TreeNode
node = new();
1823
TreeNode
node = new();
1834
TreeNode
node = new();
1862
TreeNode
node = new();
1880
TreeNode
node = new();
1892
TreeNode
node = new();
1905
TreeNode
node = new();
1916
TreeNode
node = new();
1964
TreeNode
node = new();
1975
TreeNode
node = new();
1987
TreeNode
node = new();
2000
TreeNode
node = new();
2011
TreeNode
node = new();
2031
TreeNode
parent = new();
2032
TreeNode
node1 = new();
2033
TreeNode
node2 = new();
2034
TreeNode
node3 = new();
2035
TreeNode
node4 = new();
2050
TreeNode
parent = new();
2051
TreeNode
node1 = new();
2052
TreeNode
node2 = new();
2053
TreeNode
node3 = new();
2054
TreeNode
node4 = new();
2072
TreeNode
parent = new();
2073
TreeNode
node1 = new();
2074
TreeNode
node2 = new();
2075
TreeNode
node3 = new();
2076
TreeNode
node4 = new();
2104
TreeNode
node = new()
2119
TreeNode
node = new();
2130
TreeNode
node = new();
2150
TreeNode
parent = new();
2151
TreeNode
node1 = new();
2152
TreeNode
node2 = new();
2153
TreeNode
node3 = new();
2154
TreeNode
node4 = new();
2169
TreeNode
parent = new();
2170
TreeNode
node1 = new();
2171
TreeNode
node2 = new();
2172
TreeNode
node3 = new();
2173
TreeNode
node4 = new();
2191
TreeNode
parent = new();
2192
TreeNode
node1 = new();
2193
TreeNode
node2 = new();
2194
TreeNode
node3 = new();
2195
TreeNode
node4 = new();
2223
TreeNode
node = new();
2234
TreeNode
node = new();
2255
TreeNode
node = new();
2267
TreeNode
parent = new();
2268
TreeNode
node1 = new();
2269
TreeNode
node2 = new();
2270
TreeNode
node3 = new();
2271
TreeNode
node4 = new();
2286
TreeNode
parent = new();
2287
TreeNode
node1 = new();
2288
TreeNode
node2 = new();
2289
TreeNode
node3 = new();
2290
TreeNode
node4 = new();
2308
TreeNode
parent = new();
2309
TreeNode
node1 = new();
2310
TreeNode
node2 = new();
2311
TreeNode
node3 = new();
2312
TreeNode
node4 = new();
2340
TreeNode
node = new();
2370
TreeNode
node = new();
2408
TreeNode
node = new();
2419
TreeNode
node = new();
2439
TreeNode
parent = new();
2440
TreeNode
node1 = new();
2441
TreeNode
node2 = new();
2442
TreeNode
node3 = new();
2443
TreeNode
node4 = new();
2458
TreeNode
parent = new();
2459
TreeNode
node1 = new();
2460
TreeNode
node2 = new();
2461
TreeNode
node3 = new();
2462
TreeNode
node4 = new();
2480
TreeNode
parent = new();
2481
TreeNode
node1 = new();
2482
TreeNode
node2 = new();
2483
TreeNode
node3 = new();
2484
TreeNode
node4 = new();
2512
TreeNode
node = new();
2523
TreeNode
node = new();
2543
TreeNode
parent = new();
2544
TreeNode
node1 = new();
2545
TreeNode
node2 = new();
2546
TreeNode
node3 = new();
2547
TreeNode
node4 = new();
2562
TreeNode
parent = new();
2563
TreeNode
node1 = new();
2564
TreeNode
node2 = new();
2565
TreeNode
node3 = new();
2566
TreeNode
node4 = new();
2584
TreeNode
parent = new();
2585
TreeNode
node1 = new();
2586
TreeNode
node2 = new();
2587
TreeNode
node3 = new();
2588
TreeNode
node4 = new();
2616
TreeNode
node = new();
2627
TreeNode
node = new();
2648
TreeNode
node = new();
2660
TreeNode
parent = new();
2661
TreeNode
node1 = new();
2662
TreeNode
node2 = new();
2663
TreeNode
node3 = new();
2664
TreeNode
node4 = new();
2679
TreeNode
parent = new();
2680
TreeNode
node1 = new();
2681
TreeNode
node2 = new();
2682
TreeNode
node3 = new();
2683
TreeNode
node4 = new();
2701
TreeNode
parent = new();
2702
TreeNode
node1 = new();
2703
TreeNode
node2 = new();
2704
TreeNode
node3 = new();
2705
TreeNode
node4 = new();
2733
TreeNode
node = new();
2763
TreeNode
node = new();
2801
TreeNode
node = new()
2817
TreeNode
node = new();
2841
TreeNode
node = new();
2872
TreeNode
node = new()
2891
TreeNode
node = new()
2919
TreeNode
node = new()
2955
TreeNode
node = new()
2993
TreeNode
node = new()
3033
TreeNode
node = new();
3071
TreeNode
node = new();
3110
TreeNode
node = new();
3130
TreeNode
node = new();
3186
TreeNode
node = new();
3215
TreeNode
node = new();
3246
TreeNode
node = new();
3268
TreeNode
node = new();
3287
TreeNode
node = new();
3295
TreeNode
node = new();
3308
TreeNode
node = new()
3327
TreeNode
node = new()
3346
TreeNode
node = new();
3370
TreeNode
node = new();
3403
TreeNode
node = new();
3423
TreeNode
node = new();
3461
TreeNode
node = new();
3491
TreeNode
node = new();
3523
TreeNode
node = new();
3542
TreeNode
node = new();
3561
TreeNode
node = new();
3578
TreeNode
node = new()
3620
TreeNode
node = new()
3675
TreeNode
node = new();
3714
TreeNode
node = new();
3762
TreeNode
node = new();
3797
TreeNode
node = new();
3850
TreeNode
node = new();
3880
TreeNode
node = new();
3912
TreeNode
node = new();
3942
TreeNode
node = new();
3978
TreeNode
node = new();
3986
TreeNode
node = new();
4004
TreeNode
node = new()
4035
TreeNode
node = new()
4079
TreeNode
node = new();
4110
TreeNode
node = new();
4152
TreeNode
node = new();
4175
TreeNode
node = new();
4213
TreeNode
node = new();
4251
TreeNode
node = new();
4291
TreeNode
node = new();
4314
TreeNode
node = new();
4333
TreeNode
node = new();
4346
TreeNode
node = new()
4361
TreeNode
node = new()
4390
TreeNode
node = new();
4411
TreeNode
node = new();
4447
TreeNode
node = new();
4472
TreeNode
node = new();
4491
TreeNode
node = new()
4506
TreeNode
node = new();
4517
TreeNode
node = new();
4537
TreeNode
parent = new();
4538
TreeNode
node1 = new();
4539
TreeNode
node2 = new();
4540
TreeNode
node3 = new();
4541
TreeNode
node4 = new();
4556
TreeNode
parent = new();
4557
TreeNode
node1 = new();
4558
TreeNode
node2 = new();
4559
TreeNode
node3 = new();
4560
TreeNode
node4 = new();
4578
TreeNode
parent = new();
4579
TreeNode
node1 = new();
4580
TreeNode
node2 = new();
4581
TreeNode
node3 = new();
4582
TreeNode
node4 = new();
4609
TreeNode
rootNode = new();
4610
TreeNode
subNodeLevel1 = new();
4611
TreeNode
subNodeLevel2 = new();
4612
TreeNode
subNodeLevel3 = new();
4616
List<
TreeNode
> nodes = rootNode.GetSelfAndChildNodes();
4627
TreeNode
treeNode = new();
4628
TreeNode
treeSubNode = new();
4642
TreeNode
treeNode = new("Node 1");
4645
TreeNode
.TreeNodeAccessibleObject accessibleObject = new(treeNode, treeView);
4663
TreeNode
treeNode = new()
4677
TreeNode
node1 = new(nodeName1);
4678
TreeNode
node2 = new(nodeName2);
4682
TreeNode
result1 =
TreeNode
.FromHandle(treeView, node1.Handle);
4685
TreeNode
result2 =
TreeNode
.FromHandle(treeView, node2.Handle);
4694
TreeNode
treeNode = new();
4717
TreeNode
treeNode = new()
4725
TreeNode
clonedNode = (
TreeNode
)treeNode.Clone();
4739
TreeNode
treeNode = new();
4755
TreeNode
treeNode = new();
4764
TreeNode
treeNode = new();
4771
private
TreeNode
CreateTreeNodeStructure(int depth, int breadth, bool initiallyExpanded)
4773
TreeNode
node = new();
4790
private void CheckExpandedState(
TreeNode
node, bool expectedState)
4793
foreach (
TreeNode
child in node.Nodes)
4805
var
node = CreateTreeNodeStructure(depth, 2, initiallyExpanded);
4828
TreeNode
node = new();
4831
TreeNode
child = new();
4845
TreeNode
node = new();
System\Windows\Forms\TreeViewCancelEventArgsTests.cs (1)
17
public void Ctor_TreeNode_Bool_TreeViewAction(
TreeNode
node, bool cancel, TreeViewAction action)
System\Windows\Forms\TreeViewEventArgsTests.cs (2)
17
public void Ctor_TreeNode(
TreeNode
node)
32
public void Ctor_TreeNode_TreeViewAction(
TreeNode
node, TreeViewAction action)
System\Windows\Forms\TreeViewHitTestInfoTests.cs (1)
22
public void TreeViewHitTestInfo_Ctor_TreeNode_TreeViewHitTestLocations(
TreeNode
hitNode, TreeViewHitTestLocations hitLocation)
System\Windows\Forms\TreeViewTests.cs (104)
4742
TreeNode
node = new();
4794
TreeNode
node1 = new("Some Long Text");
4820
TreeNode
node1 = new("Some Long Text");
4862
TreeNode
node1 = new("Some Long Text");
4891
TreeNode
node1 = new("Some Long Text");
4933
TreeNode
node1 = new("Some Long Text");
4948
TreeNode
node1 = new("Some Long Text");
4990
TreeNode
node1 = new("Some Long Text");
5019
TreeNode
node1 = new("Some Long Text");
5122
TreeNode
node1 = new("Some Long Text");
5152
TreeNode
node1 = new("Some Long Text");
5202
TreeNode
node1 = new("Some Long Text");
5235
TreeNode
node1 = new("Some Long Text");
5285
TreeNode
node1 = new("Some Long Text");
5304
TreeNode
node1 = new("Some Long Text");
5354
TreeNode
node1 = new("Some Long Text");
5387
TreeNode
node1 = new("Some Long Text");
5782
TreeNode
node = new();
6028
TreeNode
node = new();
6109
TreeNode
node = new();
6223
TreeNode
node = new();
6655
TreeNode
treeNode = new();
6669
TreeNode
treeNode1 = new();
6670
TreeNode
treeNode2 = new();
6671
TreeNode
treeNode3 = new();
6688
TreeNode
treeNode = new();
6689
TreeNode
treeSubNodeLevel1 = new();
6690
TreeNode
treeSubNodeLevel2 = new();
6709
TreeNode
treeNode = new();
6710
TreeNode
treeSubNodeLevel1 = new();
6711
TreeNode
treeSubNodeLevel2 = new();
6730
TreeNode
treeNode = new();
6748
TreeNode
treeNode = new();
6749
TreeNode
treeSubNodeLevel1 = new();
6750
TreeNode
treeSubNodeLevel2 = new();
6774
TreeNode
treeNode = new();
6788
TreeNode
treeNode = new();
6789
TreeNode
treeSubNodeLevel1 = new();
6790
TreeNode
treeSubNodeLevel2 = new();
6865
TreeNode
node = treeView.Nodes[0];
6895
TreeNode
treeNode = treeView.Nodes[0];
6924
TreeNode
treeNode = treeView.Nodes[0];
6931
TreeNode
node = treeNode.Nodes[0];
6961
TreeNode
treeNode = treeView.Nodes[0];
7014
TreeNode
node = treeView.Nodes[0];
7037
TreeNode
treeNode = treeView.Nodes[0];
7065
TreeNode
treeNode = treeView.Nodes[0];
7070
TreeNode
node = treeNode.Nodes[0];
7093
TreeNode
treeNode = treeView.Nodes[0];
7128
Assert.True(x is
TreeNode
);
7129
Assert.True(y is
TreeNode
);
7145
TreeNode
parent = new("Parent");
7148
TreeNode
firstNode = new(firstNodeText);
7150
TreeNode
secondNode = new(secondNodeText);
7168
TreeNode
parent = new("Parent");
7171
TreeNode
firstNode = new(firstNodeText);
7173
TreeNode
secondNode = new(secondNodeText);
7189
TreeNode
parent = new("Parent");
7192
TreeNode
treeNode1 = new("Node1");
7193
TreeNode
treeNode2 = new("Node0");
7194
TreeNode
treeNode3 = new("Node2");
7195
TreeNode
treeNode4 = new("SubNode1-1-1-1", [treeNode1, treeNode2, treeNode3]);
7196
TreeNode
treeNode5 = new("SubNode1-1-1", [treeNode4]);
7197
TreeNode
treeNode6 = new("SubNode1-1", [treeNode5]);
7198
TreeNode
treeNode7 = new("SubNode1", [treeNode6]);
7199
TreeNode
treeNode8 = new("Parent", [treeNode7]);
7224
TreeNode
parent = new("Parent");
7227
TreeNode
lastSubNode1 = new("Node1");
7228
TreeNode
lastSubNode2 = new("Node2");
7229
TreeNode
lastSubNode3 = new("Node3");
7230
TreeNode
fifthSubNode1 = new("SubNode1-1-1-1", [lastSubNode2, lastSubNode3, lastSubNode1]);
7231
TreeNode
fifthSubNode2 = new("SubNode1-1-1-2");
7232
TreeNode
fourthSubNode1 = new("SubNode1-1-1", [fifthSubNode1, fifthSubNode2]);
7233
TreeNode
fourthSubNode2 = new("SubNode1-1-2");
7234
TreeNode
thirdSubNode1 = new("SubNode1-1", [fourthSubNode2, fourthSubNode1]);
7235
TreeNode
thirdSubNode2 = new("SubNode1-2");
7236
TreeNode
secondSubNode1 = new("SubNode1", [thirdSubNode2, thirdSubNode1]);
7237
TreeNode
secondSubNode2 = new("SubNode2");
7238
TreeNode
firstSubNode = new("Parent", [secondSubNode1, secondSubNode2]);
7273
TreeNode
treeNode1 = new("Node1");
7274
TreeNode
treeNode2 = new("Node2");
7275
TreeNode
treeNode3 = new("Node3");
7276
TreeNode
treeNode4 = new("Node3");
7277
TreeNode
parent = new("Parent", [treeNode2, treeNode3, treeNode1, treeNode4]);
7314
TreeNode
treeNode1 = new("a0");
7315
TreeNode
treeNode2 = new("b0");
7316
TreeNode
treeNode3 = new("c0");
7317
TreeNode
treeNode4 = new("a1");
7318
TreeNode
treeNode5 = new("b1");
7319
TreeNode
treeNode6 = new("c1");
7320
TreeNode
treeNode7 = new("a2");
7321
TreeNode
rootNode = new("Root", [new TreeNode("child")]);
7331
TreeNode
childNode1 = rootNode.Nodes[0];
7332
TreeNode
childNode2 = rootNode.Nodes[1];
7333
TreeNode
childNode3 = rootNode.Nodes[2];
7334
TreeNode
childNode4 = rootNode.Nodes[3];
7335
TreeNode
childNode5 = rootNode.Nodes[4];
7336
TreeNode
childNode6 = rootNode.Nodes[5];
7337
TreeNode
childNode7 = rootNode.Nodes[6];
7338
TreeNode
childNode8 = rootNode.Nodes[7];
7374
TreeNode
node = nodeName is null ? null : new TreeNode(nodeName);
7415
TreeNode
rootNode = new(root);
7420
TreeNode
childNode = new(child);
7425
TreeNode
grandChildNode = new(grandChild);
System.Windows.Forms.UI.IntegrationTests (2)
DesignBehaviorsTests.cs (2)
54
TreeNode
? node = treeView.Nodes.Add("root");
110
e.Item is not
TreeNode
node ||
WinFormsControlsTest (22)
ScrollableControls.Designer.cs (18)
36
TreeNode
treeNode1 = new TreeNode("Node8");
37
TreeNode
treeNode2 = new TreeNode("Node7", new
TreeNode
[] { treeNode1 });
38
TreeNode
treeNode3 = new TreeNode("Node6", new
TreeNode
[] { treeNode2 });
39
TreeNode
treeNode4 = new TreeNode("Node5", new
TreeNode
[] { treeNode3 });
40
TreeNode
treeNode5 = new TreeNode("Node4", new
TreeNode
[] { treeNode4 });
41
TreeNode
treeNode6 = new TreeNode("Node3", new
TreeNode
[] { treeNode5 });
42
TreeNode
treeNode7 = new TreeNode("Node2", new
TreeNode
[] { treeNode6 });
43
TreeNode
treeNode8 = new TreeNode("Node1", new
TreeNode
[] { treeNode7 });
44
TreeNode
treeNode9 = new TreeNode("Node0", new
TreeNode
[] { treeNode8 });
402
treeView1.Nodes.AddRange(new
TreeNode
[] { treeNode9 });
TreeViewTest.Designer.cs (4)
46
this.treeView1.Nodes.AddRange(new System.Windows.Forms.
TreeNode
[] {
47
(System.Windows.Forms.
TreeNode
)(resources.GetObject("treeView1.Nodes")),
48
(System.Windows.Forms.
TreeNode
)(resources.GetObject("treeView1.Nodes1")),
49
(System.Windows.Forms.
TreeNode
)(resources.GetObject("treeView1.Nodes2"))});