How to enable re-sizing columns of a TreeListView?

Grids for WPF Forum

Posted 11 years ago by Andras Eles
Version: 13.2.0590
Avatar

Hi,

Our application has a Messages window where the result of various operations are listed. We would like to make the list a bit more digestible by organising the entries in a hierarchical manner. For that purpose I started to play with your TreeListView class. 

Unfortunately I couldn't get to set its columns re-sizeable. Setting the IsResizeable property to True on the TreeListViewColumns apparently has no effect.

What is the recommended way to achieve this?

Thanks in advance. 

Comments (3)

Posted 11 years ago by Andras Eles
Avatar

We figured out that setting the ScrollViewer.HorizontalScrollBarVisibility property to Disabled on the TreeListView will allow the re-sizing of columns.

Posted 11 years ago by Phil Devaney
Avatar

A bit more informatin on this -  it looks like enabling the horizontal scrollbar causes double.Infinity to be passed to TreeListViewRowPresenterBase.MeasureOverride, which in turn causes CanResize to be set to false.

But there appears to be a more serious problem, when more than a few items are added to the control even a simple test app starts to behave sluggishly, the vertical scrollbar never gets enabled and the mouse hover highlighting is very jerky, and on a couple of occaisions I observed some of the cells "wobbling". I think WPF is getting stuck in some kind of infinite re-layout cycle. This also causes Snoop to stop working, which made tracking down the problem very tricky!

There is also a problem with the default control template for TreeListView. The header row presenter is inside the ScrollViewer, which means when you scroll vertically the column headers are also scrolled instead of staying fixed.

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Andras and Phil,

While the TreeListView control is a base for PropertyGrid, we never made TreeListView so that it would be publicly consumable.  We built it to support the PropertyGrid and have only tested it for that case. That is the reason we don't install it in the Visual Studio Toolbox or document it.

But, if you would like to send over a small sample project to our support address we can take a look to see if there is any quick fix for the issue you have.  Be sure to rename any .zip file extensions so they don't get spam blocked.


Actipro Software Support

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.