PDF for WinRT
DrawElement(FrameworkElement,Rect) Method


Windows.UI.Xaml.FrameworkElement to render into the document.
Windows.Foundation.Rect where the element will be rendered.
Draws a Windows.UI.Xaml.FrameworkElement into the document at a specified position.
Syntax
'Declaration
 
<DebuggerStepThroughAttribute()> 
<AsyncStateMachineAttribute(C1.Xaml.Pdf.C1PdfDocument+d__5)> 
Public Overloads Function DrawElement( _ 
   ByVal e As FrameworkElement, _ 
   ByVal rc As Rect _ 
) As Task
'Usage
 
Dim instance As C1PdfDocument
Dim e As FrameworkElement
Dim rc As Rect
Dim value As Task
 
value = instance.DrawElement(e, rc)
[DebuggerStepThrough()] 
[AsyncStateMachine(C1.Xaml.Pdf.C1PdfDocument+d__5)] 
public Task DrawElement( 
   FrameworkElement e, 
   Rect rc 
)

Parameters

e
Windows.UI.Xaml.FrameworkElement to render into the document.
rc
Windows.Foundation.Rect where the element will be rendered.
Remarks

This method uses a Windows.UI.Xaml.Media.VisualTreeHelper to render each of the primitives that compose the root element. It does not convert the element into a bitmap. As a result, the output is smaller and resolution independent; however, the result is not as faithful as a bitmap rendering. To render an element as a bitmaps, create a Windows.UI.Xaml.Media.Imaging.WriteableBitmap and pass it to the DrawImage(WriteableBitmap,Rect) method.

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 Windows.UI.Xaml.FrameworkElement being rendered.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

C1PdfDocument Class
C1PdfDocument Members
Overload List

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback