Partilhar via


Diagram.MinimumSize Property

Gets the minimum height and width of the diagram.

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

Syntax

'Declaração
Public Overrides ReadOnly Property MinimumSize As SizeD
    Get
public override SizeD MinimumSize { get; }
public:
virtual property SizeD MinimumSize {
    SizeD get () override;
}
abstract MinimumSize : SizeD
override MinimumSize : SizeD
override function get MinimumSize () : SizeD

Property Value

Type: Microsoft.VisualStudio.Modeling.Diagrams.SizeD
The minimum height and width of the diagram.

Examples

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;
}

.NET Framework Security

See Also

Reference

Diagram Class

Microsoft.VisualStudio.Modeling.Diagrams Namespace