private Block CreateBlock(TimedNode node) { var block = new Block(); block.StartTime = node.StartTime; block.EndTime = node.EndTime; block.Text = node.Name; block.Indent = node.GetParentChainIncludingThis().Count(); block.Node = node; return(block); }
public void GoToTimedNode(TimedNode node) { TextBlock textblock = null; foreach (TimedNode timedNode in node.GetParentChainIncludingThis().OfType <TimedNode>().Reverse()) { if (TextBlocks.TryGetValue(timedNode, out textblock)) { HighlightTextBlock(textblock, scrollToElement: true); break; } } if (textblock == null && activeTextBlock != null) { if (highlight.Parent is Panel parent) { parent.Children.Remove(highlight); } scrollViewer.ScrollToVerticalOffset(0); scrollViewer.ScrollToHorizontalOffset(0); } }