使用binding绑定自定义类 自动更新 set属性加OnPropertyChanged


    public class ReceptionPatientData :
    {
        //备注
        private string memo;
        //会计备注
        private string accountMemo;
        //当前患者数量
        private string patientCount;



        //备注
        public string Memo
        {
            get
            {
                return memo;
            }
            set
            {
                memo = value;

                OnPropertyChanged("Memo");
            }
        }
        //会计备注
        public string AccountMemo
        {
            get
            {
                return accountMemo;
            }
            set
            {
                accountMemo = value;

                OnPropertyChanged("accountMemo");
            }
        }
        //当前患者数量
        public string PatientCount
        {
            get
            {
                return patientCount;
            }
            set
            {
                patientCount = value;

                OnPropertyChanged("PatientCount");
            }
        }
    }
展开阅读全文

没有更多推荐了,返回首页