protected void ShowLoginScreen(AuthenticationMode authMode, string appSecret, string email, AuthValidationMode authValidationMode) { var vm = new LoginVM(); vm.AuthMode = authMode; vm.Email = email; vm.AppSecret = appSecret; var dialog = new LoginDialog(); dialog.DataContext = vm; dialog.CloseRequested += Dialog_CloseRequested; authPopup = new Popup(); authPopup.Child = dialog; authPopup.IsOpen = true; dialog.OnOpened(authMode, authValidationMode); }