Dynamicaly Changing the Image of expander of Treeview

4 posts, 0 answers
  1. Kiran Mandapati
    Kiran Mandapati avatar
    3 posts
    Member since:
    Feb 2010

    Posted 05 May 2011 Link to this post

    Hi,
    I am facing an issue while using the telerik treeview in below scenerio.
    the images of the expander has to be changed and it has to be dynamically chosen between two images based on the data is binded to it.
    when data is binded to the treeview, based on the boolean column, the nodes has to display different images, if this value is true it has to show one image and if it false it has to show another image.
    when the node has expanded, then the image of that noted should be rotated version of the image shown earlier (before expanding).
  2. Hristo
    Admin
    Hristo avatar
    352 posts

    Posted 09 May 2011 Link to this post

    Hi Kiran Mandapati,

    You could dynamically control the expander style and place an image inside the style in order to achieve your scenario. You could take a look at the following article which I thing should be of help: http://blogs.telerik.com/hristomilyakov/posts/11-01-17/controlling_treeview_s_expanderstyle_dynamically.aspx

    All the best,
    Hristo
    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. UI for WPF is Visual Studio 2017 Ready
  4. Kiran Mandapati
    Kiran Mandapati avatar
    3 posts
    Member since:
    Feb 2010

    Posted 10 May 2011 Link to this post

    Hi Hristo,

    we were using the telerik controls for WPF with version 2009.3.1314.35, in this version we could not found the property ExpanderStyle.
    is this property recently added or it exists in the version I am using as well. if it is recently added please suggest another method.
  5. Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1511 posts

    Posted 13 May 2011 Link to this post

    Hi Kiran,

    The ExpanderStyle property was added after the 2009.3.1314.35 release. As a workaround, instead of changing the expander style dynamically, you will have to change the style of the whole TreeViewItem.

    All the best,
    Kiril Stanoev
    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
Back to Top