Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.ComponentModel;
- using System.Runtime.CompilerServices;
- namespace NonTrivialDataBindingDemoVS
- {
- /*
- * An abstract class that implements INotifyPropertyChanged.
- * Subclass BindableBase in your models or view models to make
- * them ready for nontrivial binding.
- */
- public abstract class BindableBase : INotifyPropertyChanged
- {
- public event PropertyChangedEventHandler PropertyChanged;
- void OnPropertyChanged([CallerMemberName] string propertyName = null)
- {
- var handler = PropertyChanged;
- if (handler != null)
- {
- handler(this, new PropertyChangedEventArgs(propertyName));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment