private string GetNavigationHint(LinkDirection direction) { bool canNavigate = (FocusedNode != null && FocusedNode.HasLinkedNode(direction)); string text = string.Empty; if (canNavigate) { var control = FocusedNode.GetLinkedNode(direction).Control; if (control is TreeControl) { text = (control as TreeControl).modelName; } if (control is ProjectControl) { text = "Project"; } if (control is ReportControl) { text = "Report"; } } return(text); }
public void Navigate(LinkDirection direction) { var targetNode = FocusedNode.GetLinkedNode(direction); // relink TreeControl (call link back) if (FocusedNode.Control is TreeControl && !(targetNode.Control is TreeControl)) { FocusedNode.Link(LinkDirection.ldLeft, FocusedNode.GetLinkedNode(LinkDirection.ldLeft)); FocusedNode.Link(LinkDirection.ldRight, FocusedNode.GetLinkedNode(LinkDirection.ldRight)); } FocusedNode = targetNode; }