Diagram::MinimumSize Property
Visual Studio 2015
Gets the minimum height and width of the diagram.
Assembly: Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0.dll)
Property Value
Type: Microsoft.VisualStudio.Modeling.Diagrams::SizeDThe minimum height and width of the diagram.
private void ResetFormSize() { Size buttonSize = _buttons.Size; Size largestForm = GetLargestBounds(); int width = (buttonSize.Width > largestForm.Width) ? buttonSize.Width : largestForm.Width; _groupBox.Size = new Size(width, largestForm.Height); this.MinimumSize = new Size(width, largestForm.Height + buttonSize.Height); this.Size = this.MinimumSize; }
Show: