gpt4 book ai didi

c# - 清除返回堆栈导航 Windows 10

转载 作者:太空狗 更新时间:2023-10-29 18:15:58 25 4
gpt4 key购买 nike

我想清除我的导航返回堆栈历史......

我尝试使用 this.NavigationService.RemoveBackEntry(); 但它没有用。

我如何在 Windows 10 中执行此操作?

最佳答案

如果您在页面代码后面,您是否尝试过这样做:

this.Frame.BackStack.Clear();

或者如果您在其他地方(例如 ViewModel),您是否尝试过:

var frame = Window.Current.Content as Frame;
frame.BackStack.Clear();

关于c# - 清除返回堆栈导航 Windows 10,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31886251/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com