How can I add a Icon to a tree view item:
I am using this code to add the nodes:
newNode = new Infragistics.Silverlight.Controls.XamWebTreeItem(); newNode.Header = location.LocationName; newNode.Name = location.LocationID.ToString(); treeNode.Items.Add(newNode);
newNode = new Infragistics.Silverlight.Controls.XamWebTreeItem();
newNode.Header = location.LocationName;
newNode.Name = location.LocationID.ToString();
treeNode.Items.Add(newNode);
as you can see I am adding the nodes programmatically, and I need to put a icon in the items.
Thanks in advance...
Hi,
You can use the ExpandedIcon and CollapsedIcon properties of the XamWebTreeItem to specify an icon next to the node.
Hope this helps.
-SteveZ
Everytime I try this I get a error "item does not fall between the expected range" or something like that...
I created a BimapImage resource in the control where I use the webtree and by code add this image to the ExpandedIcon... but that does not work...