protected ModalViewModel(IModalView view, IApplicationController appController) : base(view, appController) { OkCommand = CreateCommand(DoOk, OkAllowed); CancelCommand = CreateCommand(DoCancel); Result = MessageBoxResult.None; }
public ModalNavView(IModalView view) : base((UIViewController)view) { view.ToHide += OnViewToHide; if (UIDevice.CurrentDevice.CheckSystemVersion(8, 0)) { HidesBarsOnSwipe = true; } }
public void ShowDialog <T>(IModalDialog modalDialog, IModalView modalView, T dataContext, Action <T> onClosed) { if (modalDialog == null) { throw new ArgumentNullException("modalDialog", "Cannot be null"); } if (modalView == null) { throw new ArgumentNullException("modalView", "Cannot be null"); } EventHandler onDialogClosedHandler = null; EventHandler <ModalViewEventArgs> onViewClosedHandler = null; if (onClosed != null) { onDialogClosedHandler = (s, a) => { modalDialog.Closed -= onDialogClosedHandler; onClosed(dataContext); }; onViewClosedHandler = (s, a) => { modalDialog.Closed -= onDialogClosedHandler; modalView.Closed -= onViewClosedHandler; modalDialog.DialogResult = a.DialogResult; //modalDialog.Close(); onClosed(dataContext); }; modalDialog.Closed += onDialogClosedHandler; modalView.Closed += onViewClosedHandler; } modalDialog.Content = modalView; modalView.DataContext = dataContext; modalDialog.ShowDialog(); }
public void HideModalView() { mb_fio.FadeOut(true); activeModalView?.Hide(); activeModalView = null; }
public void ShowAbout() { activeModalView = (AboutUIController)AboutSection; ShowModalView(); }
public void ShowSettings() { activeModalView = (SettingsUIController)SettingsSection; ShowModalView(); }