public static void Start (FragmentManager mgr, string email, RegisterUserViewModel vm)
            {
                // Find old fragment to replace
                var frag = mgr.FindFragmentByTag ("google_auth");
                if (frag != null) {
                    var authFrag = frag as GoogleAuthFragment;
                    if (authFrag != null && authFrag.IsAuthenticating) {
                        // Authentication going on still, do nothing.
                        return;
                    }
                }

                viewModel = vm;

                var tx = mgr.BeginTransaction ();
                if (frag != null) {
                    tx.Remove (frag);
                }
                tx.Add (new GoogleAuthFragment (email), "google_auth");
                tx.Commit ();
            }
 public GoogleAccountSelectionDialogFragment (RegisterUserViewModel vm)
 {
     viewModel = vm;
 }
        public override void OnViewCreated (View view, Bundle savedInstanceState)
        {
            base.OnViewCreated (view, savedInstanceState);

            ViewModel = RegisterUserViewModel.Init ();

            registerBinding = this.SetBinding (() => ViewModel.IsRegistering, () => IsRegistering);
            isRegisteringBinding = this.SetBinding (() => ViewModel.IsRegistering).WhenSourceChanges (SyncLoadingState);
            isSuccessfulBinding = this.SetBinding (()=> ViewModel.IsSuccesful).WhenSourceChanges (SyncSuccessScreen);
        }