A Microsoft framework for building cross-platform mobile apps using .NET and C# with native performance and user interfaces.
Prism destroy not called when popping view
Hi,
After 50% into the project I just realised that Prism for Xamarin Forms doesn't call Destroy method when popping view back. In my app MainPage is TabbedPage. So from TabbedPage in one of the tabs I push another view:
await navigationService.NavigateAsync("PageA", navigationParameters, false);
On PageA when I click on back arrow, page is removed from the stack, but Destroy method is not called in PageA view model. PageA implements IDestructible. Interestingly, if I use GoBackAsync method to close PageA then Destroy is called, so only using default back arrow doesn't work.
Anyone else has this issue? Not sure if this is a bug or by design? I need to cleanup in view model after it's being removed from the navigation stack.
Xamarin Forms: 5.0.0.2083
Prism: 7.2.0.1422