Add a Icone in New Node

2 posts, 0 answers
  1. Nelson
    Nelson avatar
    62 posts
    Member since:
    Apr 2011

    Posted 28 Jun 2011 Link to this post

    Hello,

    I want add an icone for each node of my RadTreeView.

    I populate my tree using hierarchical template from one Observable collection.

    Someone can explain me or direct me for the best way to do that?
  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 01 Jul 2011 Link to this post

    Hi Nelson,

    You can have an Image in the HierarchicalDataTemplate if you want items from one level to have common Image. This approach is realized in the attached solution. If you want to have different images on every RadTreeViewItem, you can introduce an Uri property in your ViewModel pointing to an Image and bind it to the DefaultImageSrc property of the RadTreeViewItem via ContainerBindings. Please let us know if this helped you.

    All the best,
    Petar Mladenov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
Back to Top