mirror of
https://github.com/Nioux/AideDeJeu.git
synced 2025-12-15 14:49:42 +00:00
Changement de l'endroit où la NavigationPage est incluse dans l'arbo
This commit is contained in:
parent
e9a4a2264f
commit
3033b60368
4 changed files with 34 additions and 36 deletions
|
|
@ -14,7 +14,7 @@ namespace AideDeJeu
|
|||
{
|
||||
InitializeComponent();
|
||||
|
||||
MainPage = new NavigationPage(new MainPage());
|
||||
MainPage = new MainPage();
|
||||
}
|
||||
|
||||
protected override void OnStart ()
|
||||
|
|
|
|||
|
|
@ -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" />
|
||||
|
|
|
|||
|
|
@ -82,43 +82,47 @@
|
|||
</ContentPage>
|
||||
</MasterDetailPage.Master>
|
||||
<MasterDetailPage.Detail>
|
||||
<ContentPage Title="">
|
||||
<ContentPage.ToolbarItems>
|
||||
<ToolbarItem Name="Spells" Text="Sorts" Order="Primary" Icon="spell_book.png" Command="{Binding SwitchToSpells}" />
|
||||
<ToolbarItem Name="Monsters" Text="Monstres" Order="Primary" Icon="dragon_head.png" Command="{Binding SwitchToMonsters}" />
|
||||
<ToolbarItem Name="About" Text="À propos de..." Order="Primary" Icon="wooden_sign.png" Command="{Binding AboutCommand}" />
|
||||
</ContentPage.ToolbarItems>
|
||||
<StackLayout Orientation="Vertical">
|
||||
<SearchBar x:Name="SearchBar" SearchCommand="{Binding SearchCommand}" SearchCommandParameter="{Binding Text, Source={x:Reference SearchBar}}">
|
||||
<SearchBar.Behaviors>
|
||||
<tools:TextChangedBehavior />
|
||||
</SearchBar.Behaviors>
|
||||
</SearchBar>
|
||||
<NavigationPage>
|
||||
<x:Arguments>
|
||||
<ContentPage Title="">
|
||||
<ContentPage.ToolbarItems>
|
||||
<ToolbarItem Name="Spells" Text="Sorts" Order="Primary" Icon="spell_book.png" Command="{Binding SwitchToSpells}" />
|
||||
<ToolbarItem Name="Monsters" Text="Monstres" Order="Primary" Icon="dragon_head.png" Command="{Binding SwitchToMonsters}" />
|
||||
<ToolbarItem Name="About" Text="À propos de..." Order="Primary" Icon="wooden_sign.png" Command="{Binding AboutCommand}" />
|
||||
</ContentPage.ToolbarItems>
|
||||
<StackLayout Orientation="Vertical">
|
||||
<SearchBar x:Name="SearchBar" SearchCommand="{Binding SearchCommand}" SearchCommandParameter="{Binding Text, Source={x:Reference SearchBar}}">
|
||||
<SearchBar.Behaviors>
|
||||
<tools:TextChangedBehavior />
|
||||
</SearchBar.Behaviors>
|
||||
</SearchBar>
|
||||
|
||||
<ListView x:Name="ItemsListView"
|
||||
<ListView x:Name="ItemsListView"
|
||||
ItemsSource="{Binding Items}"
|
||||
VerticalOptions="FillAndExpand"
|
||||
HasUnevenRows="true"
|
||||
IsRefreshing="{Binding IsBusy, Mode=OneWay}"
|
||||
CachingStrategy="RecycleElement"
|
||||
SelectedItem="{Binding SelectedItem}">
|
||||
<!--RefreshCommand="{Binding LoadItemsCommand}"
|
||||
<!--RefreshCommand="{Binding LoadItemsCommand}"
|
||||
IsPullToRefreshEnabled="true"-->
|
||||
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<ViewCell>
|
||||
<StackLayout Padding="10">
|
||||
<Label Text="{Binding NamePHB}"
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<ViewCell>
|
||||
<StackLayout Padding="10">
|
||||
<Label Text="{Binding NamePHB}"
|
||||
LineBreakMode="NoWrap"
|
||||
Style="{DynamicResource subsubsection}"
|
||||
FontSize="16" />
|
||||
</StackLayout>
|
||||
</ViewCell>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
</StackLayout>
|
||||
</ContentPage>
|
||||
</StackLayout>
|
||||
</ViewCell>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
</StackLayout>
|
||||
</ContentPage>
|
||||
</x:Arguments>
|
||||
</NavigationPage>
|
||||
</MasterDetailPage.Detail>
|
||||
</MasterDetailPage>
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue