コード例 #1
0
        public SettingsViewModel()
        {
            Tabs = new ObservableCollection <TabItem>();
            var catalog   = new AssemblyCatalog(Assembly.GetExecutingAssembly());
            var container = new CompositionContainer(catalog);

            container.ComposeParts(this);
            foreach (var customTabControl in TabCollection.OrderBy(tab => tab.Order).Where(t => t.Settings != null))
            {
                Tabs.Add(new TabItem()
                {
                    Header = customTabControl.Header, Content = customTabControl.Settings
                });
            }
        }