首页 > 解决方案 > Prism如何在UserControl中添加UserControl

问题描述

(我的英文不是很好,如有错误请见谅)

我在项目中定义了一个 UserControl

<ContentControl prism:RegionManager.RegionName="MenuTreeRegion"/>

如何向此添加 UserControl

我试图在 ViewModel 构造函数中添加

 _regionManager.RequestNavigate("MenuTreeRegion", "SettingMenuTree");

app.xaml 添加

            containerRegistry.RegisterForNavigation<SettingModuleView>();

但我无法将 UserControl 添加到 UserControl 中的 contentcontrol

先谢谢

标签: c#.netwpfprism

解决方案


推荐阅读