INotifyPropertyChanged(监听数据),当数据改变时调用

public class BaseViewModel : INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;
        public void OnPropertyChanged(string propertyName) {
            if (PropertyChanged!=null)
            {
                this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }

posted @ 2017-08-28 11:30  多1份努力~  阅读(385)  评论(0编辑  收藏  举报