This is a migrated thread and some comments may be shown as answers.

Diagram Exporting Issiue

3 Answers 60 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Mahmut
Top achievements
Rank 1
Mahmut asked on 20 Feb 2015, 08:40 AM
Hi,
I am trying to export diagram, which is created with mvvm pattern, to an image, but image is not clear. I mean image is blurred. I search the forum, and I found some solutions for this problem. I tried them, but they didn't work. And I also tried to export to html. But there is only one rectangle in html file. How can I export diagram to an clear image? and How can I export diagram to html file correctly?

Thanks in advance.

3 Answers, 1 is accepted

Sort by
0
Mahmut
Top achievements
Rank 1
answered on 20 Feb 2015, 12:11 PM
In addition, There is no problem for small diagram. I have this problem for deep hierarchy. And sometime background turn black or white.

generated image
0
Pavel R. Pavlov
Telerik team
answered on 24 Feb 2015, 12:28 PM
Hello,

I cannot understand if your issue is that that background of the exported image is black or that the image is blurred. If it is the background, you should keep in mind that you can control that color like so:

Dispatcher.BeginInvoke(new Action(() =>
{
    using (var stream = File.Open(@"d:\xDiagram.png", FileMode.Create))
    {
        xDiagram.ExportToImage(stream, margin: new Thickness(10), backgroundBrush: new SolidColorBrush(Colors.Red));
    }
}),DispatcherPriority.ApplicationIdle);
If the image in your opinion is blurred. Honestly I cannot decide if the provided image is blurred or not. I cannot even differentiate the links from the shapes. The problem is that the diagram is huge. This forces all shapes to be shrinked so much that they are unreadable. The approach to address this would be to export the diagram to a larger image so that there is enough space for all shapes.

Regards,
Pavel R. Pavlov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Mahmut
Top achievements
Rank 1
answered on 26 Feb 2015, 09:02 AM
Hi Pavel,
Thanks for your response. Background is not issue. It look like it is black, but when zoom the image, sometimes background turns to white. It is generation issue, because the network is really big. I solved the problem. I divide subnetworks, and take pictures of the subnetworks.
Tags
Diagram
Asked by
Mahmut
Top achievements
Rank 1
Answers by
Mahmut
Top achievements
Rank 1
Pavel R. Pavlov
Telerik team
Share this question
or