2012年3月8日

IEventAggregator

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

posted @ 2012-03-08 21:15 项目管理之家 阅读(297) 评论(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 项目管理之家 阅读(362) 评论(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 项目管理之家 阅读(522) 评论(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 项目管理之家 阅读(365) 评论(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 项目管理之家 阅读(756) 评论(0) 推荐(0) 编辑

2012年3月5日

JohnSon:SilverLight详细表单信息

摘要: <!--第一行--> <Border BorderBrush="#C7DAE9" BorderThickness="1" Grid.Column="0" Grid.Row="0" Padding="0,0,5,0"> <TextBlock Text="姓名:" Style="{StaticResource TextBlockInfo}"/> </Border> <Border BorderBrush=& 阅读全文

posted @ 2012-03-05 23:14 项目管理之家 阅读(166) 评论(0) 推荐(0) 编辑

JohnSon:通过反射获取UserControl

摘要: private UserControl CreatePanel(string panelName) { if (panelName != string.Empty) { Assembly executingAssembly = Assembly.GetExecutingAssembly(); foreach (Type type in executingAssembly.GetTypes()) { if (type.Name.EndsWith(panelName)) { UserControl panel = Activator.CreateInstance(type) as UserCont 阅读全文

posted @ 2012-03-05 22:57 项目管理之家 阅读(153) 评论(0) 推荐(0) 编辑

johnson:silverlight主界面的设计

摘要: <Grid x:Name="LayoutRoot" Background="White"> <Grid Background="#FFE2F3F9"> <Grid.RowDefinitions> <RowDefinition Height="Auto" MinHeight="42.667"></RowDefinition> <RowDefinition Height="Auto" MinHeight=" 阅读全文

posted @ 2012-03-05 22:34 项目管理之家 阅读(338) 评论(0) 推荐(0) 编辑

johnson:silverlight登录界面的设计

摘要: <Grid x:Name="LayoutRoot" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled"> <Grid.Background> <ImageBrush ImageSource="Images/LogInBackGroud.png" Stretch="Fill"></ImageBrus 阅读全文

posted @ 2012-03-05 22:29 项目管理之家 阅读(1728) 评论(0) 推荐(0) 编辑

导航