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); }
private void OnModalChanged(ModalView newModal, ModalView oldModal) { UpdateBackButtonVisibility(); if (newModal != Null) { OnModalShowed(newModal); } else if (oldModal != Null) { OnModalClosed(oldModal); } }
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(); }
private void OnActualModalChanged(ModalView newModal, ModalView oldModal) { UpdateVisibility(); }
public void Show(ModalView modal) { Modal = modal; }