Error when I try to insert a new symbol 'Syncfusion.Windows.Forms.Diagram.Polyline'

Hi,

I will send you a video with my problem. If I try to create a symbol with a Rectangle for example I don't have any problem.


Type 'Syncfusion.Windows.Forms.Diagram.Polyline' in Assembly 'Syncfusion.Diagram.Base, Version=13.4200.0.53, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89' is not marked as serializable.

Attachment: Video_1534424981_dc3d9f00.zip

1 Reply

NG Naganathan Ganesh Babu Syncfusion Team August 17, 2018 06:43 AM UTC

Hi Blanca, 
 
We suspect that, you have used a Syncfusion.Windows.Forms.Diagram’s “Polyline” to activate a tool and create a polyline node which is deprecated and it is not marked as serializable. So we suggest you to use Syncfusion.Windows.Forms.Diagram’s “PolylineNode” to create a polyline node to achieve your requirement. please refer to the below code example. 
 
Code example: 
 
[C#] 
 
public class CustomPolyLineTool : PolyLineTool 
{ 
         
public CustomPolyLineTool(DiagramController controller) 
: base(controller) 
{ 
this.Name = "CustomPolyLineTool"; 
} 
 
protected override Node CreateNode(System.Drawing.PointF[] pts) 
{ 
//Use Syncfusion.Windows.Forms.Diagram.PolylineNode instead of Syncfusion.Windows.Forms.Diagram.Polyline... 
 
Syncfusion.Windows.Forms.Diagram.PolylineNode polyline = new Syncfusion.Windows.Forms.Diagram.PolylineNode(pts); 
return polyline; 
} 
} 
 
Regards, 
 
Naganathan K G 


Loader.
Up arrow icon