Quantcast
Channel: patterns & practices: Prism
Viewing all articles
Browse latest Browse all 1878

New Post: Attach "Expanded" command while using HierarchicalDataTemplate in TreeView

$
0
0
The answer lies above, either the custom behavior shown a few years ago, or could wire it up with the InvokeCommandAction that is now part of Prism 5. Put that on the root element of your HierarchicalDataTemplate using a RelativeSource binding to point to the parent TreeViewItem as the source, EventTrigger catching the Expanded event, Command property pointing to your ViewModel command handler through a binding, and use the TriggerParameterPath property or CommandParameter property to pass along the context of what node was expanded.

Viewing all articles
Browse latest Browse all 1878

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>