RadTreeView not resizing dynamically

2 posts, 1 answers
  1. Arthur
    Arthur avatar
    32 posts
    Member since:
    May 2012

    Posted 21 Aug 2013 Link to this post


    I have a RadTreeView bound to an observable collection. The width is specified as Auto so I would expect  that the tree view should resize dynamically.

    So what I am seeing is

    1) First set of data is bound, with an Items whose content is long. The treeview expands to an appropriate width.
    2) The data bound is changed so that all the items are a couple character. The treeview  is still the same width

    I would expect the width to change in conjunction with the size of the data bound


  2. Answer
    Tina Stancheva
    Tina Stancheva avatar
    3298 posts

    Posted 21 Aug 2013 Link to this post

    Hello Arthur,

    Can you check whether you've changed the default RadTreeView HorizontalAlignment property value? If you haven't, then it is Stretch, which means that the control will take up as much space as possible - actually it will take as much space as its container allows it to take.

    And in your case, even if you apply an Auto Width, as long as the HorizontalAlignment of the control is Stretch, the control will try to take all available space. Instead, if you set the HorizontalAlignment to Left, the control will take only as much space as it needs to display its children.

    Having the above information in mind, please try setting HorizontalAlignment to Left and get back to us if that doesn't help.

    Tina Stancheva
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. DevCraft banner
Back to Top