Prism中Region的使用

一般用法:
1.在XMAL中ContentControl定义一个ContentRegion,
如 <ContentControl prism:RegionManager.RegionName="ContentRegion" />
2.在XMAL对应的.cs文件构造函数中discovery
public MainWindowViewModel(IRegionManager regionManager)
{
regionManager.RegisterViewWithRegion("ContentRegion", typeof(ViewA));
}
这样就将视图ViewA引入Region区域了。

posted @ 2021-06-08 20:45  pdcboy  阅读(136)  评论(0)    收藏  举报