Am having a Xamarin.Forms Shell application. On the main page I have a list of some objects and on a button click I navigate to a detail page (DetailPage class) like this:
Shell.Current.GoToAsync(url_to_detail_page?id=X);
New instance of DetailPage is created and properly displays object X.
I navigate back to main page.
I click the button to navigate again to a detail page (another object with another ID):
Shell.Current.GoToAsync(url_to_detail_page?id=Y);
New instance of Detailpage is created and properly displays object Y.
But at this moment both DetailPage instances (X and Y) obviously still exists. The DetailPage subscribes to an MessagingCenter event and once this message is sent it is triggered on both X and Y instances of the page.
**Is this normal that the ContentPage is not destoyed when navigating back from it? **
Handling the MessagingCenter event takes some time and I don't want to run it multiple times... I can handle that somehow but it would be a workaround. I would prefer the DetailPage to be destroyed as it is no longer needed.
thansk
Jiri