Archived
1
0
This repository has been archived on 2026-04-22. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
FoxTube/FoxTube/Views/SettingsView.xaml.cs
T
Michael Gordeev 787a6e9f48 Refactored core
UI navigation framework

Related Work Items: #408, #414, #416
2020-06-15 15:46:38 +03:00

42 lines
853 B
C#

using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Navigation;
namespace FoxTube.Views
{
/// <summary>
/// Settings page
/// </summary>
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;
}
}
}
}