Show "Wait ..." message when extending TreeView in WPF

I have many elements in my TreeView, and the elements are also very complex. I do not want to use virtualization. The TreeView extension sometimes takes a lot of time. So, is there some kind of event like "IsTreeViewExpanding" or something like that, where I can show information like "TreeView is generated ... Please wait". How can I achieve something like this?

+3
source share
1 answer

Since WPF TreeView does not have a BeforeExpand event, you seem to need to hack the method OnExpanded()in TreeViewItem, as described in this MSDN forum post .

+2

Source: https://habr.com/ru/post/1773585/