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