问题
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