Continue DataBinding
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
parent
f5f5c1fc86
commit
6e88c66e20
@ -1,18 +1,37 @@
|
||||
namespace MangaMap.Views;
|
||||
using Model;
|
||||
using System.ComponentModel;
|
||||
|
||||
public partial class ficheAnime : ContentPage
|
||||
public partial class ficheAnime : ContentPage, INotifyPropertyChanged
|
||||
{
|
||||
public Oeuvre AnimeModel { get; set; }
|
||||
private Oeuvre animeModel;
|
||||
public Oeuvre AnimeModel
|
||||
{
|
||||
get { return animeModel; }
|
||||
set
|
||||
{
|
||||
if (animeModel != value)
|
||||
{
|
||||
animeModel = value;
|
||||
OnPropertyChanged(nameof(AnimeModel));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public ficheAnime()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
// Exemple de création d'une instance de la classe Oeuvre
|
||||
List<string> genres = new List<string>() { "Action", "Aventure" };
|
||||
AnimeModel = new Oeuvre("Nom de l'oeuvre", genres, "Type de l'oeuvre", "Description de l'oeuvre", 5, 12, "Chemin/vers/l'affiche.png");
|
||||
AnimeModel = new Oeuvre("Evangelion", genres, "Type de l'oeuvre", "Description de l'oeuvre", 5, 12, "Chemin/vers/l'affiche.png");
|
||||
|
||||
InitializeComponent();
|
||||
|
||||
this.BindingContext = this;
|
||||
}
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
protected virtual void OnPropertyChanged(string propertyName)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
Loading…
Reference in new issue