Windows phone UWP棱镜导航服务配置

Windows phone UWP棱镜导航服务配置,windows-phone,prism,uwp,Windows Phone,Prism,Uwp,我已经用Prism库启动了一个UWP项目。要在页面之间导航,我使用的是Prism NavigationService。好了,一切都很好,而我的情况如下图所示: 登录后,我需要加载一个带有拆分视图的窗口,然后使用NavigationService只更改“红方块”的内容 我的第三页xaml看起来像: <SplitView x:Name="rootSplitView" Style="{StaticResource MenuSplitViewStyle}" Grid.Row="1">

我已经用Prism库启动了一个UWP项目。要在页面之间导航,我使用的是Prism NavigationService。好了,一切都很好,而我的情况如下图所示:

登录后,我需要加载一个带有拆分视图的窗口,然后使用NavigationService只更改“红方块”的内容

我的第三页xaml看起来像:

 <SplitView x:Name="rootSplitView" Style="{StaticResource MenuSplitViewStyle}" Grid.Row="1">
            <Frame x:Name="contentFrame"/>

            <SplitView.Pane>
                <views:MenuViewPage/>
            </SplitView.Pane>
        </SplitView>
        <ToggleButton x:Name="togglePaneButton"
                      VerticalAlignment="Center"
                      IsChecked="{Binding IsPaneOpen,
                                          ElementName=rootSplitView,
                                          Mode=TwoWay}"
                      Style="{StaticResource SplitViewTogglePaneButtonStyle}"
                      TabIndex="1" />

我的应用程序引导是:

public sealed partial class App : PrismUnityApplication
{
    protected override Task OnLaunchApplicationAsync(LaunchActivatedEventArgs args) 
        {

            if (args != null && !string.IsNullOrEmpty(args.Arguments))
            {
                // The app was launched from a Secondary Tile
                // Navigate to the item's page
                //NavigationService.Navigate("ItemDetail", args.Arguments);
            }
            else
            {
                // Navigate to the initial page
                NavigationService.Navigate(PageTokens.IntroPage, null);
            }

            Window.Current.Activate();
            return Task.FromResult<object>(null);
        }
...
}
公共密封部分类应用程序:PrismUnityApplication
{
受保护的重写任务OnLaunchApplicationAsync(LaunchActivatedEventArgs args)
{
if(args!=null&&!string.IsNullOrEmpty(args.Arguments))
{
//该应用程序是从辅助磁贴启动的
//导航到项目的页面
//NavigationService.Navigate(“ItemDetail”,args.Arguments);
}
其他的
{
//导航到初始页面
NavigationService.Navigate(PageTokens.IntroPage,null);
}
Window.Current.Activate();
返回Task.FromResult(空);
}
...
}

我的问题是如何在红场中创建一个区域,并将导航服务配置为使用该区域在页面之间导航

可能与我刚才看到的相同,看起来您要么必须在所有视图上重复布局,要么可以使用框架(如果我没记错的话),然后在该框架内导航(手动,有一个方法导航到),但不能使用Prism进行导航,因为它会在你导航时替换整个用户控件。你找到答案了吗?我也在寻找同样的解决方案。我不再从事那个项目,也没有访问源代码的权限,但下一步是解决方案概述:创建一个具有主区域的shell。欢迎屏幕、注册屏幕、登录屏幕和主应用程序屏幕将是用户控件(您可以在不同的模块中移动它们)。要在它们之间导航,请使用导航服务。但主应用程序屏幕应该是用户控制(显示菜单),并以红色显示,您将使用另一个区域,并根据左侧菜单更改的RegionContext更改其中的视图。