【发布时间】:2018-05-31 22:43:15
【问题描述】:
我尝试打开一个由特殊目录解析的模块
return new DirectoryModuleCatalog() { ModulePath = @"..\..\modules" };
并希望在新的Window 中显示它。
我该怎么做?
到目前为止我的方法:
public void OpenInNewWindow(string regionName)
{
var cc = new ContentControl();
_regionManager.RegisterViewWithRegion(regionName, () => cc);
new Window
{
Content = cc
}.Show();
}
但这似乎行不通。我的Window 是空的。
【问题讨论】:
-
我的目标只是在新窗口中加载一个模块。它就像一个工具库。有很多工具带有它自己的视图服务等等。在我的主程序中,我只有一个按钮“打开 xyz-plugin”来运行这个模块。这在我的 shell 中工作得很好(只是一个具有指定区域的内容控件)。但我想在新窗口中运行模块,这是我的问题
标签: c# wpf prism modularity prism-6