public void CloseModal() { Frame.Effect = null; ModalFrame.Visibility = System.Windows.Visibility.Collapsed; ModalFrame.Navigate(null); Frame.IsEnabled = true; if (_currentModal != null) { _currentModal.OnModalClose(); _currentModal = null; } }
public ModalInvoker ShowModal(Page page) { Frame.IsEnabled = false; ModalFrame.Navigate(page); ModalFrame.Visibility = System.Windows.Visibility.Visible; Frame.Effect = new BlurEffect() { Radius = 3, RenderingBias = RenderingBias.Quality, KernelType = KernelType.Gaussian }; _currentModal = new ModalInvoker(); return(_currentModal); }
public void NavigateModal(Page page) { if (page == null) { ModalFrame.Visibility = Visibility.Collapsed; Frame.IsEnabled = true; OnModalClosed(); } else { ModalFrame.Visibility = Visibility.Visible; Frame.IsEnabled = false; OnModalOpened(); } ModalFrame.Navigate(page); _modalPage = page; ModalGrid.Visibility = ModalFrame.Visibility; }