2012年3月8日

JohnSon:动态创建模块选项卡

摘要: [ImportingConstructor] public VMain(VMMain main, IEventAggregator aggregator) { InitializeComponent(); this.imCancel.MouseLeftButtonUp += new MouseButtonEventHandler(imgCancel_MouseLeftButtonUp); this.DataContext = main; vmMain = main; this.eventAggregator = aggregator; this.button1.Click += new Rou 阅读全文

posted @ 2012-03-08 21:22 项目管理之家 阅读(200) 评论(0) 推荐(0)

IEventAggregator

摘要: public class ModuleEvent : CompositePresentationEvent<UserControl> { [Export(typeof(IEventAggregator))] public IEventAggregator eventAggregator { get { return new EventAggregator(); } } } 阅读全文

posted @ 2012-03-08 21:15 项目管理之家 阅读(303) 评论(0) 推荐(0)

ModuleCatalog配置文件

摘要: <Modularity:ModuleCatalog xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:Modularity="clr-namespace:Microsoft.Practices.Prism.Modula 阅读全文

posted @ 2012-03-08 21:13 项目管理之家 阅读(372) 评论(0) 推荐(0)

JohnSon:ModuleManager动态加载模块

摘要: [Export(typeof(VMShell))] [PartCreationPolicy(CreationPolicy.Shared)] public class VMShell : NotificationObject { IEventAggregator eventAggregator; Lazy<IModuleManager> lazyModuleManager; IModuleManager moduleManager = null; [ImportingConstructor] public VMShell(IEventAggregator agg, Lazy<I 阅读全文

posted @ 2012-03-08 21:12 项目管理之家 阅读(553) 评论(0) 推荐(0)

JohnSon:ContentControl动态加载Module,页面大小自由伸缩

摘要: <UserControl x:Class="XM.Shell" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformat 阅读全文

posted @ 2012-03-08 21:11 项目管理之家 阅读(374) 评论(0) 推荐(0)

JohnSon:基于MefBootstrapper的Bootstrapper

摘要: public class Bootstrapper : MefBootstrapper { ModuleCatalog moduleCatalog; protected override void InitializeShell() { base.InitializeShell(); Application.Current.RootVisual = (UIElement)Shell; } protected override DependencyObject CreateShell() { return Container.GetExportedValue<Shell>(); } 阅读全文

posted @ 2012-03-08 21:08 项目管理之家 阅读(766) 评论(0) 推荐(0)

导航