void IHandler <ForegroundNavigationMessage> .Handle(object sender, ForegroundNavigationMessage message) { if (IsOpen && _viewModel != null && !ViewModel.IsDisposed) { NavigationDispatcher.OnNavigated(new NavigationContext(NavigationType.Page, NavigationMode.Foreground, null, ViewModel, this, message.Context)); } }
void IHandler <ForegroundNavigationMessage> .Handle(object sender, ForegroundNavigationMessage message) { var viewModel = Application.Current.MainPage?.BindingContext as IViewModel; if (viewModel != null && viewModel.Settings.State.Contains(IsRootConstant)) { IocContainer.Get <INavigationDispatcher>().OnNavigated(new NavigationContext(NavigationType.Page, NavigationMode.Foreground, null, viewModel, this, message.Context)); } }
void IHandler <ForegroundNavigationMessage> .Handle(object sender, ForegroundNavigationMessage message) { var viewModel = Window?.RootViewController?.DataContext() as IViewModel; if (viewModel != null && viewModel.Settings.State.Contains(IsRootConstant)) { NavigationDispatcher.OnNavigated(new NavigationContext(NavigationType.Page, NavigationMode.Foreground, null, viewModel, this, message.Context)); } }
private static void OnForegroundMessage(object o, ForegroundNavigationMessage message) { IsBackground = false; Tracer.Warn("App did enter foreground"); }