Column width

Grids for WPF Forum

Posted 13 years ago by Eli Obadia
Version: 11.1.0544
The property grid has 2 columns, the left one for the property names and the right one for the values. I get both with the same width, how can I change these witdhs? is there anyway of having the width of the left column "autosized" meaning that automatically the left column will have the minimum width that allows to see all the property names?


Comments (1)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Eli,

The columns are defined in the PropertyGrid.Columns collection, but the auto-sizing is not currently supported. You can explicitly set higher or lower percetange based sizes or fixed sizes as needed though. For example, to make the name column smaller you could do:
if (this.propGrid.Columns.Count != 0)
    this.propGrid.Columns[0].Width = new GridLength(0.5, GridUnitType.Star);

Actipro Software Support

The latest build of this product (v24.1.2) was released 26 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.