Esempio n. 1
0
        private void OnModalShowed(ModalView modal)
        {
            rootGrid.Visibility = Visibility.Visible;
            ActualModal         = modal;

            backgroundVisual.StartAnimation("Opacity", opacityFadeInAnimation);
            contentVisual.StartAnimation("Opacity", opacityFadeInAnimation);

            contentVisual.Offset = new Vector3();
            RunContentAnimation(fadeInAnimationInfos, modal.GetType(), defaultFadeInAnimationInfo);
        }
Esempio n. 2
0
        private void OnModalChanged(ModalView newModal, ModalView oldModal)
        {
            UpdateBackButtonVisibility();

            if (newModal != Null)
            {
                OnModalShowed(newModal);
            }
            else if (oldModal != Null)
            {
                OnModalClosed(oldModal);
            }
        }
Esempio n. 3
0
        private void OnModalClosed(ModalView modal)
        {
            var batch = compositor.CreateScopedBatch(CompositionBatchTypes.Animation);

            batch.Completed += (s, e) =>
            {
                rootGrid.Visibility = Visibility.Collapsed;
                ActualModal         = Null;
            };

            backgroundVisual.StartAnimation("Opacity", opacityFadeOutAnimation);
            contentVisual.StartAnimation("Opacity", opacityFadeOutAnimation);

            RunContentAnimation(fadeOutAnimationInfos, modal.GetType(), defaultFadeOutAnimationInfo);

            batch.End();
        }
Esempio n. 4
0
 private void OnActualModalChanged(ModalView newModal, ModalView oldModal)
 {
     UpdateVisibility();
 }
Esempio n. 5
0
 public void Show(ModalView modal)
 {
     Modal = modal;
 }