当前位置: 首页 > news >正文

新材料 东莞网站建设如何做宣传自己公司网站

新材料 东莞网站建设,如何做宣传自己公司网站,wordpress 二级域名设置,怎么做新浪网站安装Prism.DryIoc库&#xff1a; Prism的区域和模块化&#xff1a; 一个区域可以显示一个用户控件 一个模块就是一个项目&#xff0c;也就是一个类库 动态切换用户控件的案例&#xff1a; <Grid><Grid.RowDefinitions><RowDefinition Height"auto"…

安装Prism.DryIoc库:

Prism的区域和模块化:

一个区域可以显示一个用户控件

一个模块就是一个项目,也就是一个类库

动态切换用户控件的案例:

<Grid><Grid.RowDefinitions><RowDefinition Height="auto"/><RowDefinition/></Grid.RowDefinitions><StackPanel Orientation="Horizontal"><Button Margin="5" Content="打开模块A" Command="{Binding OpenCommand}" CommandParameter="ViewA"/><Button Margin="5" Content="打开模块B" Command="{Binding OpenCommand}" CommandParameter="ViewB"/><Button Margin="5" Content="打开模块C" Command="{Binding OpenCommand}" CommandParameter="ViewC"/></StackPanel><ContentControl prism:RegionManager.RegionName="ContentRegion" Grid.Row="1"/>
</Grid>
public partial class App
{protected override Window CreateShell(){return Container.Resolve<MainView>();}protected override void RegisterTypes(IContainerRegistry containerRegistry){// 依赖注入containerRegistry.RegisterForNavigation<ViewA>();containerRegistry.RegisterForNavigation<ViewB>();containerRegistry.RegisterForNavigation<ViewC>();}
}
internal class MainViewModel : BindableBase
{private readonly IRegionManager regionManager;public DelegateCommand<string> OpenCommand { get; private set; }public MainViewModel(IRegionManager regionManager){OpenCommand = new DelegateCommand<string>(Open);this.regionManager = regionManager;}private void Open(string obj){regionManager.Regions["ContentRegion"].RequestNavigate(obj);}
}

多模块的情况下动态切换一个区域的用户控件:

大部分的代码是和上面一样的

模块A中的ModuleAProfile文件:

namespace ModuleA
{public class ModuleAProfile : IModule{public void OnInitialized(IContainerProvider containerProvider){}public void RegisterTypes(IContainerRegistry containerRegistry){// 依赖注入containerRegistry.RegisterForNavigation<ViewA>();}}
}

主项目中的App.xaml:

public partial class App
{protected override Window CreateShell(){return Container.Resolve<MainView>();}protected override void RegisterTypes(IContainerRegistry containerRegistry){}protected override void ConfigureModuleCatalog(IModuleCatalog moduleCatalog){moduleCatalog.AddModule<ModuleAProfile>();moduleCatalog.AddModule<ModuleBProfile>();base.ConfigureModuleCatalog(moduleCatalog);}
}

http://www.yayakq.cn/news/88777/

相关文章:

  • 青岛市网站建设福州网络公司
  • 手机门户网站源码百度快照优化排名怎么做
  • 咖啡网站设计做网站的人 优帮云
  • 宁波 手机网站建设怎么用nas做网站服务器
  • 中国手机最好的网站排名怎么样做电影网站
  • 大理网站建设滇icp备制作动漫的软件
  • 做网站读什么专业安庆市网站建设制作
  • 杭州网站搭建多少钱江苏华东建设基础工程有限公司网站
  • 优秀网站建设哪个公司好网站美工和网页设计的区别
  • 什么网站能买建设摩托车wordpress收款插件
  • 沛县网站建立网站需要服务器吗
  • 建论坛网站做东西的网站有那些
  • 如何建设一个子网站网页小游戏斗地主
  • 网站内的地图导航怎么做的google网站打不开
  • 网站策划案范文郑州开发小程序平台
  • 网站建设制作鸿运通网络销售是做网站推广
  • 姚家园做网站wordpress的ip有什么用
  • 网站做301跳转的作用html5网站模板
  • 如何做网站布局优化做网站赔钱了
  • 如何做网站链接分析推广网站优化怎么做
  • 网站通栏怎么做开源 网站源代码
  • 网站建设微信运营销售做界面网站用什么语言好
  • 软件工程师证书报考网站wordpress页面文字
  • 基于.NET的电子商务网站开发沈阳企业宣传片制作公司
  • 做网站自己买服务器好还是用别人的网站开发流程 图书
  • 网站建设h5快云服务器怎么做网站
  • 上虞做网站公司北京网站建设套餐
  • 网站txt地图怎么做服装网站设计
  • 深圳的网站建设公司三把火网站建设与维护内容
  • flash网站欣赏做h5网站