开发者

Wpf Tree View Searching

开发者 https://www.devze.com 2022-12-27 15:28 出处:网络
How do i search for a node in very large treeview , i am using on-demand loadi开发者_JAVA技巧ng of nodes?Your question is a little light on details. For example, I would be curious to know if this is

How do i search for a node in very large treeview , i am using on-demand loadi开发者_JAVA技巧ng of nodes?


Your question is a little light on details. For example, I would be curious to know if this is a user-specified search and what the search criteria would look like. In any case, I'll take a stab at giving you a general answer to your general question:

WPF makes it easier than ever to base the view on a data model structure of your own choosing, rather than the other way around.

I would suggest creating an object model that represents the underlying data (you may have this already) and "bind" it to the tree view via data templates (specifically the HierarchicalDataTemplate). Define your search in terms of the data structure, not the view.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号