From 4651aca48eb34b8228fba2d8f5b6d20d3d181dc4 Mon Sep 17 00:00:00 2001 From: Matheo HERSAN Date: Fri, 2 Jun 2023 17:54:23 +0200 Subject: [PATCH] Enhancement searchBar but does not work --- MangaMap/Model/Manager.cs | 26 ++++++++++++++++++++++++-- MangaMap/Views/homePage.xaml | 17 ++++++++++------- MangaMap/Views/homePage.xaml.cs | 16 +++++++++++++++- 3 files changed, 49 insertions(+), 10 deletions(-) diff --git a/MangaMap/Model/Manager.cs b/MangaMap/Model/Manager.cs index ec68176..614fe62 100644 --- a/MangaMap/Model/Manager.cs +++ b/MangaMap/Model/Manager.cs @@ -1,19 +1,41 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; +using System.ComponentModel; using System.Linq; +using System.Runtime.CompilerServices; using System.Text; using System.Threading.Tasks; +using MangaMap.DataBinding; using MangaMap.Stub; namespace MangaMap.Model { - public class Manager + public class Manager : System.ComponentModel.INotifyPropertyChanged { + public event PropertyChangedEventHandler? PropertyChanged; + + void OnPropertyChanged([CallerMemberName] string propertyName = null) + => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); + public IPersistanceManager Persistance { get; set; } public List Admins { get; private set; } public List Utilisateurs { get; private set; } - public ObservableCollection Oeuvres { get; private set; } + + private ObservableCollection oeuvres; + + public ObservableCollection Oeuvres + { + get + { + return oeuvres; + } + set + { + oeuvres = value; + OnPropertyChanged(); + } + } public Utilisateur UtilisateurActuel { get; set; } public bool isAdmin { get; set; } diff --git a/MangaMap/Views/homePage.xaml b/MangaMap/Views/homePage.xaml index ab9de2e..b97f4b1 100644 --- a/MangaMap/Views/homePage.xaml +++ b/MangaMap/Views/homePage.xaml @@ -20,12 +20,13 @@ - - + @@ -62,6 +63,8 @@ + +