Font.MeasureString Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Measures the specified string when drawn with the specified Font object and formatted with the specified StringFormat object.

Namespace:  Microsoft.WindowsMobile.DirectX.Direct3D
Assembly:  Microsoft.WindowsMobile.DirectX (in Microsoft.WindowsMobile.DirectX.dll)

Syntax

'Declaration
Public Function MeasureString ( _
    sprite As Sprite, _
    value As String, _
    ByRef rectangle As Rectangle, _
    format As DrawTextFormat _
) As Rectangle
'Usage
Dim instance As Font
Dim sprite As Sprite
Dim value As String
Dim rectangle As Rectangle
Dim format As DrawTextFormat
Dim returnValue As Rectangle

returnValue = instance.MeasureString(sprite, _
    value, rectangle, format)
public Rectangle MeasureString(
    Sprite sprite,
    string value,
    ref Rectangle rectangle,
    DrawTextFormat format
)
public:
Rectangle MeasureString(
    Sprite^ sprite, 
    String^ value, 
    Rectangle% rectangle, 
    DrawTextFormat format
)
member MeasureString : 
        sprite:Sprite * 
        value:string * 
        rectangle:Rectangle byref * 
        format:DrawTextFormat -> Rectangle 

Parameters

  • rectangle
    Type: System.Drawing.Rectangle%
    A reference to a Rectangle structure that contains the rectangle, in logical coordinates, in which the text is being formatted.

Return Value

Type: System.Drawing.Rectangle
A Rectangle.

.NET Framework Security

Platforms

Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Compact Framework

Supported in: 3.5, 2.0

See Also

Reference

Font Class

Font Members

Microsoft.WindowsMobile.DirectX.Direct3D Namespace