PocketPlanner Programmer's Guide

GraphicsEx.MeasureString Method

See Also

Measures the extent of the string in the specified font.

Namespace: MindFusion.Drawing
Assembly: PocketPlanner

 Syntax

C#

public Size MeasureString (
    string text,
    Font font
)

Visual Basic

Public Function MeasureString ( _
    text As String, _
    font As Font _
) As Size

 Parameters

text
The string to measure.
font
A .NET Font object that defines the style and the size of the font applied to the string.

 Return Value

A .NET Size structure that represents the size, in pixels, of the string specified by the text parameter as drawn with the font parameter.

 See Also