RegisterAttached 两种绑定方式

  1. RegisterAttached 含义:使用指定的属性名称、属性类型和所有者类型注册附加属性
  2. 绑定方式:C#绑定、WPF绑定
  3. 例:需求DataViewModel为DataView的VM层,在DataViewModel中有ID属性,DataView需要根据ViewModel中的ID变化处理问题

 public class DataViewModel : INotifyPropertyChanged{public event PropertyChangedEventHandler PropertyChanged;public void OnPorpertyChanged(string name){if (PropertyChanged != null)

本文链接:https://my.lmcjl.com/post/19349.html

展开阅读全文

4 评论

留下您的评论.