Column width

Grids for WPF Forum

Posted 8 years ago by Eli Obadia
Version: 11.1.0544
Avatar
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?

Thanks,
Eli

Comments (1)

Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
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 (v2018.1 build 0675) was released 14 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.