protected virtual void AddItem(object item) { var layoutItem = new LayoutItem { DataContext = item }; if (item is SampleItem) { LayoutControl.SetTabHeader(layoutItem, ((SampleItem)item).Name); } var content = new ContentControl { Content = item }; content.SetBinding(ContentControl.ContentTemplateProperty, new Binding("ItemTemplate") { Mode = BindingMode.TwoWay, Source = this }); content.SetBinding(ContentControl.ContentTemplateSelectorProperty, new Binding("ItemTemplateSelector") { Mode = BindingMode.TwoWay, Source = this }); layoutItem.Content = content; Children.Add(layoutItem); }