Index: src/DeltaShell/DeltaShell.Gui/Forms/PropertyGridView/PropertyGridView.cs =================================================================== diff -u -r9f1efb36120427350936d48059c87c7e011657a9 -rb9c1426973c216d3dfd5c67664296be3f220825d --- src/DeltaShell/DeltaShell.Gui/Forms/PropertyGridView/PropertyGridView.cs (.../PropertyGridView.cs) (revision 9f1efb36120427350936d48059c87c7e011657a9) +++ src/DeltaShell/DeltaShell.Gui/Forms/PropertyGridView/PropertyGridView.cs (.../PropertyGridView.cs) (revision b9c1426973c216d3dfd5c67664296be3f220825d) @@ -2,6 +2,7 @@ using System.Collections; using System.Drawing; using System.Linq; +using System.Reflection; using System.Security.Permissions; using System.Windows.Forms; using DelftTools.Controls; @@ -31,6 +32,7 @@ public PropertyGridView(IGui gui) { HideTabsButton(); + FixDescriptionArea(); this.gui = gui; PropertySort = PropertySort.Categorized; @@ -81,14 +83,6 @@ base.Dispose(disposing); } - private void HideTabsButton() - { - // Removing "property tabs" button and separator before it - var strip = Controls.OfType().ToList()[0]; - strip.Items[3].Visible = false; - strip.Items[4].Visible = false; - } - private void GuiSelectionChanged(object sender, EventArgs e) { if (observable != null) @@ -144,7 +138,7 @@ { if (gui != null) { - PropertyResolver.GetObjectProperties(gui.Plugins.SelectMany(p => p.GetPropertyInfos()).ToList(), sourceData); + return PropertyResolver.GetObjectProperties(gui.Plugins.SelectMany(p => p.GetPropertyInfos()).ToList(), sourceData); } return null; @@ -235,5 +229,44 @@ } #endregion + + #region PropertyGrid tweaks + + /// + /// Removes the redundant "tabs" toolstrip button and its corresponding separator. + /// + private void HideTabsButton() + { + var strip = Controls.OfType().ToList()[0]; + + strip.Items[3].Visible = false; + strip.Items[4].Visible = false; + } + + /// + /// Ensures the description area is no longer auto-resizing. + /// + private void FixDescriptionArea() + { + foreach (var control in Controls) + { + var type = control.GetType(); + + if (type.Name == "DocComment") + { + var baseType = type.BaseType; + if (baseType != null) + { + var field = baseType.GetField("userSized", BindingFlags.Instance | BindingFlags.NonPublic); + if (field != null) + { + field.SetValue(control, true); + } + } + } + } + } + + #endregion } } \ No newline at end of file