PDF for UWP | ComponentOne
C1.Xaml.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.

In This Topic
    MeasureString(String,Font,Double,StringFormat,Int32) Method
    In This Topic
    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