Hi
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();
encoder.Frames.Add(Telerik.Windows.Media.Imaging.BitmapFrame.Create(bmp));
encoder.Save(stream);
stream.Close();
}
});
}
Thanks
Justin