Hi,
I am currently trying to perform some acceptance testing on my usercontrols and one of the controls contains a xamDataTree. The control is correctly created and the view model correctly set to the DataContext and all the binding is correct. However the xamDataTree reports that its ItemsSource is null and therefore has no nodes. To my understanding this is due to the virtualization on the xamDataTree, to this end is there a way for me to switch it off? Or is there another solution?
Thanks
Hi Hagashen,
Thank you for your post. I have been looking into your scenario and I am not sure what exactly can make the ItemsSource be null. If you would like to turn off the virtualization of the XamDataTree, you could put the control in ScrollViewer.
Let me know, if you need any further assistance on this matter.
Thanks for the quick response it is very appreciated. I managed to solve the problem by showing the application window and then closing it :). I have another question though, is there a way for me to programmatically query if nodes are visible? So for example I expand a node I want to know that the children of that node are now visible programmatically.
Thank you for your reply. I have been looking into your new question and I am not sure whether you would like to understand that the node element is visible or it is in the view of your window.
Looking forward to hearing from you.
So what I am looking for is as follows:
Suppose I have a tree structure as:
-Parent
---- Child 1
---- Child 2
----- Child 2 Child 1
----- Child 2 Child 2
Now if the "Parent" node is collapsed then none of the "Child" level nodes are visible (that is what I want to know) subsequently if I programmatically expand "Parent" then "Child 1" and "Child 2" are visible (that is what I want to know) etc...
Is this possible?
Hello Hagashen,
I am just checking if you require any further assistance on the matter.