Adjust PropertyGrid Splitter programatically?

Grids for WPF Forum

Posted 7 years ago by Wes Cumberland - Barclays Capital
Version: 11.2.0550
Avatar
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.

Thanks!
--Wes

Comments (2)

Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
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 7 years ago by Wes Cumberland - Barclays Capital
Avatar
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 (v2019.1 build 0681) was released 9 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.