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?
That is correct. Those methods do not get fired if you are calling the XF navigation API in code-behind.
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.
@t3zler not working for both Hardware back button and Toolbar back arrow button
@BrianLagunas can you help me into this?
You'll need to provide a sample because this works perfectly for me.
@BrianLagunas I have created a sample app and tested it works properly but in my project, it is not working.
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.
Xamarin Inc., as a wholly-owned Microsoft subsidiary acting as a separate legal entity, adheres to the Microsoft Privacy Statement: Privacy & cookies