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