Dundas Chart for ASP.NET
MeasureString(String,Font,SizeF,StringFormat) Method
See Also  Send comments on this topic.
Dundas.Charting.WebControl.Svg Namespace > SvgChartGraphics Class > MeasureString Method : MeasureString(String,Font,SizeF,StringFormat) Method


text
String to measure.
font
Font object defines the text format of the string.
layoutArea
SizeF structure that specifies the maximum layout area for the text.
stringFormat
StringFormat object that represents formatting information, such as line spacing, for the string.
Measures the specified string when drawn with the specified Font object and formatted with the specified StringFormat object.

Syntax

Visual Basic (Declaration)  
Public Overloads Function MeasureString( _
   ByVal text As String, _
   ByVal font As Font, _
   ByVal layoutArea As SizeF, _
   ByVal stringFormat As StringFormat _
) As SizeF
Visual Basic (Usage) Copy Code
Dim instance As SvgChartGraphics
Dim text As String
Dim font As Font
Dim layoutArea As SizeF
Dim stringFormat As StringFormat
Dim value As SizeF
 
value = instance.MeasureString(text, font, layoutArea, stringFormat)
C#  
public SizeF MeasureString( 
   string text,
   Font font,
   SizeF layoutArea,
   StringFormat stringFormat
)

Parameters

text
String to measure.
font
Font object defines the text format of the string.
layoutArea
SizeF structure that specifies the maximum layout area for the text.
stringFormat
StringFormat object that represents formatting information, such as line spacing, for the string.

Return Value

This method returns a SizeF structure that represents the size, in pixels, of the string specified in the text parameter as drawn with the font parameter and the stringFormat parameter.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

Copyright © 2001 - 2009 Dundas Data Visualization, Inc. and others.