tags:

views:

19

answers:

2

How can I render multiple controls (or the same control) to a bitmap on specified locations. For example render control1 in it's full size to the location (50;50) and control2 at location (100;100) and so forth.

I've a control that needs to be rendered 6 times side-by-side on an image with a single property changed in each rendering.

RenderTargetBitmap has the render function, but it doesn't allow me to specify where on the image I want my control rendered.

+1  A: 

Try positioning the controls in a canvas, then render the canvas to a bitmap.

Chris Persichetti
+1  A: 

When you have your bitmap renderings you can put them inside a DrawingGroup which allows you to specify exactly where in the resulting drawing they should be drawn.

To put images inside a drawinggroup, you'd have to use ImageDrawing. There's an example that does this on the DrawingGroup msdn page linked above.

Isak Savo