A customer using the XamDataTree recently asked how to display an image in a node only when it is selected. I'd like to share the sample (see below) which was used to demonstrate this functionality, in the hope that this is helpful for others using the XamDataTree.
In the attached sample, the "Box" nodes on the second level of the heirarchy have their icon visible only when selected. The core logic is contained in the custom method called "SetIconsVisibility" in the code behind, which includes some explanatory comments.