ComponentOne PDF for WPF and Silverlight
DrawImage(WriteableBitmap,Rect,ContentAlignment,Stretch) Method
Example 

C1.WPF.Pdf.4 Assembly > C1.WPF.Pdf Namespace > C1PdfDocument Class > DrawImage Method : DrawImage(WriteableBitmap,Rect,ContentAlignment,Stretch) Method
System.Windows.Media.Imaging.WriteableBitmap object to draw.
System.Windows.Rect structure that specifies the location of the drawn image, in points from the top left corner of the page.
ContentAlignment value that specifies how the image should be aligned within the rectangle.
System.Windows.Media.Stretch value that specifies how the image should be sized to fit the rectangle.
Draws the specified System.Windows.Media.Imaging.WriteableBitmap object at the specified location, adjusting the image size as specified by the align and stretch parameters.
Syntax
'Declaration
 
Public Overloads Sub DrawImage( _
   ByVal img As WriteableBitmap, _
   ByVal rc As Rect, _
   ByVal align As ContentAlignment, _
   ByVal stretch As Stretch _
) 

Parameters

img
System.Windows.Media.Imaging.WriteableBitmap object to draw.
rc
System.Windows.Rect structure that specifies the location of the drawn image, in points from the top left corner of the page.
align
ContentAlignment value that specifies how the image should be aligned within the rectangle.
stretch
System.Windows.Media.Stretch value that specifies how the image should be sized to fit the rectangle.
Example
The code below shows how you can use the DrawImage method can be used to render any System.Windows.UIElement. The code creates a System.Windows.Media.Imaging.WriteableBitmap from the element, then calls the DrawImage method:
void DrawImage(UIElement e, Rect rc, ContentAlignment align, ImageSizeMode mode)
{
  DrawImage(new WriteableBitmap(e, null), rc, align, mode);
}
See Also

Reference

C1PdfDocument Class
C1PdfDocument Members
Overload List