有点卡在这里.我有一个splitview应用程序,当按下反键键驻留在Appx.cs中时,它具有向后导航的事件.
我想在splitviews内容页面中导航的其中一个页面中定义一个不同的操作(例如,当某个元素可见时忽略该元素)但是应用程序始终遵循appx.cs中设置的事件,并忽略该事件在内容框架中加载的页面中.这是appx.cs中的代码:
protected async override void OnLaunched(LaunchActivatedEventArgs e)
{
// Do not repeat app initialization when the Window already has content,
// just ensure that the window is active
if (Window.Current.Content == null)
{
// Create a Frame to act as the navigation context and navigate to the first page
_rootFrame = new Frame();
_rootFrame.NavigationFailed += OnNavigationFailed;
_rootFrame.Navigated += OnNavigated;
if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
{
//TODO: Load state from previously suspended application
}
// Place the frame in the current …Run Code Online (Sandbox Code Playgroud)