I am working on Xamarin.Forms using PRISM library for MVVM architecture.
So, the problem is whenever I navigating between pages using INavigationService always the class/ViewModel is instantiating newly, so already assigned strings are becoming empty/null. I am registering page and ViewModel in App.Xaml.cs as below:
protected override void RegisterTypes(IContainerRegistry containerRegistry)
{
containerRegistry.RegisterForNavigation<LoginPage, LoginViewModel>();
}
How to handle not to instantiate newly always or need to Instantiate only one time throughout the app working.