-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathAppShell.xaml.cs
28 lines (25 loc) · 933 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
using ChatBot_MAUI.Views;
namespace ChatBot_MAUI;
public partial class AppShell : Shell
{
public AppShell()
{
InitializeComponent();
Routing.RegisterRoute(nameof(ParameterConfig), typeof(ParameterConfig));
Routing.RegisterRoute(nameof(ChatPage), typeof(ChatPage));
Routing.RegisterRoute(nameof(DetailChatPage), typeof(DetailChatPage));
}
[ContentProperty(nameof(PageType))]
public class NavigationPage : IMarkupExtension<Microsoft.Maui.Controls.NavigationPage>
{
public Type PageType { get; set; }
public Microsoft.Maui.Controls.NavigationPage ProvideValue(IServiceProvider serviceProvider)
{
return new Microsoft.Maui.Controls.NavigationPage((Page)Activator.CreateInstance(PageType));
}
object IMarkupExtension.ProvideValue(IServiceProvider serviceProvider)
{
return ProvideValue(serviceProvider);
}
}
}