Render Method
Collapse the table of content
Expand the table of content

WriteableBitmap.Render Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Renders an element within the bitmap.

Namespace:  System.Windows.Media.Imaging
Assembly:  System.Windows (in System.Windows.dll)

public void Render(
	UIElement element,
	Transform transform


Type: System.Windows.UIElement
The element to be rendered within the bitmap.
Type: System.Windows.Media.Transform
The transform to apply to the element before drawing into the bitmap. If an empty transform is supplied, the bits representing the element show up at the same offset as if they were placed within their parent.


element is null.

After calling this method, you must call Invalidate in order to render the bitmap.

This method does support UIElement objects that are not part of the visual tree. You are required to call Measure and Arrange for UIElement objects that are not in the visual tree, before calling Render.

If the element is larger than the size of the bitmap, or if the element has any points in the negative regions of its own space, it is clipped as appropriate.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

© 2017 Microsoft