public void CloseTab(IOTabItem item) { var tab = tabs[item.TabPanelID]; item.AfterClose(); tab.Items.Remove(item); }
public IOMenuItem CreatePanelMenuItem(object header, IOTabItem tabItem) { IOMenuItem item = new IOMenuItem(); item.Header = header; item.Command = new RelayCommand(() => showItem(item, tabItem)); PanelMenu.Items.Add(item); return(item); }
private void showItem(IOMenuItem item, IOTabItem tabItem) { tabItem.Visibility = Visibility.Visible; var content = tabItem.Content as UIElement; content.Visibility = Visibility.Visible; var control = tabItem.Parent as IOTabControl; control.SelectedItem = tabItem; PanelMenu.Items.Remove(item); }