I have an XamTree to which I add the XamTreeItems in code (not Databinding). I have found that the property xamTreeItem.XamTree doesn't get set when I add an item. So, for all the items the XamTree property remains null.
Later sometimes when I Insert a new item the XamTree property of that item does get set.
I had expected that the XamTree property would always reference the XamTree that the XamTreeItem is a child of.
Is that not the intent? What am I missing?
It would be nice to be able to do something like the following:
xamTreeItem.XamTree.ActiveItem = xamTreeItem;
Hello,
I followed the steps you suggested and was unable to reproduce the behavior you're describing. I created a XamTree with the XamTreeItems. I implemented code to set the active node using xamTreeItem.XamTree.ActiveItem = xamTreeItem whenever a node is collapsed / expanded. The XamTree property was set on the XamTreeNode as expected.
I have attached the sample project I used to test this. Please test this project on your PC; whether or not it works correctly may help indicate the nature of this problem.
If the project does not work correctly, this indicates either a problem possibly specific to your environment, or a difference in the DLL versions we are using. My test was performed using version 11.1.20111.1004 in NetAdvantage for Silverlight 2011 Volume 1.
If the project does show the product feature working correctly, this indicates a possible problem in the code of your application. It will help if you can provide a small, isolated sample application that demonstrates the behavior you are seeing.
Or, if this sample project is not an accurate demonstration of what you're trying to do, please feel free to modify it and send it back, or send a small sample project of your own if you have one.
Please let me know if I can provide any further assistance.
Sincerely,
Valerie
Developer Support Engineer
Infragistics
www.infragistics.com/support
Hello Valerie,
One difference is I'm building my tree in code, such as:
tree.Items.Add(treeitem);treeitem.Items.Add(newTreeItem);
Another differnce is I'm still on Infragistics v10.3. But, I buildt your example using v10.3 and everything was fine.
I have a work around by creating a method to walk up the XamTreeItems using the Parent property until I find and return the XamTree.
Unfortunately, I don't have time right now to work on a simple app to demonstrate my problem. So, I'll have to pursue this at a later time.
Thank ;you for your efforts and if you come up with any other ideas, please let me know.
Thank you very much!
Joe