ADD : Finish correction Navigation Command Header

commands-19-09
Lou BRODA 1 year ago
parent 60547644be
commit 4971951d45

@ -117,11 +117,11 @@
<toolkit:IconTintColorBehavior TintColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}"/> <toolkit:IconTintColorBehavior TintColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}"/>
</Image.Behaviors> </Image.Behaviors>
</Image> </Image>
</Grid>
<Grid.GestureRecognizers> <Grid.GestureRecognizers>
<TapGestureRecognizer Command="{Binding Navigator.PopupISBNNavigationCommand}"/> <TapGestureRecognizer Command="{Binding Navigator.PopupISBNNavigationCommand}"/>
</Grid.GestureRecognizers> </Grid.GestureRecognizers>
</Grid> </Grid>
</Grid>
<Border.StrokeShape> <Border.StrokeShape>
<RoundRectangle CornerRadius="10" /> <RoundRectangle CornerRadius="10" />
</Border.StrokeShape> </Border.StrokeShape>

@ -40,7 +40,7 @@
Style="{StaticResource HeaderTitle}" Style="{StaticResource HeaderTitle}"
Grid.Column="2"/> Grid.Column="2"/>
<Grid.GestureRecognizers> <Grid.GestureRecognizers>
<TapGestureRecognizer Command="{Binding PopupBackButtonNavigationCommand}"/> <TapGestureRecognizer Command="{Binding ButtonBackTappedCommand}"/>
</Grid.GestureRecognizers> </Grid.GestureRecognizers>
</Grid> </Grid>
<ImageButton VerticalOptions="Center" <ImageButton VerticalOptions="Center"
@ -49,7 +49,7 @@
MaximumHeightRequest="20" MaximumHeightRequest="20"
MaximumWidthRequest="20" MaximumWidthRequest="20"
IsVisible="{Binding HeaderPlusButtonVisible}" IsVisible="{Binding HeaderPlusButtonVisible}"
Command="{Binding ButtonTappedCommand}" Command="{Binding ButtonPlusTappedCommand}"
Grid.Column="2"> Grid.Column="2">
<ImageButton.Behaviors> <ImageButton.Behaviors>
<toolkit:IconTintColorBehavior TintColor="{StaticResource PinkOrange}"/> <toolkit:IconTintColorBehavior TintColor="{StaticResource PinkOrange}"/>

@ -1,9 +1,15 @@
using LivreLand.Model; using LivreLand.Model;
using LivreLand.ViewModel;
namespace LivreLand.View; namespace LivreLand.View;
public partial class TousView : ContentPage public partial class TousView : ContentPage
{ {
#region Properties
public NavigatorVM Navigator { get; private set; }
public List<BookModel> DamasioBooks { get; set; } = new List<BookModel>() public List<BookModel> DamasioBooks { get; set; } = new List<BookModel>()
{ {
new BookModel("La horde du contrevent","Alain Damasio","Non lu", 0), new BookModel("La horde du contrevent","Alain Damasio","Non lu", 0),
@ -17,14 +23,25 @@ public partial class TousView : ContentPage
new BookModel("Le problème à trois corps","Cixin Liu","Terminé", 0) new BookModel("Le problème à trois corps","Cixin Liu","Terminé", 0)
}; };
public TousView() #endregion
#region Constructor
public TousView(NavigatorVM navigatorVM)
{ {
BindingContext = this; Navigator = navigatorVM;
InitializeComponent(); InitializeComponent();
BindingContext = this;
} }
#endregion
#region Methods
void OnSelectionChanged(object sender, SelectionChangedEventArgs e) void OnSelectionChanged(object sender, SelectionChangedEventArgs e)
{ {
App.Current.MainPage.Navigation.PushAsync(new DetailsLivreView()); App.Current.MainPage.Navigation.PushAsync(new DetailsLivreView());
} }
#endregion
} }

@ -33,7 +33,7 @@ namespace LivreLand.ViewModel
public NavigatorVM() public NavigatorVM()
{ {
TousNavigationCommand = new Command(() => Navigator.PushAsync(new TousView())); TousNavigationCommand = new Command(() => Navigator.PushAsync(new TousView(this)));
EmpruntsPretsNavigationCommand = new Command(() => Navigator.PushAsync(new EmpruntsPretsView())); EmpruntsPretsNavigationCommand = new Command(() => Navigator.PushAsync(new EmpruntsPretsView()));
ALirePlusTardNavigationCommand = new Command(() => Navigator.PushAsync(new ALirePlusTardView())); ALirePlusTardNavigationCommand = new Command(() => Navigator.PushAsync(new ALirePlusTardView()));
StatutLectureNavigationCommand = new Command(() => Navigator.PushAsync(new StatutLectureView())); StatutLectureNavigationCommand = new Command(() => Navigator.PushAsync(new StatutLectureView()));

Loading…
Cancel
Save