We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback


Thread ID:





59213 Apr 6,2007 01:26 PM UTC Apr 10,2007 07:06 AM UTC ASP.NET Web Forms (Classic) 2
Tags: DiagramWebControl
Foucault Dupleix
Asked On April 6, 2007 01:26 PM UTC

I have been trying to create my own Symbol, using your example :

But when I try to use it, an unknown exception is handle :

" Server Error in '/solution' Application.

Type 'MySymbol' in Assembly 'App_Web_kwx1gkv4, Version=, Culture=neutral, PublicKeyToken=null' is not marked as serializable.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.Serialization.SerializationException: Type 'MySymbol' in Assembly 'App_Web_kwx1gkv4, Version=, Culture=neutral, PublicKeyToken=null' is not marked as serializable.

Source Error:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

<%@ Page Language="C#" Debug="true" %>


2) Add the following section to the configuration file of your application:

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario."

This is the code I use:
Dim insCmd_Poly As InsertNodesCmd = New InsertNodesCmd()
Dim poly1 As MySymbol = New MySymbol()
insCmd_Poly.AddNode(poly1, New PointF(50, 30))

Do I forget something?

J.Nagarajan [Syncfusion]
Replied On April 7, 2007 04:33 PM UTC

Hi Dupleix,

Thanks for using Syncfusion product.

You have to add Serialization constructor and Serialization state information to your custom symbol. Please add the following codes in your custom symbol to resolve your problem

public class MySymbol : Symbol
public MySymbol()
//Add your custom symbol code here
// Serialization constructor for symbols.
protected override void GetObjectData(SerializationInfo info, StreamingContext context)
base.GetObjectData(info, context);
// Called when deserialization is complete.
protected override void OnDeserialization(object sender)

// Get references to the child objects
this.outerRect = this.GetChildByName("Rectangle") as Syncfusion.Windows.Forms.Diagram.Rectangle;
this.innerEllipse = this.GetChildByName("Ellipse") as Ellipse;

I have attached my Custom Symbol file for your reference. Please refer to this MySymbol Class and Serialization constructor for symbols.

Also refer to our ScriptyClient sample (C:\Program Files\Syncfusion\Essential Studio\\Web\diagram.web\Samples\2.0\ScriptyClient) for more details. In this sample when yiu click on the "Add Symbol" button, you can add a button to the DiagramWebControl.

I hope this will resolve your problem. Let me know if you have any questions.


Foucault Dupleix
Replied On April 10, 2007 07:06 AM UTC

It worked, thanks a lot


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon