BaseControl.CalcBestSize() Method

Calculates the minimum size sufficient to fit the content.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v20.1.dll

Declaration

public virtual Size CalcBestSize()
Public Overridable Function CalcBestSize As Size

Returns

Type Description
Size

A Size structure that specifies the minimum size sufficient to fit the content.

Remarks

The CalcBestSize method returns the minimum size including paddings that is sufficient to fit the content. If you create the control in code, use this method to ensure that the content is completely visible.

See Also