C# Prism RegionManager:如何从当前视图导航?

C# Prism RegionManager:如何从当前视图导航?,c#,wpf,prism,C#,Wpf,Prism,为了将Prism模块的视图加载到WPF应用程序区域 <ContentControl Name="MainRegion" prism:RegionManager.RegionName="MainRegion"/> 有时我需要从MainRegion(清除所有内容)中删除模块的视图。如果我通过this.MainRegion.Content=null来实现然后一切正常,除了在导航到其他视图之前无法导航到上一个视图 如何在不导航到任何其他视图的情况下从当前视图正确导航?您尝试过这两种方法吗

为了将Prism模块的视图加载到WPF应用程序区域

<ContentControl Name="MainRegion" prism:RegionManager.RegionName="MainRegion"/>
有时我需要从
MainRegion
(清除所有内容)中删除模块的视图。如果我通过
this.MainRegion.Content=null来实现然后一切正常,除了在导航到其他视图之前无法导航到上一个视图


如何在不导航到任何其他视图的情况下从当前视图正确导航?

您尝试过这两种方法吗

regionManager.Regions[RegionNames.MainContentRegion].Remove(view)
regionManager.Regions[RegionNames.MainContentRegion].Deactivate(view)
确实如此

regionManager.Regions[RegionNames.MainContentRegion].Remove(view)
regionManager.Regions[RegionNames.MainContentRegion].Deactivate(view)