In what situations does NavigationService.CanGoBack return false?

Before the call, NavigationService.GoBack()we need to check if it is NavigationService.CanGoBacktrue, but what are the situations in which it NavigationService.CanGoBackreturns false?

+4
source share
2 answers

CanGoBack returns false if there is nothing in the navigation history. There are times when the most recent entry (multiple navigators) may not have been added for the current navigator.

documentation link

+3
source

As Jacob pointed out, CanGoBack will be false if you are at the root of BackStack navigation. It may also be incorrect if you replace the root frame with a new one that also has no pages.

+1
source

Source: https://habr.com/ru/post/1570362/


All Articles