public virtual void RedrawRelationships()
            {
                foreach (var adornedRelatedElement in relatedItems)
                {
                    adornedRelatedElement.Dispose();
                }
                relatedItems.Clear();

                if (relationshipCanvas != null)
                {
                    relationshipCanvas.Children.Clear();
                }

                var sectionContainer = VisualTreeWalker.TryFindParent <SectionModelContainer>(relationshipCanvas);

                IEnumerable <ElementViewModel> relatedElements = elementContainerControl.Element.ContainingSection.GetRelatedElements(elementContainerControl.Element);

                foreach (var elementModel in relatedElements)
                {
                    var destinationControl = VisualTreeWalker.FindChild <ElementModelContainer>(x => x.Element.ElementId == elementModel.ElementId, sectionContainer);
                    if (destinationControl != null)
                    {
                        this.relatedItems.Add(new AdornedElementWithRelationshipLine(this, relationshipCanvas, destinationControl));
                    }
                }

                foreach (var relatedItem in relatedItems)
                {
                    relatedItem.DrawRelationships();
                }
            }
        void GotKeyboardFocusHandler(object sender, KeyboardFocusChangedEventArgs e)
        {
            if (e.OriginalSource is ElementModelContainer)
            {
                AdornSelectedElement((ElementModelContainer)e.OriginalSource);
            }
            if (e.OriginalSource is SectionModelContainer)
            {
                RemoveAdorner();
            }
            var containingElementModelContainer = VisualTreeWalker.TryFindParent <ElementModelContainer>(e.OriginalSource as DependencyObject);

            if (containingElementModelContainer != null)
            {
                AdornSelectedElement(containingElementModelContainer);
            }
        }