ComponentOne Word for WPF
C1.WPF.Word.4.5.2 Assembly / C1.WPF.Word Namespace / C1WordDocument Class / MeasureString Method / MeasureString(String,Font,Double,StringFormat) Method
The drawing string.
The drawing font.
The drawing width or -1 for default.
The drawing string format.

In This Topic
    MeasureString(String,Font,Double,StringFormat) Method
    In This Topic
    Measure string for this document.
    Syntax
    'Declaration
     
    Public Overloads Shared Function MeasureString( _
       ByVal text As String, _
       ByVal font As Font, _
       ByVal width As Double, _
       ByVal sf As StringFormat _
    ) As Size
    public static Size MeasureString( 
       string text,
       Font font,
       double width,
       StringFormat sf
    )

    Parameters

    text
    The drawing string.
    font
    The drawing font.
    width
    The drawing width or -1 for default.
    sf
    The drawing string format.

    Return Value

    The size, in points, of the string specified as drawn with the font parameter.
    See Also