Draws the specified WriteableBitmap object at the specified location, adjusting the image size as specified by the align and stretch parameters.

Namespace:  C1.Silverlight.Pdf
Assembly:  C1.Silverlight.Pdf (in C1.Silverlight.Pdf.dll)

Syntax

C#
public void DrawElement(
	FrameworkElement e,
	Rect rc,
	ContentAlignment align,
	Stretch stretch
)
Visual Basic
Public Sub DrawElement ( _
	e As FrameworkElement, _
	rc As Rect, _
	align As ContentAlignment, _
	stretch As Stretch _
)

Parameters

e
Type: System.Windows..::..FrameworkElement
FrameworkElement to render into the document.
rc
Type: System.Windows..::..Rect
Rect structure that specifies the location of the drawn element, in points from the top left corner of the page.
align
Type: C1.Silverlight.Pdf..::..ContentAlignment
ContentAlignment value that specifies how the element should be aligned within the rectangle.
stretch
Type: System.Windows.Media..::..Stretch
Stretch value that specifies how the element should be sized to fit the rectangle.

Remarks

This method must be called from the main thread. Calling it from a background thread will raise a cross-thread exception when the method tries to access the properties of the FrameworkElement being rendered.

See Also