简体   繁体   中英

CanGoBack always returns false for NavigationWindow

I'm working on a project in WPF. I have a NavigationWindow and navigate between pages in this way:

SamplePage page = new SamplePage();
_window.Navigate(page);

It works fine and I can go back and forward with the navigation bar of the window. But I've noticed that the CanGoBack property is always false and the BackStack is always empty.

What might the problem be? I really need your help on this.

Please let me know if you need any more details.

您只需注册Window.Navigated事件,当事件触发时,您将看到CanGoBack为true

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM