C1.WPF.Word.4.6.2 Assembly / C1.WPF.Word Namespace / C1WordDocument Class / DrawElement Method / DrawElement(FrameworkElement,Rect,ContentAlignment,Stretch) Method
System.Windows.FrameworkElement to render into the document.
The rectangle structure that specifies the location of the drawn element, in points from the top left corner of the page.
ContentAlignment value that specifies how the element should be aligned within the rectangle.
System.Windows.Media.Stretch value that specifies how the element should be sized to fit the rectangle.

In This Topic
DrawElement(FrameworkElement,Rect,ContentAlignment,Stretch) Method
In This Topic
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 DrawElement( _
   ByVal e As FrameworkElement, _
   ByVal rc As Rect, _
   ByVal align As ContentAlignment, _
   ByVal stretch As Stretch _
) 
 

Parameters

e
System.Windows.FrameworkElement to render into the document.
rc
The rectangle structure that specifies the location of the drawn element, in points from the top left corner of the page.
align
ContentAlignment value that specifies how the element should be aligned within the rectangle.
stretch
System.Windows.Media.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 System.Windows.FrameworkElement being rendered.

See Also