Panel.MakeBitmap and Diagram Background


When generating an image of the diagram, using Panel.MakeBitmap, only the visible portion of the diagram contains the background (beige in this case) and the non-visible portion seems to have no background. See below:

How can I get Panel.MakeBitmap to include the background for the entire image or to have no background at all?

Here’s the code I’m using to generate the image:

SaveFileDialog dialog = new SaveFileDialog();
        if(dialog.ShowDialog() == true) {

            var bounds = Diagram.Panel.DiagramBounds;
            Diagram.Panel.MakeBitmap(new Size(bounds.Width, bounds.Height), 96, new Point(bounds.X, bounds.Y), 1.0D, (bmp) => {

                using(Stream stream = dialog.OpenFile()) {

                    Telerik.Windows.Media.Imaging.PngBitmapEncoder encoder = new Telerik.Windows.Media.Imaging.PngBitmapEncoder();



How did you give the diagram the beige background?

Hi Walter

I’m doing it via a Style for the Diagram:


And what PrintManager.PageOptions did you specify?

Hi Walter

I wasn’t aware that I had to use PrintManager.PageOptions in conjuction with MakeBitmap.
I tried setting “None”, “Background”, “FullBackground” as the PageOptions but it still produced the same result.

Sorry, I wasn’t at my desk when I replied – printing has nothing to do with it.
I also didn’t remember that you are using Silverlight – I had to look that up.

We explicitly set the Background to be the Diagram.Background, so I cannot explain that.

You could try a work-around to explicitly set the Diagram.Background to “White” before printing, and clear that value in your Action that writes out the image stream.

This bug is fixed in the next release.

Thanks for reporting it.