Show “Please wait..” message when expanding TreeView in WPF

不问归期 提交于 2019-12-12 13:39:59

问题


I have a lots of items in my TreeView and items are also very complex. I don't want to use virtualization. Expanding TreeView sometimes takes a lot of time. So therefore, is there any event like: "IsTreeViewExpanding" or something like that where I can show information like "TreeView is being generated...Please wait". How can I achieve something like that?


回答1:


Since WPF's TreeView has no BeforeExpand event, you seem to have to hack into the OnExpanded() method on the TreeViewItem, as detailed in this MSDN forum post.



来源:https://stackoverflow.com/questions/4122301/show-please-wait-message-when-expanding-treeview-in-wpf

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!