1
0
Fork 0
mirror of https://github.com/Nioux/AideDeJeu.git synced 2025-10-31 07:26:09 +00:00

Changement de l'endroit où la NavigationPage est incluse dans l'arbo

This commit is contained in:
Yan Maniez 2018-05-18 23:24:35 +02:00
parent e9a4a2264f
commit 3033b60368
4 changed files with 34 additions and 36 deletions

View file

@ -14,7 +14,7 @@ namespace AideDeJeu
{
InitializeComponent();
MainPage = new NavigationPage(new MainPage());
MainPage = new MainPage();
}
protected override void OnStart ()

View file

@ -8,9 +8,9 @@
<ContentPage.BindingContext>
<vm:AboutViewModel />
</ContentPage.BindingContext>
<ContentPage.ToolbarItems>
<!--<ContentPage.ToolbarItems>
<ToolbarItem Text="truc" />
</ContentPage.ToolbarItems>
</ContentPage.ToolbarItems>-->
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />

View file

@ -82,6 +82,8 @@
</ContentPage>
</MasterDetailPage.Master>
<MasterDetailPage.Detail>
<NavigationPage>
<x:Arguments>
<ContentPage Title="">
<ContentPage.ToolbarItems>
<ToolbarItem Name="Spells" Text="Sorts" Order="Primary" Icon="spell_book.png" Command="{Binding SwitchToSpells}" />
@ -120,5 +122,7 @@
</ListView>
</StackLayout>
</ContentPage>
</x:Arguments>
</NavigationPage>
</MasterDetailPage.Detail>
</MasterDetailPage>

View file

@ -17,16 +17,10 @@ namespace AideDeJeu.Views
public MainPage ()
{
InitializeComponent ();
Navigator = new Navigator(Navigation);
Navigator = new Navigator((Detail as NavigationPage).Navigation);
BindingContext = viewModel = new MainViewModel(Navigator);
}
protected override bool OnBackButtonPressed()
{
IsPresented = !IsPresented;
return true;
}
protected override void OnAppearing()
{
base.OnAppearing();