ComponentOne PDF for WPF and Silverlight
MeasureString(String,Font,Double,StringFormat,Int32) Method

C1.WPF.Pdf.4 Assembly > C1.WPF.Pdf Namespace > C1PdfDocument Class > MeasureString Method : MeasureString(String,Font,Double,StringFormat,Int32) Method
String to measure.
Font object that defines the appearance and size of the text.
Maximum width of the string.
A StringFormat object that determines whether word wrapping is allowed.
Measures the specified string when drawn with the specified Font object and formatted with the specified StringFormat object.
Syntax
'Declaration
 
Public Overloads Function MeasureString( _
   ByVal text As String, _
   ByVal font As Font, _
   ByVal width As Double, _
   ByVal sf As StringFormat, _
   Optional ByVal firstChar As Integer _
) As Size
public Size MeasureString( 
   string text,
   Font font,
   double width,
   StringFormat sf,
   int firstChar
)

Parameters

text
String to measure.
font
Font object that defines the appearance and size of the text.
width
Maximum width of the string.
sf
A StringFormat object that determines whether word wrapping is allowed.
firstChar

Return Value

The size of the string expressed in points.
See Also

Reference

C1PdfDocument Class
C1PdfDocument Members
Overload List