diff --git a/PlantBox.Client/PlantBox.Client/App.xaml.cs b/PlantBox.Client/PlantBox.Client/App.xaml.cs index 0507602..198015e 100644 --- a/PlantBox.Client/PlantBox.Client/App.xaml.cs +++ b/PlantBox.Client/PlantBox.Client/App.xaml.cs @@ -11,6 +11,7 @@ namespace PlantBox.Client public partial class App : Application { public static SettingsViewModel Settings { get; private set; } + public static MainPage MasterPage { get; private set; } public App() { @@ -24,7 +25,8 @@ namespace PlantBox.Client Locale.Culture = Settings.Language; } - MainPage = new MainPage(); + MasterPage = new MainPage(); + MainPage = MasterPage; } protected override void OnStart() diff --git a/PlantBox.Client/PlantBox.Client/Forms/HomePage.xaml.cs b/PlantBox.Client/PlantBox.Client/Forms/HomePage.xaml.cs index e13ab24..90e8f1e 100644 --- a/PlantBox.Client/PlantBox.Client/Forms/HomePage.xaml.cs +++ b/PlantBox.Client/PlantBox.Client/Forms/HomePage.xaml.cs @@ -27,5 +27,12 @@ namespace PlantBox.Client.Forms await Navigation.PushAsync(new PlantPage(plant)); } + + protected override bool OnBackButtonPressed() + { + App.MasterPage.IsPresented = true; + + return true; + } } } \ No newline at end of file