摘要: WPF里分三种Binding:Binding, PriorityBinding, MultiBinding,这三种Binding的基类都是BindingBase,而BindingBase又继承于MarkupExtensionBinding提供对绑定定义的高级别访问,绑定将绑定目标对象(通常为 WPF 元素)的属性与任何数据源(例如数据库、XML 文件或包含数据的任何对象)连接起来。常见的使用Binding的代码:C#Binding binding = new Binding();// Set source objectbinding.Source = treeView;// Set sourc 阅读全文
posted @ 2012-03-28 19:38 JunBird 阅读(2391) 评论(0) 推荐(0) 编辑
摘要: <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="/SLDynamicThemes2;component/Assets/Themes/AccentColor/CoreStyles.xaml" /> <ResourceDictionary Source="/SLDynamicThemes2;component/Assets/Themes/AccentColor/SDKStyles.xaml" /> <ResourceDiction 阅读全文
posted @ 2012-03-28 19:30 JunBird 阅读(1104) 评论(0) 推荐(0) 编辑
摘要: 数据绑定使用了ObservableCollection<T> 类来实现,ViewModel通过继承GalaSoft.MvvmLight.ViewModelBase类来实现,Command使用GalaSoft.MvvmLight.Command.RelayCommand<T>来实现。ObservableCollection<T>表示一个动态数据集合,在添加项、移除项或刷新整个列表时,此集合将提供通知。客户列表绑定客户的名字、QQ、地址信息,单击的时候显示客户的全部详细信息。View层<phone:PhoneApplicationPagexmlns=&qu 阅读全文
posted @ 2012-03-28 10:56 JunBird 阅读(284) 评论(0) 推荐(0) 编辑