I try to use XamTree in my app. The data for the XamTree is bound to ItemSource. After that, I need following kind of code to expand the tree:
foreach (var item in this.MyTreeview.XamTreeItems) { ((XamTreeItem)item).IsExpanded = true; }
With the codes, it needs to hookup async complete event. That is not what I want.
As the ItemSource could be dynamically and loaded by VM with async call with wcf-ria service. I want to everytime then Data for ItemSource loaded by VM, the the tree can be expanded automatically without code. Anyway to do it with some setting in Xaml?
Hello Benjamin,
I am just checking if you got this worked out or you still require any assistance or clarification on the matter.
Thank you for your post. I have been looking into it and I created a sample project for with the functionality you want. Basically I created a Style for the XamTreeItem and set the IsExpanded Property to true. This way every time when a tree item loads it will be expanded. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.