private void LoadItems([NotNull] string itemName, [NotNull] IEnumerable <ItemHeader> references, [NotNull] IEnumerable <ItemHeader> referrers) { Debug.ArgumentNotNull(itemName, nameof(itemName)); Debug.ArgumentNotNull(references, nameof(references)); Debug.ArgumentNotNull(referrers, nameof(referrers)); var header = new TabItemHeader { Header = itemName, Tag = this }; header.Click += delegate { LinkViewer.CloseTab(TabItem); }; TabItem.Header = header; References = new List <ItemHeader>(references); Referrers = new List <ItemHeader>(referrers); RenderItems(); }