学海无涯

导航

随笔分类 -  Prism

WPF MVVM Prism
将WPF项目更改为Prism项目
摘要:1.创建一个基于.NetFramework或.NetCore的WPF应用程序。 2.在NuGet管理器中添加 Prism.Dryloc包 3.修改 App.xaml 的基类为PrismApplication /// <summary> /// Interaction logic for App.xa 阅读全文

posted @ 2023-02-03 15:30 宁静致远. 阅读(127) 评论(0) 推荐(0)

Prism 资源
摘要:Github:https://github.com/PrismLibrary/Prism NuGet:https://www.nuget.org/packages/prism.wpf 安装 Prism 项目模板:打开VS,菜单:扩展-->管理扩展,搜索 Prism WPF入门基础教程系列 https 阅读全文

posted @ 2023-02-03 15:19 宁静致远. 阅读(71) 评论(0) 推荐(0)

IDialogAware 对话框
摘要:<Grid Background="White"> <Grid.RowDefinitions> <RowDefinition Height="Auto"></RowDefinition> <RowDefinition></RowDefinition> <RowDefinition Height="A 阅读全文

posted @ 2023-01-01 15:51 宁静致远. 阅读(290) 评论(0) 推荐(0)

导航 IRegionManager
摘要:<Window x:Class="PrismWpfBlankApp.Views.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsof 阅读全文

posted @ 2023-01-01 11:38 宁静致远. 阅读(62) 评论(0) 推荐(0)

MVVM框架 数据绑定 事件命令 发布订阅消息
摘要:<StackPanel> <Button Command="{Binding OpenCommand}" Content="事件" /> <Button Command="{Binding PublishCommand}" Content="发布消息"/> <Button Command="{Bin 阅读全文

posted @ 2022-12-31 16:32 宁静致远. 阅读(98) 评论(0) 推荐(0)

Region 区域
摘要:Region 的作用:在指定区域展示用户控件,是模块化的核心功能,其主要目的是弱化模块与模块之间的耦合关系。 一、定义XML区域: 1.1 使用XML设置区域名称 <ContentControl prism:RegionManager.RegionName="ContentRegion" /> 1. 阅读全文

posted @ 2022-12-31 14:40 宁静致远. 阅读(154) 评论(0) 推荐(0)