master
enzoj 2 years ago
parent 73b9ecfcf6
commit c34226b47e

Binary file not shown.

@ -0,0 +1,7 @@
{
"ExpandedNodes": [
""
],
"SelectedNode": "\\MVVM.sln",
"PreviewInSolutionExplorer": false
}

Binary file not shown.

Binary file not shown.

@ -14,13 +14,6 @@
<ShellContent ContentTemplate="{DataTemplate local:DetailLivre}"/>
</Tab>
<Tab Title="My Reading" Icon="bookmark_fill">
<ShellContent ContentTemplate="{DataTemplate local:Livres}"/>
</Tab>

@ -10,7 +10,7 @@ namespace MVVM.Classe
{
public string Auteur { get; set; }
public GroupeLivre( string auteur, List<Livre> listLivre) : base(listLivre)
public GroupeLivre( string auteur,List<Livre> listLivre) : base(listLivre)
{
Auteur = auteur;
}

@ -18,6 +18,11 @@ namespace MVVM.Classe
public string Statut { get; set; }
public Livre() { }
public bool Separateur { get; set; }
public Livre()
{
Separateur = true;
}
}
}

@ -7,6 +7,6 @@ public partial class Bibliotheque : ContentPage
public Bibliotheque()
{
InitializeComponent();
}
}
}

@ -0,0 +1,37 @@
using CommunityToolkit.Maui.Behaviors;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MVVM.Pages.Component
{
public class CustomToolbarItem : ToolbarItem
{
public CustomToolbarItem()
{
var image = new Image
{
Source = "plus",
};
var behavior = new IconTintColorBehavior
{
TintColor = Color.FromRgb(120,0,0),
};
image.Behaviors.Add(behavior);
//IconImageSource = new FileImageSource { File = "transparent.png" }; // Image transparente (optionnelle)
Clicked += (sender, e) =>
{
// Ajouter le comportement la
};
}
}
}

@ -10,13 +10,15 @@
<Grid Grid.Column="1" RowDefinitions="Auto,Auto,Auto,*,Auto">
<Label x:Name="Titre" Grid.Row="0" Text="Title"/>
<Label x:Name="Auteur" Grid.Row="1" Text="Auteur"/>
<Label x:Name="Statut" Grid.Row="2" Text="Statut"/>
<Label x:Name="Etoile" Grid.Row="4" Text="Etoile"/>
<Label x:Name="Titre" Grid.Row="0" Style="{StaticResource TitreLivre}" Text="Title"/>
<Label x:Name="Auteur" Grid.Row="1" Style="{StaticResource AuteurLivreComponent}" Text="Auteur"/>
<Label x:Name="Statut" Grid.Row="2" Style="{StaticResource StatutLivre}" Text="Statut"/>
<Label x:Name="Etoile" Grid.Row="4" Style="{StaticResource EtoileLivre}" Text="Etoile"/>
</Grid>
</Grid>

@ -2,62 +2,39 @@
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:Comp="clr-namespace:MVVM.Pages.Component"
x:Class="MVVM.Pages.Livres">
x:Class="MVVM.Pages.Livres"
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
xmlns:local="clr-namespace:MVVM.Pages.Component">
<Shell.TitleView>
<Label Text="Tous" FontFamily="Strande2" VerticalTextAlignment="Center" VerticalOptions="CenterAndExpand" HeightRequest="50" FontSize="Medium" />
</Shell.TitleView>
<ContentPage.ToolbarItems>
<ToolbarItem IconImageSource="plus"/>
<ToolbarItem Text="Mes livres"/>
<ToolbarItem Text="Tous"/>
<ToolbarItem IconImageSource="plus"/>
<ToolbarItem IconImageSource="plus"/>
</ContentPage.ToolbarItems>
<ScrollView>
<!--
<VerticalStackLayout>
<StackLayout>
<VerticalStackLayout>
<Label Text="nom auteur"/>
<Comp:Livre ImageComp="onepiece1" AuteurComp="Alain Damasio"/>
</VerticalStackLayout>
</StackLayout>
<StackLayout>
<VerticalStackLayout>
<Comp:Livre ImageComp="onepiece" AuteurComp="Alain Damasio"/>
</VerticalStackLayout>
</StackLayout>
</VerticalStackLayout>
-->
<CollectionView x:Name="collectionView" IsGrouped="True">
<CollectionView x:Name="collectionView" IsGrouped="True" >
<CollectionView.GroupHeaderTemplate>
<DataTemplate>
<StackLayout BackgroundColor="Gray">
<Label Style="{StaticResource AuteurLivre}" Text="{Binding Auteur}"/>
<StackLayout>
<Label Style="{StaticResource AuteurLivre}" Text="{Binding Auteur}" TextColor="Gray"/>
</StackLayout>
</DataTemplate>
</CollectionView.GroupHeaderTemplate>
<CollectionView.ItemTemplate>
<DataTemplate>
<CollectionView.ItemTemplate >
<Comp:Livre ImageComp="{Binding Image}" AuteurComp="{Binding Auteur}" TitreComp="{Binding Titre}"/>
<DataTemplate>
<StackLayout>
<Comp:Livre ImageComp="{Binding Image}" AuteurComp="{Binding Auteur}" TitreComp="{Binding Titre}" Margin="15,8,0,15"/>
<Line Stroke="Black" X1="20" X2="500" IsVisible="{Binding Separateur}" />
</StackLayout>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>

@ -1,5 +1,4 @@
using AndroidX.Core.View;
using MVVM.Classe;
using MVVM.Classe;
namespace MVVM.Pages;
@ -16,6 +15,7 @@ public partial class Livres : ContentPage
collectionView.ItemsSource = listeGroupLivre;
}
@ -33,7 +33,8 @@ public partial class Livres : ContentPage
Titre = "One piece tome 2",
Note = "5",
Statut = "Lu",
Image = "onepiece2"}}));
Image = "onepiece2",
Separateur = false}}));
@ -44,7 +45,8 @@ public partial class Livres : ContentPage
Titre = "Bleach tome 1",
Note = "3",
Statut = "Lu",
Image = "bleach1"}
Image = "bleach1",
Separateur = false}
}));
listeGroupLivre.Add(new GroupeLivre("Masashi Kishimoto", new List<Livre> {
@ -64,7 +66,8 @@ public partial class Livres : ContentPage
Titre = "Naruto tome 3",
Note = "5",
Statut = "Lu",
Image = "naruto3"
Image = "naruto3",
Separateur = false
}}));

@ -0,0 +1,4 @@
<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M21.1875 24.687L27.0938 18.6284C27.3047 18.4292 27.4219 18.1245 27.4219 17.855C27.4219 17.2339 27 16.8237 26.3906 16.8237C26.0859 16.8237 25.8633 16.9175 25.6641 17.1167L23.2266 19.6362L21.3398 21.8277L21.4453 19.1206V4.06202C21.4453 3.45264 21.0117 3.00732 20.4023 3.00732C19.7812 3.00732 19.3477 3.45264 19.3477 4.06202V19.1206L19.4648 21.8277L17.5781 19.6362L15.1406 17.1167C14.9414 16.9175 14.707 16.8237 14.4141 16.8237C13.8047 16.8237 13.3711 17.2339 13.3711 17.855C13.3711 18.1245 13.5 18.4292 13.7109 18.6284L19.6172 24.687C20.0508 25.1441 20.7305 25.1558 21.1875 24.687Z" fill="black" fill-opacity="0.85"/>
<path d="M6.24609 3.35888L0.328125 9.39404C0.128906 9.60497 0 9.90966 0 10.1675C0 10.7886 0.421875 11.2104 1.03125 11.2104C1.33594 11.2104 1.57031 11.105 1.76953 10.9058L4.20703 8.38622L6.09375 6.20654L5.97656 8.91357V23.9722C5.97656 24.5933 6.41016 25.0269 7.03125 25.0269C7.64062 25.0269 8.07422 24.5933 8.07422 23.9722V8.91357L7.96875 6.20654L9.84375 8.38622L12.293 10.9058C12.4922 11.105 12.7148 11.2104 13.0195 11.2104C13.6289 11.2104 14.0508 10.7886 14.0508 10.1675C14.0508 9.90966 13.9336 9.60497 13.7227 9.39404L7.81641 3.35888C7.38281 2.90185 6.69141 2.87841 6.24609 3.35888Z" fill="black" fill-opacity="0.85"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

@ -402,6 +402,8 @@
<Setter Property="SelectedTabColor" Value="{AppThemeBinding Light={StaticResource Gray950}, Dark={StaticResource Gray200}}" />
</Style>
<!-- Page bibiothèque -->
<Style x:Key="IconBibliotheque" TargetType="Image">
<Setter Property="Margin" Value="10"/>
</Style>
@ -437,15 +439,36 @@
<Setter Property="HorizontalTextAlignment" Value="Center"/>
<Setter Property="VerticalTextAlignment" Value="Center"/>
</Style>
<!-- Page Livres-->
<Style x:Key="ImageLivre" TargetType="Image">
<Setter Property="MaximumWidthRequest" Value="110"/>
</Style>
<Style x:Key="AuteurLivre" TargetType="Label">
<Setter Property="FontSize" Value="25"/>
<Setter Property="Margin" Value="20,5,0,5"/>
<Setter Property="FontSize" Value="20"/>
<Setter Property="Margin" Value="15,5,0,5"/>
</Style>
<Style x:Key="TitreLivre" TargetType="Label">
<Setter Property="Margin" Value="10,3,0,0"/>
<Setter Property="FontSize" Value="17"/>
</Style>
<Style x:Key="AuteurLivreComponent" TargetType="Label">
<Setter Property="Margin" Value="10,2,0,0"/>
<Setter Property="FontSize" Value="13"/>
</Style>
<Style x:Key="StatutLivre" TargetType="Label">
<Setter Property="Margin" Value="10,2,0,0"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="TextColor" Value="Grey"/>
</Style>
<Style x:Key="EtoileLivre" TargetType="Label">
<Setter Property="Margin" Value="10,0,0,0"/>
</Style>
</ResourceDictionary>

@ -1,45 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" IgnorableNamespaces="uap rescap build" xmlns:build="http://schemas.microsoft.com/developer/appx/2015/build">
<!--
LE FICHIER MANIFESTE DE CE PACKAGE A ÉTÉ GÉNÉRÉ PAR LE PROCESSUS DE GÉNÉRATION.
Les modifications apportées à ce fichier seront perdues lors de la regénération. Pour corriger les erreurs présentes dans ce fichier, modifiez le fichier source .appxmanifest.
Pour plus d'informations sur les fichiers manifeste, consultez http://go.microsoft.com/fwlink/?LinkID=241727
-->
<Identity Name="b95213ae-28ea-4274-b456-c77fe8e8c511" Publisher="CN=User Name" Version="1.0.0.1" ProcessorArchitecture="x64" />
<mp:PhoneIdentity PhoneProductId="0308DB6F-9925-4970-A11E-F776CB47B4A1" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>MVVM</DisplayName>
<PublisherDisplayName>User Name</PublisherDisplayName>
<Logo>appiconStoreLogo.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
<PackageDependency Name="Microsoft.WindowsAppRuntime.1.2" MinVersion="2000.707.2303.0" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />
</Dependencies>
<Resources>
<Resource Language="EN-US" />
</Resources>
<Applications>
<Application Id="App" Executable="MVVM.exe" EntryPoint="Windows.FullTrustApplication">
<uap:VisualElements DisplayName="MVVM" Description="MVVM" Square150x150Logo="appiconMediumTile.png" Square44x44Logo="appiconLogo.png" BackgroundColor="transparent">
<uap:DefaultTile Square71x71Logo="appiconSmallTile.png" Wide310x150Logo="appiconWideTile.png" Square310x310Logo="appiconLargeTile.png" ShortName="MVVM">
<uap:ShowNameOnTiles>
<uap:ShowOn Tile="square150x150Logo" />
<uap:ShowOn Tile="wide310x150Logo" />
</uap:ShowNameOnTiles>
</uap:DefaultTile>
<uap:SplashScreen Image="splashSplashScreen.png" />
</uap:VisualElements>
</Application>
</Applications>
<Capabilities>
<rescap:Capability Name="runFullTrust" />
</Capabilities>
<build:Metadata>
<build:Item Name="Microsoft.UI.Xaml.Markup.Compiler.dll" Version="1.0.0.0" />
<build:Item Name="makepri.exe" Version="10.0.22621.755 (WinBuild.160101.0800)" />
</build:Metadata>
</Package>

@ -1,26 +0,0 @@
{
"runtimeOptions": {
"tfm": "net7.0",
"includedFrameworks": [
{
"name": "Microsoft.NETCore.App",
"version": "7.0.10"
},
{
"name": "Microsoft.Maui.Core",
"version": "**FromWorkload**"
},
{
"name": "Microsoft.Maui.Controls",
"version": "**FromWorkload**"
},
{
"name": "Microsoft.Maui.Essentials",
"version": "**FromWorkload**"
}
],
"configProperties": {
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
}
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save