73 references to TreeView
System.Windows.Forms (52)
System\Windows\Forms\Controls\TreeView\TreeNode.cs (32)
16/// Implements a node of a <see cref="TreeView"/>. 231TreeView? tv = TreeView; 259TreeView? tv = TreeView; 299TreeView? tv = TreeView; 347TreeView? tv = TreeView; 458TreeView? tv = TreeView; 484if (HTREEITEMInternal == IntPtr.Zero && TreeView is not null) 486TreeView.CreateControl(); // force handle creation 509TreeView? tv = TreeView; 579TreeView? tv = TreeView; 618TreeView tv = TreeView!; 692TreeView? tv = TreeView; 794TreeView? tv = TreeView; 851TreeView? tv = TreeView; 892TreeView? tv = TreeView; 959TreeView? tv = TreeView; 1019TreeView? tv = TreeView; 1116_accessibleObject ??= TreeView is null 1118: new TreeNodeAccessibleObject(this, TreeView); 1279TreeView tv = TreeView!; 1303TreeView? tv = TreeView; 1403TreeView? tv = TreeView; 1589TreeView? tv = TreeView; 1658TreeView? tv = TreeView; 1672TreeView? tv = TreeView; 1801if (TreeView is not null && node == TreeView._selectedNode) 1803TreeView.SelectedNode = node; // communicate this to the handle 1820TreeView? tv = TreeView; 1975TreeView? tv = TreeView; 2135TreeView tv = TreeView!; 2203TreeView tv = TreeView!;
System\Windows\Forms\Controls\TreeView\TreeNode.IKeyboardToolTip.cs (5)
39IWin32Window? IKeyboardToolTip.GetOwnerWindow() => TreeView; 41bool IKeyboardToolTip.HasRtlModeEnabled() => TreeView?.RightToLeft == RightToLeft.Yes; 45bool IKeyboardToolTip.IsHoveredWithMouse() => TreeView?.AccessibilityObject.Bounds.Contains(Control.MousePosition) ?? false; 53private bool AllowToolTips => TreeView?.ShowNodeToolTips ?? false; 61return TreeView?.RectangleToScreen(bounds) ?? Rectangle.Empty;
System\Windows\Forms\Controls\TreeView\TreeNode.TreeNodeImageIndexer.cs (3)
27if (_owner.TreeView is not null) 31return _owner.TreeView.StateImageList; 35return _owner.TreeView.ImageList;
System\Windows\Forms\Controls\TreeView\TreeNodeCollection.cs (3)
217TreeView? tv = _owner.TreeView; 310TreeView? tv = _owner.TreeView; 446TreeView? tv = _owner.TreeView;
System\Windows\Forms\Controls\TreeView\TreeView.cs (9)
1100else if (_selectedNode is not null && _selectedNode.TreeView == this) 1111if (IsHandleCreated && (value is null || value.TreeView == this)) 1116Debug.Assert(_selectedNode is null || _selectedNode.TreeView != this, "handle is created, but we're still caching selectedNode"); 1313if (IsHandleCreated && (value is null || value.TreeView == this)) 1318Debug.Assert(_topNode is null || _topNode.TreeView != this, "handle is created, but we're still caching selectedNode"); 2828Size textSize = TextRenderer.MeasureText(node.Text, node.TreeView!.Font); 2840Font font = node.NodeFont ?? node.TreeView.Font; 2841Color color = (((curState & TreeNodeStates.Selected) == TreeNodeStates.Selected) && node.TreeView.Focused) ? SystemColors.HighlightText : (node.ForeColor != Color.Empty) ? node.ForeColor : node.TreeView.ForeColor;
System.Windows.Forms.Tests (20)
System\Windows\Forms\TreeNodeCollectionTests.cs (1)
54Assert.Same(treeView, treeNode.TreeView);
System\Windows\Forms\TreeNodeTests.cs (19)
49Assert.Null(node.TreeView); 89Assert.Null(node.TreeView); 137Assert.Null(node.TreeView); 180Assert.Null(node.TreeView); 228Assert.Null(node.TreeView); 4509Assert.Same(control, node.TreeView); 4527Assert.Same(control, node.TreeView); 4546Assert.Null(node1.TreeView); 4547Assert.Null(node2.TreeView); 4548Assert.Null(node3.TreeView); 4549Assert.Null(node4.TreeView); 4567Assert.Same(control, node1.TreeView); 4568Assert.Same(control, node2.TreeView); 4569Assert.Same(control, node3.TreeView); 4570Assert.Same(control, node4.TreeView); 4596Assert.Same(control, node1.TreeView); 4597Assert.Same(control, node2.TreeView); 4598Assert.Same(control, node3.TreeView); 4599Assert.Same(control, node4.TreeView);
System.Windows.Forms.UI.IntegrationTests (1)
DesignBehaviorsTests.cs (1)
118var effects = node.TreeView!.DoDragDrop(dataObject!, DragDropEffects.Copy);