AppSAV/MauiAppStock/AppShell.xaml.cs
2025-04-08 11:46:40 +02:00

22 lines
785 B
C#

using MauiAppStock.Views;
namespace MauiAppStock;
public partial class AppShell : Shell
{
public AppShell()
{
InitializeComponent();
Routing.RegisterRoute(nameof(MainPage), typeof(MainPage));
Routing.RegisterRoute(nameof(AppareilsPage), typeof(AppareilsPage));
Routing.RegisterRoute(nameof(PiecesPage), typeof(PiecesPage));
Routing.RegisterRoute(nameof(SelectAppareilForAssociationPage), typeof(SelectAppareilForAssociationPage));
}
protected override void OnNavigating(ShellNavigatingEventArgs args)
{
base.OnNavigating(args);
bool isMainPage = args.Target?.Location?.OriginalString == "//MainPage";
Shell.SetBackButtonBehavior(this, new BackButtonBehavior { IsVisible = !isMainPage });
}
}