WPF | 跟着视频敲代码13 | Prism框架初识
作者:互联网
https://www.bilibili.com/video/BV1nY411a7T8?p=14
添加Prism.DryIoc包引用
修改app.xaml代码
<prism:PrismApplication x:Class="WPF01.App" xmlns:prism="http://prismlibrary.com/" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:WPF01" > <Application.Resources> </Application.Resources> </prism:PrismApplication>
public partial class App : PrismApplication { protected override Window CreateShell() { return Container.Resolve<MainWindow>(); } protected override void RegisterTypes(IContainerRegistry containerRegistry) { } }
避免以后每次都修改,需要安装在项目模板,方式如下:
运行
标签:13,代码,www,修改,Prism,protected,override,WPF 来源: https://www.cnblogs.com/dongxizhen/p/16500563.html