Код: Выделить всё
Код: Выделить всё
public AppointmentPendingResponse(BookingViewModel viewModel): base(viewModel)
{
InitializeComponent();
BindingContext = viewModel;
}
Код: Выделить всё
public partial class BookingViewModel : BaseViewModel
Код: Выделить всё
public abstract partial class BaseViewModel : ObservableObject, IQueryAttributable, INotifyPropertyChanged
Код: Выделить всё
public event PropertyChangedEventHandler PropertyChanged;
protected bool SetProperty(ref T backingStore, T value,
[CallerMemberName] string propertyName = "",
Action onChanged = null)
{
if (EqualityComparer.Default.Equals(backingStore, value))
return false;
backingStore = value;
onChanged?.Invoke();
OnPropertyChanged(propertyName);
return true;
}
protected void OnPropertyChanged([CallerMemberName] string propertyName = "")
{
var changed = PropertyChanged;
if (changed == null)
return;
changed.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
Код: Выделить всё
CurrentBooking = (BookingModel)selected;
Код: Выделить всё
{\"FullName\":\"LAWMAN\",\"IdentityNo\":\"123\",\"Relation\":\"SELF\"}
Изменить: хорошо, я изменил модель бронирования (тип объекта CurrentBooking), чтобы реализовать ObservableObject:
Код: Выделить всё
public partial class BookingModel: ObservableObject
{
[ObservableProperty] private string _FullName;
Редактировать 2: @klaus-gütter да, вот изображение:

Подробнее здесь: https://stackoverflow.com/questions/783 ... -displayed