相关文章  
  • 浅谈如何利用BartPE创建PE工具盘
  • Windows Mobile 2003 Second Edition 中 ActiveSync 编程模型的增强功能
  • 你真的了解windows的自启动方式吗?
  • C# 中数组和类型转换的功能实现
  • C#中调用带回调函数和自定义结构体的DLL例程
  • 演练:在Excel中建立自定义菜单项
  • 定时检测邮件并且自动转发的例子
  • Internet Explorer 中编辑 OLE 嵌入文档
  • 教你通过 Emit 实现动态生成一个类
  • 如何才能在10046event自由漫步
  •   推荐  
      科普之友首页   专利     科普      动物      植物        天文   考古   前沿科技
     您现在的位置在:  首页 >>文献 >>培训

    在完成所有绑定后仍然有许多要进行的操作1


      我们希望能够直接将对象和对象的集合绑定到 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