using CommunityToolkit.Maui.Behaviors; using DataPersistence; using Model; using System.Diagnostics; namespace Views; public partial class MyProfil : ContentPage { public DataManager DataMgr => (App.Current as App).DataMgr; public User user => (App.Current as App).user; public User userBis {get; set; } public MyProfil() { userBis = new User(user); InitializeComponent(); BindingContext = this; } public void Validation_Click(object sender, EventArgs e) { if (String.IsNullOrEmpty(userBis.Name) || String.IsNullOrEmpty(userBis.Surname)){ return; } user.Name = userBis.Name; user.Surname = userBis.Surname; } }