I was using the below code in my previous application to remove login page from the stack once the user has successfully logged in.
var supervisor = new Supervisor(); Navigation.InsertPageBefore(supervisor, this); Navigation.PopAsync(); btnLogin.IsEnabled = true; Spinner.IsEnabled = false;
I want to do the same in a viewmodel class where I am not able to use "this" keyword as it represents a page. So is there any other way in which I can accomplish my task.
Any help will be greatly appreciated.