/
SettingsPanel.xaml.cs
43 lines (39 loc) · 1.26 KB
/
SettingsPanel.xaml.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
namespace Notepads.Controls.Settings
{
using System;
using Notepads.Services;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Media.Animation;
public sealed partial class SettingsPanel : Page
{
public SettingsPanel()
{
InitializeComponent();
}
public void Show(string title, string tag)
{
Type pageType;
switch (tag)
{
case "TextAndEditor":
pageType = typeof(TextAndEditorSettings);
break;
case "Personalization":
pageType = typeof(PersonalizationSettings);
break;
case "Advanced":
pageType = typeof(AdvancedSettings);
break;
case "About":
pageType = typeof(AboutPage);
break;
default:
pageType = typeof(TextAndEditorSettings);
break;
}
LoggingService.LogInfo($"Navigating to: {tag} Page", consoleOnly: true);
TitleTextBlock.Text = title;
ContentFrame.Navigate(pageType, null, new SuppressNavigationTransitionInfo());
}
}
}