摘要:
1.自定义类作为Source需实现INotifyPropertyChanged ,命名空间:System.ComponentModel 2.数据转换需实现接口:IValueConverter,要添加程序集引用PresentationFramework 3.数据验证要创建ValidationRule( 阅读全文
摘要:
一、自定义类作为源绑定到TextBlock 1.新建一个Student类 2.将Student的Name属性绑定到TextBlock 运行效果如下: 3.但此时的Name属性不具备通知Binding的能力,即当数据源(Stu的Name属性)发生变化时,Binding不能同时更新目标的中数据 添加一个 阅读全文