WPF TreeView递归异步绑定

上传者: qing2005 | 上传时间: 2019-12-21 18:52:39 | 文件大小: 162KB | 文件类型: rar
WPF的TreeView不像WinForms的TreeView那样,通过TreeNode实现树型节点。WPF的TreeView实现起来,我感觉有点像VM(View-Model)模式,就像WinForms中的DataGrid,控件负责显示,数据在DataTable中。那么我们在实现TreeView时,也需要用这样的思路,数据在Model中,控件是View负责显示。 我需要实现的最终目标是: 1.节点是异步加载的(解决效率问题) 2.节点是无限级别的(递归的,这样可复用与目录结构、组织架构等数据类型) 3.节点是可以多选的(用CheckBox选择) 4.XAML方式绑定(减少UI上Code量) 5.方便得获取选中项信息

文件下载

资源详情

[{"title":"( 52 个子文件 162KB ) WPF TreeView递归异步绑定","children":[{"title":"DepartmentTreeView","children":[{"title":"App.xaml <span style='color:#111;'> 329B </span>","children":null,"spread":false},{"title":"app.config <span style='color:#111;'> 439B </span>","children":null,"spread":false},{"title":"obj","children":[{"title":"x86","children":[{"title":"Debug","children":[{"title":"DepartmentTreeView.Properties.Resources.resources <span style='color:#111;'> 180B </span>","children":null,"spread":false},{"title":"DepartmentTreeView_MarkupCompile.i.lref <span style='color:#111;'> 85B </span>","children":null,"spread":false},{"title":"DepartmentTreeView.exe <span style='color:#111;'> 44.00KB </span>","children":null,"spread":false},{"title":"App.g.cs <span style='color:#111;'> 2.18KB </span>","children":null,"spread":false},{"title":"MainWindow.baml <span style='color:#111;'> 2.18KB </span>","children":null,"spread":false},{"title":"DepartmentTreeView_Content.g.i.cs <span style='color:#111;'> 521B </span>","children":null,"spread":false},{"title":"DepartmentTreeView.csproj.FileListAbsolute.txt <span style='color:#111;'> 1.75KB </span>","children":null,"spread":false},{"title":"MainWindow.g.cs <span style='color:#111;'> 4.08KB </span>","children":null,"spread":false},{"title":"DesignTimeResolveAssemblyReferencesInput.cache <span style='color:#111;'> 6.63KB </span>","children":null,"spread":false},{"title":"DepartmentTreeView_Content.g.cs <span style='color:#111;'> 521B </span>","children":null,"spread":false},{"title":"DepartmentTreeView.g.resources <span style='color:#111;'> 2.40KB </span>","children":null,"spread":false},{"title":"DepartmentTreeView.pdb <span style='color:#111;'> 103.50KB </span>","children":null,"spread":false},{"title":"GenerateResource.read.1.tlog <span style='color:#111;'> 166B </span>","children":null,"spread":false},{"title":"TempPE","children":[{"title":"DB.SampleDataSet.Designer.cs.dll <span style='color:#111;'> 31.50KB </span>","children":null,"spread":false},{"title":"Properties.Resources.Designer.cs.dll <span style='color:#111;'> 5.00KB </span>","children":null,"spread":false}],"spread":false},{"title":"App.g.i.cs <span style='color:#111;'> 2.18KB </span>","children":null,"spread":false},{"title":"GeneratedInternalTypeHelper.g.cs <span style='color:#111;'> 2.85KB </span>","children":null,"spread":false},{"title":"MainWindow.g.i.cs <span style='color:#111;'> 4.08KB </span>","children":null,"spread":false},{"title":"DepartmentTreeView_MarkupCompile.lref <span style='color:#111;'> 85B </span>","children":null,"spread":false},{"title":"GenerateResource.write.1.tlog <span style='color:#111;'> 404B </span>","children":null,"spread":false},{"title":"GeneratedInternalTypeHelper.g.i.cs <span style='color:#111;'> 2.85KB </span>","children":null,"spread":false},{"title":"DesignTimeResolveAssemblyReferences.cache <span style='color:#111;'> 15.40KB </span>","children":null,"spread":false},{"title":"DepartmentTreeView_MarkupCompile.cache <span style='color:#111;'> 315B </span>","children":null,"spread":false},{"title":"DepartmentTreeView_MarkupCompile.i.cache <span style='color:#111;'> 314B </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true},{"title":"bin","children":[{"title":"Release","children":null,"spread":false},{"title":"Debug","children":[{"title":"DepartmentTreeView.vshost.exe <span style='color:#111;'> 11.33KB </span>","children":null,"spread":false},{"title":"DepartmentTreeView.exe <span style='color:#111;'> 44.00KB </span>","children":null,"spread":false},{"title":"DepartmentTreeView.exe.config <span style='color:#111;'> 439B </span>","children":null,"spread":false},{"title":"DepartmentTreeView.pdb <span style='color:#111;'> 103.50KB </span>","children":null,"spread":false},{"title":"DB","children":[{"title":"Sample.mdb <span style='color:#111;'> 216.00KB </span>","children":null,"spread":false}],"spread":true},{"title":"DepartmentTreeView.vshost.exe.config <span style='color:#111;'> 439B </span>","children":null,"spread":false},{"title":"DepartmentTreeView.vshost.exe.manifest <span style='color:#111;'> 490B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"DepartmentTreeView.suo <span style='color:#111;'> 29.50KB </span>","children":null,"spread":false},{"title":"App.xaml.cs <span style='color:#111;'> 308B </span>","children":null,"spread":false},{"title":"DepartmentViewModel.cs <span style='color:#111;'> 5.96KB </span>","children":null,"spread":false},{"title":"MainWindow.xaml <span style='color:#111;'> 2.06KB </span>","children":null,"spread":false},{"title":"DepartmentTreeView.csproj.user <span style='color:#111;'> 227B </span>","children":null,"spread":false},{"title":"DepartmentTreeView.sln <span style='color:#111;'> 877B </span>","children":null,"spread":false},{"title":"DB","children":[{"title":"SampleDataSet.xsc <span style='color:#111;'> 3B </span>","children":null,"spread":false},{"title":"SampleDataSet.xsd <span style='color:#111;'> 10.20KB </span>","children":null,"spread":false},{"title":"SampleDataSet.xss <span style='color:#111;'> 3B </span>","children":null,"spread":false},{"title":"Sample.mdb <span style='color:#111;'> 236.00KB </span>","children":null,"spread":false},{"title":"SampleDataSet.Designer.cs <span style='color:#111;'> 81.49KB </span>","children":null,"spread":false},{"title":"DepartmentHelper.cs <span style='color:#111;'> 863B </span>","children":null,"spread":false}],"spread":true},{"title":"Properties","children":[{"title":"AssemblyInfo.cs <span style='color:#111;'> 2.15KB </span>","children":null,"spread":false},{"title":"Settings.Designer.cs <span style='color:#111;'> 1.71KB </span>","children":null,"spread":false},{"title":"Resources.resx <span style='color:#111;'> 5.48KB </span>","children":null,"spread":false},{"title":"Settings.settings <span style='color:#111;'> 1.03KB </span>","children":null,"spread":false},{"title":"Resources.Designer.cs <span style='color:#111;'> 2.73KB </span>","children":null,"spread":false}],"spread":true},{"title":"DepartmentTreeView.csproj <span style='color:#111;'> 5.09KB </span>","children":null,"spread":false},{"title":"MainWindow.xaml.cs <span style='color:#111;'> 1.52KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

  • chgsh_2008 :
    不错资源,感谢,好评!
    2019-03-26
  • vow1105 :
    不错,是我想要的,程序可以运行起来
    2017-10-27
  • NulangD :
    正在学习wpf中
    2017-09-25
  • 居然占用名 :
    非常规范的MVVM-TreeView演示示例。
    2017-06-22
  • toumingdehai :
    非常好的资源,就是MVVM结构貌似不太清晰
    2016-09-17

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明