|
|
|
|
|
|
|
|
我们希望能够直接将对象和对象的集合绑定到 Avalon UI 元素。作为一个示例,以下代码显示了我们用于探究绑定在 Avalon 中数据的 Person 类。 class Person : IPropertyChange { public event PropertyChangedEventHandler PropertyChanged; void FirePropertyChanged(string propertyName) { if( this.PropertyChanged != null ) { PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } string name; public string Name { get { return this.name; } set { this.name = value; FirePropertyChanged("Name"); } } int age; public int Age { get { return this.age; } set { this.age = value; FirePropertyChanged("Age"); } } ... } IPropertyChange 页码:[1] [2] [3] [4] [5] [6] [7] [8] 第1页、共8页 |
|
|
|
|
设为首页 | 加入收藏 | 广告服务 | 友情链接 | 版权申明
Copyriht 2007 - 2008 © 科普之友 All right reserved |