From this article you can learn how to resize description area in PropertyGrid. Example shows use of reflection in order to dig to private members of PropertyGrid - not accessible in normal way.
Implementation is available both in C# and VB.Net languages. Use buttons below to switch language visibility.
Implementation
System.Reflection namespace needs to be put in usings.
privatestaticvoid ChangeDescriptionHeight(PropertyGrid grid, int height){if(grid ==null)thrownew ArgumentNullException("grid");foreach(Control control in grid.Controls)if(control.GetType().Name=="DocComment"){
FieldInfo fieldInfo = control.GetType().BaseType.GetField("userSized",
BindingFlags.Instance|
BindingFlags.NonPublic);
fieldInfo.SetValue(control, true);
control.Height= height;return;}}
PrivateSharedSub ChangeDescriptionHeight(grid As PropertyGrid, height AsInteger)If grid IsNothingThenThrowNew ArgumentNullException("grid")EndIfForEach control As Control In grid.ControlsIf control.[GetType]().Name="DocComment"ThenDim fieldInfo As FieldInfo = control.[GetType]().BaseType.GetField("userSized",
BindingFlags.Instance Or BindingFlags.NonPublic)
fieldInfo.SetValue(control, True)
control.Height= height
ReturnEndIfNextEndSub
We would like to cover the costs of maintaining the server for longer than a year.
We would like to extend our development environment with some commercial products.
We would like to get rid of the ads from our site.
We would like to take over Karmian.com in order to unify Karmian.
But most of all - we want to provide more free solutions, therefore consider pressing the button below as the absolute expression of your own will and... mood. ;)