ADD : Avancement View

homepage-05-09
Lou BRODA 1 year ago
parent 6733ddb544
commit a9a5e562f4

@ -20,7 +20,7 @@
ContentTemplate="{DataTemplate view:DetailsLivreView}"
Icon="bookmark_fill"/>
<ShellContent Title="Search"
ContentTemplate="{DataTemplate view:FiltrageDateView}"
ContentTemplate="{DataTemplate view:TousView}"
Icon="magnifying_glass.png"/>
</TabBar>

@ -53,7 +53,6 @@
</ItemGroup>
<ItemGroup>
<Folder Include="Model\" />
<Folder Include="ViewModel\" />
</ItemGroup>
@ -82,6 +81,9 @@
<MauiXaml Update="View\ContentViews\SeparatorEntireView.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="View\ContentViews\StarNotationView.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="View\DetailsLivreView.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>

@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LivreLand.Model
{
public class BookModel
{
public string Title { get; private set; }
public string Author { get; private set; }
public string State { get; private set; }
public int Rating { get; private set; }
public BookModel(string title, string author, string state, int rating)
{
Title = title;
Author = author;
State = state;
Rating = rating;
}
}
}

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="108" height="110">
<path d="M54,5 86,105 1,43H107L22,105" fill="#808080"/>
</svg>

After

Width:  |  Height:  |  Size: 167 B

@ -181,7 +181,13 @@
<Setter Property="FontSize" Value="Medium"/>
<Setter Property="FontAttributes" Value="Bold"/>
</Style>
<Style TargetType="Label" x:Key="HomeTitle">
<Setter Property="TextColor" Value="{DynamicResource Black}"/>
<Setter Property="FontSize" Value="40"/>
<Setter Property="FontAttributes" Value="Bold"/>
</Style>
<Style TargetType="Label" x:Key="DetailsLivreTitle">
<Setter Property="TextColor" Value="{DynamicResource Black}"/>
<Setter Property="FontSize" Value="Small"/>

@ -4,9 +4,10 @@
xmlns:view="clr-namespace:LivreLand.View"
xmlns:contentView="clr-namespace:LivreLand.View.ContentViews"
x:Class="LivreLand.View.BibliothequeView"
x:Name="this"
Title="BibliothequeView">
<Grid>
<Grid BindingContext="{x:Reference this}">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="10"/>
@ -28,20 +29,20 @@
</Grid.RowDefinitions>
<Label Text="Mes Livres"
FontAttributes="Bold"
FontSize="40"
Margin="10,0,0,0"
Style="{StaticResource HomeTitle}"
Grid.Row="0"/>
<VerticalStackLayout BackgroundColor="{DynamicResource LightGray}"
Grid.Row="2">
Grid.Row="2">
<contentView:SeparatorEntireView/>
<!--Tous-->
<contentView:HomeButtonView ButtonTitle="Tous"
ButtonIcon="tray_2_fill.png"
ButtonNumber="45"/>
ButtonNumber="45"
ButtonCommand="{Binding FiltreAuteurCommand}"/>
<contentView:SeparatorCutStartView/>

@ -1,9 +1,24 @@
using System.Windows.Input;
namespace LivreLand.View;
public partial class BibliothequeView : ContentPage
{
public ICommand FiltreAuteurCommand { get; private set; }
public BibliothequeView()
{
InitializeComponent();
}
//Commandes navigation temporaires
FiltreAuteurCommand = new Command(
execute: () =>
{
App.Current.MainPage.Navigation.PushAsync(new FiltrageAuteurView());
},
canExecute: () =>
{
return true;
});
}
}

@ -30,9 +30,9 @@
MaximumHeightRequest="15"
MaximumWidthRequest="15"
Grid.Column="6"/>
<!--<Grid.GestureRecognizers>
<TapGestureRecognizer Command=""/>
</Grid.GestureRecognizers>-->
<Grid.GestureRecognizers>
<TapGestureRecognizer Command="{Binding ButtonCommand}"/>
</Grid.GestureRecognizers>
</Grid>
</ContentView>

@ -23,7 +23,7 @@ public partial class HomeButtonView : ContentView
set => SetValue(HomeButtonView.ButtonNumberProperty, value);
}
public static readonly BindableProperty ButtonCommandProperty = BindableProperty.Create(nameof(ButtonCommand), typeof(Command), typeof(HomeButtonView), string.Empty);
public static readonly BindableProperty ButtonCommandProperty = BindableProperty.Create(nameof(ButtonCommand), typeof(Command), typeof(HomeButtonView));
public Command ButtonCommand
{
get => (Command)GetValue(HomeButtonView.ButtonCommandProperty);

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="LivreLand.View.ContentViews.StarNotationView">
<HorizontalStackLayout Spacing="2">
<Image Source="star_fill.png"
HeightRequest="20"
WidthRequest="20"/>
<Image Source="star_fill.png"
HeightRequest="20"
WidthRequest="20"/>
<Image Source="star_fill.png"
HeightRequest="20"
WidthRequest="20"/>
<Image Source="star_fill.png"
HeightRequest="20"
WidthRequest="20"/>
<Image Source="star_fill.png"
HeightRequest="20"
WidthRequest="20"/>
</HorizontalStackLayout>
</ContentView>

@ -0,0 +1,9 @@
namespace LivreLand.View.ContentViews;
public partial class StarNotationView : ContentView
{
public StarNotationView()
{
InitializeComponent();
}
}

@ -45,7 +45,9 @@
<Label Text="La horde du contrevent"
Grid.Column="2"
Grid.Row="2"/>
Grid.Row="0"/>
<contentView:StarNotationView Grid.Column="2"
Grid.Row="2"/>
</Grid>
<contentView:SeparatorCutStartView/>

@ -1,11 +1,13 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:contentView="clr-namespace:LivreLand.View.ContentViews"
x:Class="LivreLand.View.TousView"
Title="TousView">
<Grid>
<ScrollView>
<CollectionView>
<CollectionView ItemsSource="{Binding AllBooks}">
<CollectionView.GroupHeaderTemplate>
<DataTemplate>
<Label Text="Alain Damasio"/>
@ -30,13 +32,13 @@
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
</Grid>
<Label Text="La horde du contrevent"
<Label Text="{Binding Title}"
Grid.Row="0"/>
<Label Text="Alain Damasio"
<Label Text="{Binding Author}"
Grid.Row="1"/>
<Label Text="Non lu"
<Label Text="{Binding State}"
Grid.Row="2"/>
<contentView:StarNotationView Grid.Row="4"/>
</Grid>
</DataTemplate>
</CollectionView.ItemTemplate>

@ -1,9 +1,19 @@
using LivreLand.Model;
namespace LivreLand.View;
public partial class TousView : ContentPage
{
public List<BookModel> AllBooks { get; set; } = new List<BookModel>()
{
new BookModel("Alain Damasio","La horde du contrevent","Non lu", 0),
new BookModel("Alain Damasio",".La zone du dehors","Terminé", 0),
new BookModel("Cixin Liu","L'équateur d'Einstein","Non lu", 0)
};
public TousView()
{
BindingContext = this;
InitializeComponent();
}
}
Loading…
Cancel
Save