public static async Task RequestRestartAsync() { if (ApiInformation.IsMethodPresent("Windows.ApplicationModel.Core.CoreApplication", "RequestRestartAsync")) { var resources = ResourceLoader.GetForCurrentView("ThemesSettingsPage"); if (await UIUtilities.ShowYesNoDialogAsync(resources.GetString("ThemeChangedTitle"), resources.GetString("ThemeChangedMessage"))) { await CoreApplication.RequestRestartAsync(""); } } }
public static async Task <Theme> SafeInstallFromArchiveAsync(StorageFile theme, bool noPrompt = false) { try { return(await ThemeManager.InstallFromArchiveAsync(theme, noPrompt)); } catch (Exception ex) { Logger.LogError(ex); await UIUtilities.ShowErrorDialogAsync("Failed to install theme!", ex.Message); } return(null); }