Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Export error - with Dashed Pen (Read 2377 times)
jaiswalamit
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 64
Joined: Feb 17th, 2009
Export error - with Dashed Pen
Jun 26th, 2009 at 2:33pm
Print Post  
Hi,

After all your help I progressed in to saving the graph on the server side with netdiagram.

Now new problem:
If the silverlight diagram has dashed pen property for links set and the XML is like:
<Pen>
<Brush Id="2" />
  <CompoundArray>
<Pos>4</Pos>
  </CompoundArray>
<DashOffset>0</DashOffset>
<DashStyle>5</DashStyle>
<Width>1</Width>
</Pen>

Then on Server Side when I call diagram.CreateImage() as below, I get the error:
Parameter is invalid!
:

diagram.LoadFromString(xmlString);
System.Drawing.Image image = diagram.CreateImage();

Please help,
Amit
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Export error - with Dashed Pen
Reply #1 - Jun 29th, 2009 at 12:01pm
Print Post  
Hi,

It seems custom dash styles in GDI+ require an additional attribute that is not available in the Silverlight version. We'll fix this by adding a default value. For now you can work around this by setting the Pen.DashStyle of links to one of the predefined values, or define a new custom dash style on the server and assign it to link pens using the GDI+ API.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
jaiswalamit
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 64
Joined: Feb 17th, 2009
Re: Export error - with Dashed Pen
Reply #2 - Jun 30th, 2009 at 9:17am
Print Post  
Thanks Stoyan.

By changing the dash style from custom to predefined DashStyles.Dashed in the Pen constructor worked well.
I am not sure why we created custom dash style instead of using the DashStyles Enum. May be when I started using diagramlite, it was not having these support initially.

A+ as always for your awesome support.

Regards,
Amit
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint