public void TrayBringToForeground() { if (IsMainWindowOpen) { Execute.PostToUIThread(FocusMainWindow); return; } // Initialize the shared UI when first showing the window if (!UI.Shared.Bootstrapper.Initialized) { UI.Shared.Bootstrapper.Initialize(_kernel); } Execute.OnUIThreadSync(() => { _splashViewModel?.RequestClose(); _splashViewModel = null; _rootViewModel = _kernel.Get <RootViewModel>(); _rootViewModel.Closed += RootViewModelOnClosed; _windowManager.ShowWindow(_rootViewModel); }); OnMainWindowOpened(); }
private void ShowMainWindow(IWindowManager windowManager, SplashViewModel splashViewModel) { Execute.OnUIThread(() => { windowManager.ShowWindow(RootViewModel); splashViewModel.RequestClose(); }); }