diff --git a/LivreLand/MauiProgram.cs b/LivreLand/MauiProgram.cs index bf7df67..b2ace96 100644 --- a/LivreLand/MauiProgram.cs +++ b/LivreLand/MauiProgram.cs @@ -32,6 +32,7 @@ public static class MauiProgram .AddSingleton() .AddSingleton() .AddSingleton() + .AddSingleton() .AddSingleton() @@ -48,7 +49,8 @@ public static class MauiProgram .AddSingleton() .AddSingleton() .AddSingleton() - .AddSingleton(); + .AddSingleton() + .AddSingleton(); #if DEBUG builder.Logging.AddDebug(); diff --git a/LivreLand/View/ContentViews/DetailsLivreButtonView.xaml b/LivreLand/View/ContentViews/DetailsLivreButtonView.xaml index c3f045c..33b3aba 100644 --- a/LivreLand/View/ContentViews/DetailsLivreButtonView.xaml +++ b/LivreLand/View/ContentViews/DetailsLivreButtonView.xaml @@ -26,6 +26,9 @@ TextColor="Red" VerticalOptions="Center" Grid.Column="2"/> + + + diff --git a/LivreLand/View/ContentViews/DetailsLivreButtonView.xaml.cs b/LivreLand/View/ContentViews/DetailsLivreButtonView.xaml.cs index 6914d46..8784bea 100644 --- a/LivreLand/View/ContentViews/DetailsLivreButtonView.xaml.cs +++ b/LivreLand/View/ContentViews/DetailsLivreButtonView.xaml.cs @@ -1,3 +1,6 @@ +using System.Windows.Input; +using ViewModels; + namespace LivreLand.View.ContentViews; public partial class DetailsLivreButtonView : ContentView @@ -16,6 +19,20 @@ public partial class DetailsLivreButtonView : ContentView set => SetValue(DetailsLivreButtonView.ButtonIconProperty, value); } + public static readonly BindableProperty ButtonCommandProperty = BindableProperty.Create(nameof(ButtonCommand), typeof(ICommand), typeof(DetailsLivreButtonView)); + public ICommand ButtonCommand + { + get => (ICommand)GetValue(DetailsLivreButtonView.ButtonCommandProperty); + set => SetValue(DetailsLivreButtonView.ButtonCommandProperty, value); + } + + public static readonly BindableProperty ButtonCommandParameterProperty = BindableProperty.Create(nameof(ButtonCommandParameter), typeof(BookVM), typeof(DetailsLivreButtonView)); + public BookVM ButtonCommandParameter + { + get => (BookVM)GetValue(DetailsLivreButtonView.ButtonCommandParameterProperty); + set => SetValue(DetailsLivreButtonView.ButtonCommandParameterProperty, value); + } + public DetailsLivreButtonView() { InitializeComponent(); diff --git a/LivreLand/View/DetailsLivreView.xaml b/LivreLand/View/DetailsLivreView.xaml index a913610..65ed64e 100644 --- a/LivreLand/View/DetailsLivreView.xaml +++ b/LivreLand/View/DetailsLivreView.xaml @@ -277,7 +277,14 @@ - + + + + + diff --git a/LivreLand/View/FavorisView.xaml b/LivreLand/View/FavorisView.xaml index eb0bfc5..fc0ec13 100644 --- a/LivreLand/View/FavorisView.xaml +++ b/LivreLand/View/FavorisView.xaml @@ -3,6 +3,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:view="clr-namespace:LivreLand.View" xmlns:contentView="clr-namespace:LivreLand.View.ContentViews" + xmlns:viewModel="clr-namespace:ViewModels;assembly=ViewModels" x:Class="LivreLand.View.FavorisView" Title="FavorisView"> @@ -38,12 +39,12 @@ Style="{StaticResource HeaderCollectionViewText}" Grid.Column="1"/> - - + @@ -82,7 +83,7 @@ Stroke="{StaticResource Gray}" StrokeShape="RoundRectangle 3" StrokeThickness="3"> - @@ -98,11 +99,11 @@ Style="{StaticResource MasterTitleBookText}" Grid.Column="2" Grid.Row="0"/> -