示例#1
0
        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));
        }
示例#3
0
        private TabCollection GetExportableTabs(TabCollection tabs)
        {
            var exportableTabs = tabs.Where(kvp => !kvp.Value.IsSystem).Select(kvp => kvp.Value);

            return(new TabCollection(exportableTabs));
        }
示例#4
0
 private TabCollection GetExportableTabs(TabCollection tabs)
 {
     var exportableTabs = tabs.Where(kvp => !kvp.Value.IsSystem).Select(kvp => kvp.Value);
     return new TabCollection(exportableTabs);
 }