private void ViewNavigateMark(Mark mark, MouseEventArgs e) { mark.ViewReflectedsList(); marksPositions.Children.Add( mark.EditPosition(e, image, marksPositions)); var linkToMark = new HyperlinkButton { Content = new TextBlock { Text= mark.Props.ItemName, Style=App.Current.Resources["TextBlockStyle"] as Style }, Style=App.Current.Resources["HLinkStyle"] as Style }; linkToMark.Click += delegate { ZoomToCircle(mark); ZoomToRect(mark); }; var treeNavigation=new TreeViewItem { Header=linkToMark, IsExpanded=true }; foreach(var linkTo in mark.Props.Reflecteds .Select(reflected => new HyperlinkButton { Content = new TextBlock { Text= reflected.ItemName, Style=App.Current.Resources["TextBlockStyle"] as Style }, Style=App.Current.Resources["HLinkStyle"] as Style })) { linkTo.Click += delegate { ZoomToCircle(mark); ZoomToRect(mark); }; treeNavigation.Items.Add(linkTo); } marksPanel.Items.Add(treeNavigation); }