public void ShowWindow() { if (CanShowWindow) { Window?.Dispatcher.Invoke(() => { Window.Show(); Window.Activate(); }); } GeneralSettings.ApplyTheme(); // Show certain dialogs if needed CheckKeyboardState(); CheckDuplicateInstances(); Updater.CheckChangelog(MetroDialogService); // Run this on the UI thread to avoid having to use dispatchers in VMs Execute.OnUIThread(ActivateViews); }