使用VB.NET的Treeview中的(WPF)复选框 [英] (WPF) checkbox in treeview USING VB.NET

查看:83
本文介绍了使用VB.NET的Treeview中的(WPF)复选框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我需要在树形视图中选择随机的复选框,它们是
从数据库(SQL Server)中检索.

我的项目基于Windows,并且使用WPf.
我正在使用VB.net和SQL Server数据库.




任何人都可以帮助解决这个问题吗?

在此先感谢

问候

naveen ...:〜

Hi,


I need to select random checkboxes in a Tree view,which are
retrived from Database (SQL Server).

My project is windows based and using WPf.
Im using VB.net and sql server database.




Can anyone help on this issue ???

Thanks in advance

Regards

naveen...:~

推荐答案


为此,您可以使用实体中的属性,例如IsSelected,然后将复选框(在treeviewitem的数据模板中)的IsChecked属性绑定到该属性.
或从树视图项目中获取数据模板,可以使用ItemsContainerGenerator并设置IsChecked属性来获取它.
参见此链接 [
Hi,
For this you can either use a property in your entity,say IsSelected,and bind the checkbox''s(in the datatemplate of the treeviewitem) IsChecked property to it.
Or get the datatemplate from the treeview item,which can be obtained using the ItemsContainerGenerator and set the IsChecked property.
See this link[^]

Hope it helps :-D


这篇关于使用VB.NET的Treeview中的(WPF)复选框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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