You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ShopNCook/MainAppShell.xaml.cs

23 lines
965 B

namespace ShoopNCook;
using Microsoft.Maui.Controls;
using Models;
using ShoopNCook.Controllers;
using ShoopNCook.Pages;
using Services;
// Shell principale de l'application après connexion de l'utilisateur
public partial class MainAppShell : Shell
{
// Constructeur qui prend en argument un compte, un endpoint et une application
public MainAppShell(Account account, IEndpoint endpoint, IApp app)
{
InitializeComponent();
// Initialisation de chaque onglet avec sa page respective
HomeTab.ContentTemplate = new DataTemplate(() => new HomePage(account, endpoint));
FavoritesTab.ContentTemplate = new DataTemplate(() => new FavoritesPage(account, endpoint.RecipesService));
MyListTab.ContentTemplate = new DataTemplate(() => new MyListPage(account, endpoint.RecipesService));
MoreTab.ContentTemplate = new DataTemplate(() => new MorePage(account, new MorePageController(account, endpoint, app)));
}
}