Table of Contents

Method GetFormattedTextSize

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

GetFormattedTextSize(Font?)

Calculates the size of the formatted text based on the specified font.

public virtual SizeD GetFormattedTextSize(Font? font = null)

Parameters

font Font

The font to use for measuring the text. If null, the default label font for the normal visual state is used.

Returns

SizeD

A SizeD representing the width and height of the formatted text.

Remarks

This method measures the size of the text after applying any formatting. If no font is provided, the default font for the normal visual state is used.