private void AddTabItem(TabItem tabItem, TabTypeEnum tabType) { tabItem.Tag = tabType; if (!(tabItem.Header is TextBlock)) { tabItem.Header = TextBlockEx.Create(tabItem.Header.ToString(), new object[0]); } tabItem.Style = (Style)FindResource("tabRightPanel"); tabControl.Items.Add(tabItem); }
private void CreateOpTab(string tabTitle, object control, Style style) { var tabItem = new TabItem(); var header = TextBlockEx.Create(tabTitle, new object[0]); tabItem.Header = header; tabItem.Content = control; tabMain.Items.Add(tabItem); tabItem.Style = style; }