如何使用复选框控制文件浏览器Treeview? [英] How can I control the filebrowser Treeview with checkbox?

查看:48
本文介绍了如何使用复选框控制文件浏览器Treeview?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图发送checked treeviewitem的值。但我发现在树视图中控制复选框真的很难。如何获得check treeviewitem的值?

I tried to send the value of checked treeviewitem. but I found that It's really hard to control the checkboxes in the treeview. How can i get the value of the check treeviewitem?

推荐答案

< window.resources>

< datatemplate x:key = importantTaskTemplatexmlns:x =#unknown>

< checkbox ischecked ={Binding PropertyChk}>



< br $>


< treeview x:name =LeftTreemargin =8,0,6,0foreground =#FFFFFFFFselecteditemchanged =LeftTree_SelectedItemChangedxmlns:x = #未知 >

< treeview.background> < lineargradientbrush endpoint =0.5,1startpoint =0.5,0> < gradientstop color =#FFFFFFFFoffset =1>

< gradientstop color =#FF5EBEDEoffset =0>






<window.resources>
<datatemplate x:key="importantTaskTemplate" xmlns:x="#unknown">
<checkbox ischecked="{Binding PropertyChk }">



<treeview x:name="LeftTree" margin="8,0,6,0" foreground="#FFFFFFFF" selecteditemchanged="LeftTree_SelectedItemChanged" xmlns:x="#unknown">
<treeview.background> <lineargradientbrush endpoint="0.5,1" startpoint="0.5,0"> <gradientstop color="#FFFFFFFF" offset="1">
<gradientstop color="#FF5EBEDE" offset="0">




使用WPF TreeView中的复选框 [ ^ ]



浏览此链接
Working with Checkboxes in the WPF TreeView[^]

Go Through this link


这篇关于如何使用复选框控制文件浏览器Treeview?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆