public async Task OpenAsync(SettingsPageType page = SettingsPageType.Acccounts) { var loader = ResourceLoader.GetForViewIndependentUse(); if (await WindowsHelloManager.VerifyAsync(Constants.VERIFY_SETTINGS, loader.GetString("VerifySettingsDisplayReason"))) { _discordPage.OpenSettings(page); } }
private void OnNavigationRequest(SettingsPageType settingsPageType) { Type page; ViewModel.IsBackButtonVisible = true; switch (settingsPageType) { case SettingsPageType.HOME: ViewModel.CurrentPageText = "Settings"; ViewModel.IsBackButtonVisible = false; if (SettingsPageFrame.CanGoBack) { SettingsPageFrame.GoBack(); return; } else { page = typeof(SettingsMainPage); } break; case SettingsPageType.GENERAL: ViewModel.CurrentPageText = "General"; page = typeof(SettingsGeneralPage); break; case SettingsPageType.SYNCHRONIZATION: ViewModel.CurrentPageText = "Syncrhonization"; page = typeof(SettingsSynchronizationPage); break; case SettingsPageType.NOTIFICATIONS: ViewModel.CurrentPageText = "Notifications"; page = typeof(SettingsNotificationsPage); break; case SettingsPageType.ABOUT: ViewModel.CurrentPageText = "About"; page = typeof(SettingsAboutPage); break; default: throw new ArgumentOutOfRangeException(nameof(settingsPageType), settingsPageType, "Cannot navigate to the current selected settings page"); } SettingsPageFrame.Navigate(page); }
internal void OpenSettings(SettingsPageType page) { Analytics.TrackEvent("DiscordPage_OpenSettings"); SettingsOverlayGrid.Visibility = Visibility.Visible; CheckSettingsPane(); if (ActualWidth > 768) { OpenSettingsDesktopStoryboard.Begin(); } else { OpenSettingsMobileStoryboard.Begin(); } SettingsGrid.Navigate(typeof(SettingsPage), page, new SuppressNavigationTransitionInfo()); }
public SettingsFrameNavigationDataModel(SettingsPageType pageType, NavigationTransitionInfo transitionInfo) { this.pageType = pageType; this.transitionInfo = transitionInfo; }
public SettingsFrameNavigationDataModel(SettingsPageType pageType) : this(pageType, new EntranceNavigationTransitionInfo()) { }