ComponentOne PDF for WPF and Silverlight
DrawString(String,Font,Color,Rect) Method

C1.Silverlight.Pdf.5 Assembly > C1.Silverlight.Pdf Namespace > C1PdfDocument Class > DrawString Method : DrawString(String,Font,Color,Rect) Method
String to draw.
Font object that defines the appearance and size of the drawn text.
The object that defines the color of the drawn text.
The rectangle structure that specifies the location of the drawn text, in points from the top left corner of the page.
Draws the specified text string in the specified rectangle with the specified System.Windows.Media.Brush and Font objects.
Syntax
'Declaration
 
Public Overloads Function DrawString( _
   ByVal text As String, _
   ByVal font As Font, _
   ByVal brush As Color, _
   ByVal rc As Rect _
) As Integer
public int DrawString( 
   string text,
   Font font,
   Color brush,
   Rect rc
)

Parameters

text
String to draw.
font
Font object that defines the appearance and size of the drawn text.
brush
The object that defines the color of the drawn text.
rc
The rectangle structure that specifies the location of the drawn text, in points from the top left corner of the page.

Return Value

The index of first character that was not printed because it did not fit in the specified rectangle.
Remarks
This overload renders strings aligned to the top left corner of the specified rectangle, wrapping text as needed within the rectangle, without clipping, and in the horizontal direction. To change any of these defaults, use the overload that allows you to specify a StringFormat parameter.
See Also

Reference

C1PdfDocument Class
C1PdfDocument Members
Overload List