Adjust PropertyGrid Splitter programatically?

Grids for WPF Forum

Posted 12 years ago by Wes Cumberland - Barclays Capital
Version: 11.2.0550
I have property names that are long and property values that are short, so i'd like to have the splitter at about 75% to the right when I bring up the PropertyGrid.

So is there a way to programatically adjust the split of the property grid? I've looked in the documentation and this forum and found nothing, so I'm hoping that i'm not missing something simple.


Comments (2)

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Wes,

You can access the columns of the PropertyGrid using the Columns property. The name column will be the first entry, and the value column will be the second. You should be able to programmatically set the widths to "new GridLength(75.0, GridUnitType.Star)" and "new GridLength(25.0, GridUnitType.Star)", respectively.

Actipro Software Support

Posted 12 years ago by Wes Cumberland - Barclays Capital
I feel kind of silly for not realizing I could do that. Of course that worked perfectly. Thank you for the help!

[Modified at 02/01/2012 08:26 AM]
The latest build of this product (v24.1.2) 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.