Good day,
I am using a TreeViewAdv in a project and I need to set the selected value through C#. I can set the selection and find the TreeViewItemAdv that contains the object I am looking for through the use of
TreeViewItemAdv.ItemContainerGenerator.ContainerFromItem(o). Everything works fine if I accessed the node previously.
The problem I am encountering is that the TreeViewItemAdv does not seem to be created unless you accessed the node, event if the TreeViewAdv.IsVirtualizing is false. I also tried setting the TreeViewItemAdv.IsLoadOnDemand to false and in both cases, it does not solve the problem. I can move through the items fine, but when I try to get the container through the ContainerFromItem function, it returns null, as if the TreeViewItem had not been created.
Is this a bug, or is there another way to get at the TreeViewItemAdv?
Thank you for your time
Mathieu