locked
How to know if root page is reached in navigation stack RRS feed

  • Question

  • User365335 posted

    Hi, im developing forms app and I need to do some stuff when the root page is reached through popAsync way, debugging popAsync event I look at StackDepth property, but is for internal use only... Do you know another way?

    I'm suscribed to "popped" event in my master detail code behind

    Wednesday, February 28, 2018 6:57 PM

Answers

  • User2148 posted

    Something like NavigationStack.Count ?

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, February 28, 2018 6:59 PM
  • User180523 posted

    You beat me to it. I was going to say "just look at the size of the collection"

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, February 28, 2018 7:02 PM

All replies

  • User2148 posted

    Something like NavigationStack.Count ?

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, February 28, 2018 6:59 PM
  • User180523 posted

    You beat me to it. I was going to say "just look at the size of the collection"

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, February 28, 2018 7:02 PM
  • User2148 posted

    Caliaro 1 - StLaurent 0

    Wednesday, February 28, 2018 7:05 PM
  • User365335 posted

    You're amazing! Don't need fight guys hahaha, this way worked for me! Thank you for your support!

    Wednesday, February 28, 2018 7:13 PM
  • User395760 posted

    @AlessandroCaliaro Thank you, For me was "App.Current.MainPage.Navigation.NavigationStack.Count", and the root page equal "1", i use it in MianActivity.

    Thursday, July 30, 2020 2:17 AM