mirror of
https://github.com/Nioux/AideDeJeu.git
synced 2025-12-15 22:59:39 +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();
|
InitializeComponent();
|
||||||
|
|
||||||
MainPage = new NavigationPage(new MainPage());
|
MainPage = new MainPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnStart ()
|
protected override void OnStart ()
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,9 @@
|
||||||
<ContentPage.BindingContext>
|
<ContentPage.BindingContext>
|
||||||
<vm:AboutViewModel />
|
<vm:AboutViewModel />
|
||||||
</ContentPage.BindingContext>
|
</ContentPage.BindingContext>
|
||||||
<ContentPage.ToolbarItems>
|
<!--<ContentPage.ToolbarItems>
|
||||||
<ToolbarItem Text="truc" />
|
<ToolbarItem Text="truc" />
|
||||||
</ContentPage.ToolbarItems>
|
</ContentPage.ToolbarItems>-->
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
|
|
|
||||||
|
|
@ -82,43 +82,47 @@
|
||||||
</ContentPage>
|
</ContentPage>
|
||||||
</MasterDetailPage.Master>
|
</MasterDetailPage.Master>
|
||||||
<MasterDetailPage.Detail>
|
<MasterDetailPage.Detail>
|
||||||
<ContentPage Title="">
|
<NavigationPage>
|
||||||
<ContentPage.ToolbarItems>
|
<x:Arguments>
|
||||||
<ToolbarItem Name="Spells" Text="Sorts" Order="Primary" Icon="spell_book.png" Command="{Binding SwitchToSpells}" />
|
<ContentPage Title="">
|
||||||
<ToolbarItem Name="Monsters" Text="Monstres" Order="Primary" Icon="dragon_head.png" Command="{Binding SwitchToMonsters}" />
|
<ContentPage.ToolbarItems>
|
||||||
<ToolbarItem Name="About" Text="À propos de..." Order="Primary" Icon="wooden_sign.png" Command="{Binding AboutCommand}" />
|
<ToolbarItem Name="Spells" Text="Sorts" Order="Primary" Icon="spell_book.png" Command="{Binding SwitchToSpells}" />
|
||||||
</ContentPage.ToolbarItems>
|
<ToolbarItem Name="Monsters" Text="Monstres" Order="Primary" Icon="dragon_head.png" Command="{Binding SwitchToMonsters}" />
|
||||||
<StackLayout Orientation="Vertical">
|
<ToolbarItem Name="About" Text="À propos de..." Order="Primary" Icon="wooden_sign.png" Command="{Binding AboutCommand}" />
|
||||||
<SearchBar x:Name="SearchBar" SearchCommand="{Binding SearchCommand}" SearchCommandParameter="{Binding Text, Source={x:Reference SearchBar}}">
|
</ContentPage.ToolbarItems>
|
||||||
<SearchBar.Behaviors>
|
<StackLayout Orientation="Vertical">
|
||||||
<tools:TextChangedBehavior />
|
<SearchBar x:Name="SearchBar" SearchCommand="{Binding SearchCommand}" SearchCommandParameter="{Binding Text, Source={x:Reference SearchBar}}">
|
||||||
</SearchBar.Behaviors>
|
<SearchBar.Behaviors>
|
||||||
</SearchBar>
|
<tools:TextChangedBehavior />
|
||||||
|
</SearchBar.Behaviors>
|
||||||
|
</SearchBar>
|
||||||
|
|
||||||
<ListView x:Name="ItemsListView"
|
<ListView x:Name="ItemsListView"
|
||||||
ItemsSource="{Binding Items}"
|
ItemsSource="{Binding Items}"
|
||||||
VerticalOptions="FillAndExpand"
|
VerticalOptions="FillAndExpand"
|
||||||
HasUnevenRows="true"
|
HasUnevenRows="true"
|
||||||
IsRefreshing="{Binding IsBusy, Mode=OneWay}"
|
IsRefreshing="{Binding IsBusy, Mode=OneWay}"
|
||||||
CachingStrategy="RecycleElement"
|
CachingStrategy="RecycleElement"
|
||||||
SelectedItem="{Binding SelectedItem}">
|
SelectedItem="{Binding SelectedItem}">
|
||||||
<!--RefreshCommand="{Binding LoadItemsCommand}"
|
<!--RefreshCommand="{Binding LoadItemsCommand}"
|
||||||
IsPullToRefreshEnabled="true"-->
|
IsPullToRefreshEnabled="true"-->
|
||||||
|
|
||||||
<ListView.ItemTemplate>
|
<ListView.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<ViewCell>
|
<ViewCell>
|
||||||
<StackLayout Padding="10">
|
<StackLayout Padding="10">
|
||||||
<Label Text="{Binding NamePHB}"
|
<Label Text="{Binding NamePHB}"
|
||||||
LineBreakMode="NoWrap"
|
LineBreakMode="NoWrap"
|
||||||
Style="{DynamicResource subsubsection}"
|
Style="{DynamicResource subsubsection}"
|
||||||
FontSize="16" />
|
FontSize="16" />
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
</ViewCell>
|
</ViewCell>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ListView.ItemTemplate>
|
</ListView.ItemTemplate>
|
||||||
</ListView>
|
</ListView>
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
</ContentPage>
|
</ContentPage>
|
||||||
|
</x:Arguments>
|
||||||
|
</NavigationPage>
|
||||||
</MasterDetailPage.Detail>
|
</MasterDetailPage.Detail>
|
||||||
</MasterDetailPage>
|
</MasterDetailPage>
|
||||||
|
|
|
||||||
|
|
@ -17,16 +17,10 @@ namespace AideDeJeu.Views
|
||||||
public MainPage ()
|
public MainPage ()
|
||||||
{
|
{
|
||||||
InitializeComponent ();
|
InitializeComponent ();
|
||||||
Navigator = new Navigator(Navigation);
|
Navigator = new Navigator((Detail as NavigationPage).Navigation);
|
||||||
BindingContext = viewModel = new MainViewModel(Navigator);
|
BindingContext = viewModel = new MainViewModel(Navigator);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnBackButtonPressed()
|
|
||||||
{
|
|
||||||
IsPresented = !IsPresented;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void OnAppearing()
|
protected override void OnAppearing()
|
||||||
{
|
{
|
||||||
base.OnAppearing();
|
base.OnAppearing();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue