private void OnModalClosed(ModalPoppedEventArgs args)
 {
     if (View.GetUnderlyingView <object>() == args.Modal)
     {
         OnViewClosed(args.Modal, args);
     }
 }
Beispiel #2
0
 private void PrismApplicationBase_ModalPopped(object sender, ModalPoppedEventArgs e)
 {
     if (PageNavigationService.NavigationSource == PageNavigationSource.Device)
     {
         PageUtilities.HandleSystemGoBack(e.Modal, _previousPage);
         _previousPage = null;
     }
 }
        private static void App_ModalPopped(object sender, ModalPoppedEventArgs e)
        {
            var app = sender as Application;

            ElementRemoved(e.Modal);

            Css.RemoveAdditionalChild(app, e.Modal);
        }
 private async void OnModalPopped(object sender, ModalPoppedEventArgs e)
 {
     if (e.Modal is ModalPage)
     {
         await DisplayAlert("Modal Result",
                            $"You entered {(e.Modal as ModalPage).NameEntered}", "I know!");
     }
 }
Beispiel #5
0
 private void OnModalPopped(object sender, ModalPoppedEventArgs e)
 {
     if (e.Modal is YamvvmNavigationPage navPage)
     {
         if (navPage.CurrentPage is YamvvmPage page)
         {
             ViewModelNavigation.PagePopped(page);
         }
     }
 }
Beispiel #6
0
        private void PrismApplicationBase_ModalPopped(object sender, ModalPoppedEventArgs e)
        {
            if (PageNavigationService.NavigationSource == PageNavigationSource.Device)
            {
                var parameters = new NavigationParameters();

                PageUtilities.OnNavigatedFrom(e.Modal, parameters);
                PageUtilities.OnNavigatedTo(_previousPage, parameters);
                PageUtilities.DestroyPage(e.Modal);
                _previousPage = null;
            }
        }
Beispiel #7
0
        void OnModalPopped(object sender, ModalPoppedEventArgs e)
        {
            ModalPopped?.Invoke(sender, e.Modal);
            //_modals.Remove(e.Modal);
            //var current = _modals.Count > 0 ? _modals[_modals.Count - 1] : null;
            //current = current ?? (_navPage.Navigation.NavigationStack.Count > 0 ? _navPage.Navigation.NavigationStack[_navPage.Navigation.NavigationStack.Count - 1] : null);
            var current = PageExtensions.FindCurrentPage(Application.Current.MainPage);

            if (current is HardwareKeyPage hkPage)
            {
                hkPage.OnReappearing();
            }
        }
Beispiel #8
0
        void OnModalPopped(object sender, ModalPoppedEventArgs e)
        {
            ModalPopped?.Invoke(sender, e.Modal);
            _modals.Remove(e.Modal);
            System.Diagnostics.Debug.WriteLine("ModalPopped");
            var current = _modals.Count > 0 ? _modals[_modals.Count - 1] : null;

            current = current ?? (_navPage.Navigation.NavigationStack.Count > 0 ? _navPage.Navigation.NavigationStack[_navPage.Navigation.NavigationStack.Count - 1] : null);
            if (current is HardwareKeyPage hkPage)
            {
                hkPage.OnReappearing();
            }
        }
        private async void OnInviteClosed(object sender, ModalPoppedEventArgs e)
        {
            Application.Current.ModalPopped -= OnInviteClosed;

            if (e.Modal is AcceptInvitationPage invitation)
            {
                if (invitation.Status == InvitationStatus.Accepted)
                {
                    if (await _api.Execute(new VerifyUserAction()))
                    {
                        Application.Current.MainPage = new AppShell();
                    }
                }
                else
                {
                    _vm.InvitationCancelled();
                }
            }
        }
Beispiel #10
0
 void ModalPopped(object sender, ModalPoppedEventArgs e)
 {
     DisplayAlert("Popped", "Message", "Cancel");
 }
 private static void App_ModalPopped(object sender, ModalPoppedEventArgs e)
 {
     ElementRemoved(e.Modal);
 }
 private void OnModalPopped(object sender, ModalPoppedEventArgs e)
 {
     Debug.WriteLine("É acionado assim que o Modal desaparece da tela.");
 }
Beispiel #13
0
 void HandleModalPopped(object sender, ModalPoppedEventArgs e) => HandlePageAppearing(GetCurrentModalOrMainPage());
Beispiel #14
0
 private static void App_ModalPopped(object sender, ModalPoppedEventArgs e)
 {
     RemoveChildInternal(e.Modal);
 }
 private void Current_ModalPopped(object sender, ModalPoppedEventArgs e)
 {
     System.Diagnostics.Debug.Assert(this.modalStackPushedCount > 0);
     this.modalStackPushedCount--;
 }