Diagram::MinimumSize Property

 

Gets the minimum height and width of the diagram.

Namespace:   Microsoft.VisualStudio.Modeling.Diagrams
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0.dll)

public:
property SizeD MinimumSize {
	virtual SizeD get() override;
}

Property Value

Type: Microsoft.VisualStudio.Modeling.Diagrams::SizeD

The 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;
}
Return to top
Show: