private void click(object obj) { ITreeNode selected = TreeNodes.FirstOrDefault()?.Children.FirstOrDefault(node => node.Id == 1500 && node.Parent != null && node.Children != null && node.Children.Any()); selected = selected.Children[500]; if (selected != null) { MySelectedItem = selected as TreeNode; } }
/// <summary> /// Navigates to the startup page. /// </summary> public void NavigateToStartupPage() { var node = TreeNodes.FirstOrDefault(x => x.IsStartupNode) ?? TreeNodes.First(); node.Navigate(); }