-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAppShell.xaml.cs
42 lines (37 loc) · 997 Bytes
/
AppShell.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
using Notak.View;
namespace Notak;
public partial class AppShell : Shell
{
public AppShell()
{
InitializeComponent();
if (DeviceInfo.Idiom == DeviceIdiom.Phone) {
Shell.Current.CurrentItem = PhoneTabs;
}
Routing.RegisterRoute(nameof(DetailPage), typeof(DetailPage));
Routing.RegisterRoute(nameof(TagsPage), typeof(TagsPage));
Routing.RegisterRoute(nameof(SettingsPage), typeof(SettingsPage));
}
async void TapGestureRecognizer_Tapped(System.Object sender, System.EventArgs e)
{
try
{
await Shell.Current.GoToAsync($"{nameof(SettingsPage)}");
}
catch (Exception ex)
{
Debug.WriteLine($"err: {ex.Message}");
}
}
async Task GoBack()
{
try
{
await Shell.Current.GoToAsync("..");
}
catch (Exception ex)
{
Debug.WriteLine($"err: {ex.Message}");
}
}
}