OnNavigatedFrom not invoking while going back?

I am navigating from one page to other like
Page A -> Page B -> Page C
While going back from page C to B OnNavigatedFrom method of INavigationAware is not working.
Is there any solution to solve this problem?

Best Answer

Answers

  • t3zlert3zler USMember ✭✭

    Are you talking about the hardware back button or the "navigation page" back button?

    We found overriding the OnBackPressed only worked for the hardware button. The software button was ignorant and nor was there any event to hook onto.

    We never implemented it but did come across this link:

    I CANT PASTE LINKS YET => H T T P : / / theconfuzedsourcecode.wordpress.com/2017/03/12/lets-override-navigation-bar-back-button-click-in-xamarin-forms/

    It appears at first glance to produce a page with the relevant navigation hooks if you are talking about a Navigation page.

  • kalkotekedarkalkotekedar USMember ✭✭

    @t3zler not working for both Hardware back button and Toolbar back arrow button

  • kalkotekedarkalkotekedar USMember ✭✭

    @BrianLagunas can you help me into this?

  • BrianLagunasBrianLagunas USInsider ✭✭✭✭

    You'll need to provide a sample because this works perfectly for me.

  • kalkotekedarkalkotekedar USMember ✭✭

    @BrianLagunas I have created a sample app and tested it works properly but in my project, it is not working.

  • kalkotekedarkalkotekedar USMember ✭✭

    Hey, @BrianLagunas I think the issue is sometimes I am calling from code behind and sometimes from INavigationService, therefore may be the event not getting invoked.

Sign In or Register to comment.