wpf中prism框架

安装prism包:

添加引用

cs 复制代码
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using Prism.DryIoc;
using Prism.Ioc;

namespace PrismDemo
{
    /// <summary>
    /// App.xaml 的交互逻辑
    /// </summary>
    public partial class App : PrismApplication
    {
        protected override Window CreateShell()
        {
           return Container.Resolve<MainWindow>();
        }
        protected override void RegisterTypes(IContainerRegistry containerRegistry)
        {
           
        }
    }
}

修改完上述,重新生成项目

安装Prism项目模板

安装过程中关闭Visual Studio,安装完毕再打开,即可创建prism框架的项目。

相关推荐
一念春风3 小时前
智能文字识别工具(AI)
开发语言·c#·wpf
故事不长丨5 小时前
WPF MvvmLight 超详细使用教程
c#·wpf·mvvm·mvvmlight
IT小哥哥呀1 天前
基于windows的个人/团队的时间管理工具
windows·c#·wpf·时间管理
sczmzx2 天前
Cefsharp.WPF高分辨率下崩溃问题解决方案
wpf
cjp5603 天前
023.WPF combox控件数据绑定
wpf
Scout-leaf3 天前
WPF新手村教程(七)—— 终章(MVVM架构初见杀)
c#·wpf
极客智造3 天前
WPF DataGrid 多选绑定 + 强类型命令回调 通用解决方案
wpf
ZoeJoy83 天前
机器视觉C# 调用相机:从 USB 摄像头到海康工业相机(WinForms & WPF)
数码相机·c#·wpf
ALex_zry3 天前
C++高性能日志与监控系统设计
c++·unity·wpf
zhojiew4 天前
使用flink agent框架实现流式情感分析的示例
大数据·flink·wpf