public MainWindowViewModel() { Tabs = new ObservableCollection <TabItem>(); var catalog = new AssemblyCatalog(Assembly.GetExecutingAssembly()); var container = new CompositionContainer(catalog); container.ComposeParts(this); MenuItems = new ObservableCollection <MenuItemModel>(); foreach (var customTabControl in TabCollection.Where(t => t.Control != null).OrderBy(tab => tab.Order)) { Tabs.Add(new TabItem() { Header = customTabControl.Header, Content = customTabControl.Control }); } }
private TabCollection GetFilteredTabs(TabCollection tabs) { var filteredTabs = tabs.Where(kvp => !kvp.Value.IsSystem && !kvp.Value.IsDeleted && !kvp.Value.DisableLink).Select(kvp => kvp.Value); return(new TabCollection(filteredTabs)); }
private TabCollection GetExportableTabs(TabCollection tabs) { var exportableTabs = tabs.Where(kvp => !kvp.Value.IsSystem).Select(kvp => kvp.Value); return(new TabCollection(exportableTabs)); }
private TabCollection GetExportableTabs(TabCollection tabs) { var exportableTabs = tabs.Where(kvp => !kvp.Value.IsSystem).Select(kvp => kvp.Value); return new TabCollection(exportableTabs); }