Unplanned
Last Updated: 19 Aug 2016 11:59 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 05 Aug 2016 11:20
Category: Diagram, DiagramRibbonBar, DiagramToolBox
Type: Bug Report
2
FIX. RadDiagram - exporting a large diagram to an image is cropped
Please refer to the attached gif file illustrating how to reproduce the problem.

Workaround: use the following approach for exporting to an image:

private void radButton1_Click(object sender, EventArgs e)
{
    RadScrollBarElement horizontalScrollBar = this.radDiagram1.DiagramElement.Children[1] as RadScrollBarElement;
    RadScrollBarElement verticalScrollBar = this.radDiagram1.DiagramElement.Children[2] as RadScrollBarElement;

    
    this.Size = new System.Drawing.Size(this.Size.Width + (horizontalScrollBar.Maximum - this.radDiagram1.Size.Width),
        this.Size.Height + (verticalScrollBar.Maximum + 1 - this.radDiagram1.Height));
    Application.DoEvents();
    Bitmap bmp = new Bitmap(radDiagram1.Width, radDiagram1.Height, PixelFormat.Format32bppArgb);
   
    this.radDiagram1.DrawToBitmap(bmp, new Rectangle(0, 0, radDiagram1.Width, radDiagram1.Height));
  
    bmp.Save(@"..\..\test2.bmp");
    System.Diagnostics.Process.Start(@"..\..\test2.bmp");
}
Attached Files:
0 comments