From 072bd1f21700922060cc2e8cdb77c483c14da7e3 Mon Sep 17 00:00:00 2001 From: "leo.tuaillon" Date: Mon, 1 May 2023 23:27:22 +0200 Subject: [PATCH] Splash menu and nav --- App.xaml.cs | 14 +++++++++----- AppShell.xaml | 8 ++++++++ AppShell.xaml.cs | 10 +++++++++- Pages/LoginPage.xaml | 3 ++- Pages/LoginPage.xaml.cs | 15 +++++++++++++++ Pages/Splash.xaml | 3 ++- Pages/Splash.xaml.cs | 8 +++++++- 7 files changed, 52 insertions(+), 9 deletions(-) diff --git a/App.xaml.cs b/App.xaml.cs index 3b0e629..f779156 100644 --- a/App.xaml.cs +++ b/App.xaml.cs @@ -1,11 +1,15 @@ namespace ShoopNCook; +using ShoopNCook.Pages; public partial class App : Application { - public App() - { - InitializeComponent(); + public App() + { + InitializeComponent(); - MainPage = new AppShell(); - } + // Définir AppShell comme page principale au démarrage + MainPage = new NavigationPage(new Splash()); + } + + // ... } diff --git a/AppShell.xaml b/AppShell.xaml index dcdb469..3f7ca5f 100644 --- a/AppShell.xaml +++ b/AppShell.xaml @@ -12,6 +12,14 @@ Shell.TabBarUnselectedColor="{StaticResource TextColorSecondary}"> + + + Text="LOG IN" + Clicked="OnLoginButtonClicked"/> + Margin="25" + Clicked="OnSyncButtonClicked"/> \ No newline at end of file diff --git a/Pages/Splash.xaml.cs b/Pages/Splash.xaml.cs index 4d2df16..a81b80d 100644 --- a/Pages/Splash.xaml.cs +++ b/Pages/Splash.xaml.cs @@ -5,5 +5,11 @@ public partial class Splash : ContentPage public Splash() { InitializeComponent(); + NavigationPage.SetHasNavigationBar(this, false); + } -} \ No newline at end of file + private async void OnSyncButtonClicked(object sender, EventArgs e) + { + await Navigation.PushAsync(new LoginPage()); + } +}