private void AddISBN(NewBook obj) { if (obj != null && ISBNs.LastOrDefault() != obj) { return; } var isbn = new NewBook(_isbns); isbn.PropertyChanged += (sender, args) => { if (args.PropertyName != nameof(IsValid)) { return; } OnPropertyChanged(nameof(IsValid)); }; ISBNs.Add(isbn); }
public NewBookDialog() { InitializeComponent(); DataContext = new NewBook(); }