摘要: 英文原文地址:Simplifying the WPF TreeView by Using the ViewModel Pattern作者:Josh Smith文中代码的下载地址:http://www.codeproject.com/KB/WPF/TreeViewWithViewModel/TreeViewWithViewModelDemo.zip好像需要登录才能下载,我放一个上来吧http://files.cnblogs.com/RMay/TreeViewWithViewModelDemo.zip译者按:WPF中对TreeView的操作同WinForm中有很大的不同。这篇文章讲述了如何用Vie 阅读全文
posted @ 2012-04-11 18:04 @张凯@ 阅读(1404) 评论(3) 推荐(0) 编辑
摘要: Dictionary<string, CustomeType>中的CustomeType是一个集合,将其绑定生成一棵树,树的第一层节点是Dictionary的Key,第二层是CustomeType集合,所有代码用XAML实现。代码如下:<TreeViewName="dictree"ItemsSource="{Binding}"><TreeView.Resources><HierarchicalDataTemplateItemsSource="{BindingValue}"DataType=&q 阅读全文
posted @ 2012-04-11 17:54 @张凯@ 阅读(529) 评论(0) 推荐(0) 编辑