protected override void PostFillTreeViewNode(bool firstTime) { if (firstTime) { TreeViewNode.Expand(); } }
protected override void PostFillTreeViewNode(bool firstTime) { if (firstTime) { TreeViewNode.Expand(); } var activeBranch = Nodes.DepthEnumerator <LocalBranchNode>().FirstOrDefault(b => b.IsActive); TreeViewNode.TreeView.SelectedNode = activeBranch?.TreeViewNode; }
protected override void PostFillTreeViewNode(bool firstTime) { if (firstTime) { TreeViewNode.Expand(); } // Skip hidden node if (TreeViewNode.TreeView is null) { return; } if (TreeViewNode.TreeView.SelectedNode is not null) { // If there's a selected treenode, don't stomp over it return; } var activeBranch = Nodes.DepthEnumerator <LocalBranchNode>().FirstOrDefault(b => b.IsActive); TreeViewNode.TreeView.SelectedNode = activeBranch?.TreeViewNode; }
protected override void FillTreeViewNode() { base.FillTreeViewNode(); TreeViewNode.Expand(); }