So I am trying to pop up a login window, then once they log in call back to the parent view and dismiss the modal. This is what I'm trying
Is is the main parent window
async void PatientButton_Clicked (object sender, EventArgs e)
{
await Navigation.PushModalAsync (new Login ());
}
public async void ReturnAndDismissLogin(User u)
{
this.View.User = u;
await Navigation.PopModalAsync();
}
And for simplicity's sake, here is my cancel button on the login view
void CancelButton_Clicked (object sender, EventArgs e)
{
var home = (Home)this.ParentView;
home.ReturnAndDismissLogin(new User());
}
So when I try to reference this.Parent or this.ParentView they are null. How would I access the parent view? Or am I going about this the wrong way?