parent
ac35cbd296
commit
23c7e44322
@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<toolkit:Popup xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
|
||||||
|
x:Class="PocketBook.AddBook">
|
||||||
|
|
||||||
|
<VerticalStackLayout>
|
||||||
|
<Label Text="This is a very important message!" />
|
||||||
|
</VerticalStackLayout>
|
||||||
|
|
||||||
|
</toolkit:Popup>
|
@ -0,0 +1,11 @@
|
|||||||
|
using CommunityToolkit.Maui.Views;
|
||||||
|
|
||||||
|
namespace PocketBook;
|
||||||
|
|
||||||
|
public partial class AddBook : Popup
|
||||||
|
{
|
||||||
|
public AddBook()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
@ -1,9 +1,14 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
x:Class="PocketBook.BookChange">
|
x:Class="PocketBook.BookChange"
|
||||||
<StackLayout Orientation="Horizontal" Margin="10,15,0,15">
|
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit">
|
||||||
<Image x:Name="imageName" WidthRequest="30" HeightRequest="30" />
|
<StackLayout Orientation="Horizontal" Margin="10,15,0,15">
|
||||||
<Label x:Name="propertyName" TextColor="{StaticResource Primary}" FontAttributes="Bold" VerticalOptions="Center" Margin="15,0,0,0"/>
|
<Image x:Name="imageName" WidthRequest="30" HeightRequest="30">
|
||||||
|
<Image.Behaviors>
|
||||||
|
<toolkit:IconTintColorBehavior TintColor="{StaticResource Primary}"/>
|
||||||
|
</Image.Behaviors>
|
||||||
|
</Image>
|
||||||
|
<Label x:Name="propertyName" TextColor="{StaticResource Primary}" FontAttributes="Bold" VerticalOptions="Center" Margin="15,0,0,0"/>
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
</ContentView>
|
</ContentView>
|
||||||
|
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 6.4 KiB |
After Width: | Height: | Size: 2.3 KiB |
@ -1,60 +1,68 @@
|
|||||||
namespace PocketBook;
|
using CommunityToolkit.Maui.Views;
|
||||||
|
|
||||||
public partial class Book
|
namespace PocketBook;
|
||||||
{
|
|
||||||
public string name { get; set; }
|
public partial class Book
|
||||||
public string type { get; set; }
|
{
|
||||||
public string auteur { get; set; }
|
public string name { get; set; }
|
||||||
public string image { get; set; }
|
public string type { get; set; }
|
||||||
|
public string auteur { get; set; }
|
||||||
public Book(string name, string type,string auteur)
|
public string image { get; set; }
|
||||||
{
|
|
||||||
this.name = name;
|
public Book(string name, string type,string auteur)
|
||||||
this.auteur = auteur;
|
{
|
||||||
this.type = type;
|
this.name = name;
|
||||||
}
|
this.auteur = auteur;
|
||||||
}
|
this.type = type;
|
||||||
|
}
|
||||||
public partial class Auteur
|
}
|
||||||
{
|
|
||||||
public string name { get; set; }
|
public partial class Auteur
|
||||||
public List<Book> books { get; set; }
|
{
|
||||||
|
public string name { get; set; }
|
||||||
public Auteur(string name)
|
public List<Book> books { get; set; }
|
||||||
{
|
|
||||||
this.name = name;
|
public Auteur(string name)
|
||||||
books = new List<Book>
|
{
|
||||||
{
|
this.name = name;
|
||||||
new Book("Buveur d'encre", "En lecture", name),
|
books = new List<Book>
|
||||||
new Book("Harry Potter et la pierre philosophale", "Non lu",name),
|
{
|
||||||
new Book("Le Seigneur des anneaux", "En lecture", name),
|
new Book("Buveur d'encre", "En lecture", name),
|
||||||
new Book("1984", "Terminé", name),
|
new Book("Harry Potter et la pierre philosophale", "Non lu",name),
|
||||||
new Book("Le Petit Prince", "Non lu", name)
|
new Book("Le Seigneur des anneaux", "En lecture", name),
|
||||||
};
|
new Book("1984", "Terminé", name),
|
||||||
}
|
new Book("Le Petit Prince", "Non lu", name)
|
||||||
}
|
};
|
||||||
|
}
|
||||||
public partial class TousPage : ContentPage
|
}
|
||||||
{
|
|
||||||
public List<Auteur> mesAuteurs { get; set; }
|
public partial class TousPage : ContentPage
|
||||||
public List<Book> books { get; set; }
|
{
|
||||||
|
public List<Auteur> mesAuteurs { get; set; }
|
||||||
public TousPage()
|
public List<Book> books { get; set; }
|
||||||
{
|
|
||||||
mesAuteurs = new List<Auteur>
|
public bool clicked=false;
|
||||||
{
|
|
||||||
new Auteur("J.K. Rowling"),
|
public TousPage()
|
||||||
new Auteur("J.R.R. Tolkien")
|
{
|
||||||
};
|
mesAuteurs = new List<Auteur>
|
||||||
InitializeComponent();
|
{
|
||||||
BindingContext=this;
|
new Auteur("J.K. Rowling"),
|
||||||
}
|
new Auteur("J.R.R. Tolkien")
|
||||||
public async void OnCollectionViewSelectionChanged(object sender, SelectionChangedEventArgs e)
|
};
|
||||||
{
|
InitializeComponent();
|
||||||
if (e.CurrentSelection.FirstOrDefault() is Book livreSelectionne)
|
BindingContext=this;
|
||||||
{
|
}
|
||||||
await Navigation.PushAsync(new BookDetail(livreSelectionne));
|
public async void OnCollectionViewSelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
}
|
{
|
||||||
}
|
if (e.CurrentSelection.FirstOrDefault() is Book livreSelectionne)
|
||||||
|
{
|
||||||
|
await Navigation.PushAsync(new BookDetail(livreSelectionne));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnImageButtonClicked(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var popup = new AddBook();
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in new issue