using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Navigation; namespace FoxTube.Views { /// /// Settings page /// public sealed partial class SettingsView : Page { public SettingsView() => InitializeComponent(); protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); if (string.IsNullOrWhiteSpace(e.Parameter as string)) return; string[] param = (e.Parameter as string).Split('/'); switch (param[0]) { case "about": case "info": PivotControl.SelectedItem = AboutTab; break; case "inbox": case "message": case "changelog": PivotControl.SelectedItem = InboxTab; if (param.Length > 1) InboxSection.Open(param[1]); break; default: PivotControl.SelectedItem = PreferencesTab; break; } } } }