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

Diagram serialization events

3 Answers 59 Views
Diagram, DiagramRibbonBar, DiagramToolBox
This is a migrated thread and some comments may be shown as answers.
Tino
Top achievements
Rank 1
Tino asked on 13 Sep 2017, 06:56 AM
I closed the previous thread a bit early. I'd like to be able to skip deserializing certain shapes (e.g. my custom shapes). Please point me to the event/s I need to respond to to achieve this, or if there's another way. Thanks.

3 Answers, 1 is accepted

Sort by
0
Tino
Top achievements
Rank 1
answered on 13 Sep 2017, 07:04 AM

This is the error I'm getting with loading a diagram from XML.

 

 

0
Tino
Top achievements
Rank 1
answered on 13 Sep 2017, 11:34 PM
For now, I have implemented no-argument constructors for my ElementShape-derived classes which allows the deserialization to proceed.
0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 15 Sep 2017, 07:19 AM
Hello Tino, 

Thank you for writing back. 

According to the provided screenshot, it seems that you were missing parameterless constructor for your custom shapes. Indeed, creating such a constructor is the appropriate solution in this case. As a side note, you can refer to the following help article where you can find the relevant events when serializing/deserializing shapes: http://docs.telerik.com/devtools/winforms/diagram/events/diagram-events

I hope this information helps. If you have any additional questions, please let me know. 

 Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Diagram, DiagramRibbonBar, DiagramToolBox
Asked by
Tino
Top achievements
Rank 1
Answers by
Tino
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or