DefaultImageSrc unbound TreeView

8 posts, 0 answers
  1. Paul Gallen
    Paul Gallen avatar
    156 posts
    Member since:
    Jun 2008

    Posted 18 May 2009 Link to this post

    Hi I have a unbound treeview. It is populated via Load on demand. I require a style that can set my DefaultImageSrc depending a set of curcumstances, some like

    <DataTrigger Binding="{Binding Path=IsFolder}" Value="True">  
                        <Setter Property="DefaultImageSrc" Value="../../folder.png" /> 
                    </DataTrigger> 
                    <DataTrigger Binding="{Binding Path=IsFolder}" Value="False">  
                        <Setter  Property="DefaultImageSrc" Value="../../diskdrive.png" /> 
                    </DataTrigger> 

    Can you give me an example

    Thanks


    P
  2. Tihomir Petkov
    Admin
    Tihomir Petkov avatar
    576 posts

    Posted 18 May 2009 Link to this post

    Hi Paul,

    Please take a look at the following page from the documentation:

    http://www.telerik.com/help/silverlight/radtreeview-item-images.html

    If that info does not help you, let me know.

    Sincerely yours,
    Tihomir Petkov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Paul Gallen
    Paul Gallen avatar
    156 posts
    Member since:
    Jun 2008

    Posted 18 May 2009 Link to this post

    Tihomir,

    Sorry, this does not help at all. treeviewitems are hard coded !!!


    P
  4. Tihomir Petkov
    Admin
    Tihomir Petkov avatar
    576 posts

    Posted 19 May 2009 Link to this post

    Hello Paul,

    I prepared a sample project for you to take a look at. Please let me know if it helps.

    Best wishes,
    Tihomir Petkov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  5. Paul Gallen
    Paul Gallen avatar
    156 posts
    Member since:
    Jun 2008

    Posted 19 May 2009 Link to this post

    Thanks for your efforts Tihomir ,

    Still is still not correct, you are still binding to your "Source", Like I mentioned earlier my treeview is not bound at all, It creates the treeviewitems manually


    P
  6. Tihomir Petkov
    Admin
    Tihomir Petkov avatar
    576 posts

    Posted 20 May 2009 Link to this post

    Hi Paul,

    Sorry for the misunderstanding but it seems I am missing something about your scenario. If you are adding manually your treeview items, I believe you should be able to pick the right image and set it in the time when you add the item to the tree. Is that not so? Please elaborate a bit more or send me a sample project which demonstrates the problem.

    Sincerely yours,
    Tihomir Petkov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  7. Paul Gallen
    Paul Gallen avatar
    156 posts
    Member since:
    Jun 2008

    Posted 20 May 2009 Link to this post

    Hi Tihomir

    I think you have answered my initial question (i think), I was hoping to use XAML to set my image for my nodes (style the treeview item) when the tree is in inbound mode. It looks like you cannot do that. I was setting the images in code. 

    Am I correct in assuming that you cannot style the treeviewitem when in unbound mode


    Thanks


    P
  8. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 22 May 2009 Link to this post

    Hi Paul Gallen,

    we researched the problem and there is a problem with the binding of this property. We provide you a fix next week with the latest internal build.

    All the best,
    Valentin.Stoychev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top