Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Registering custom items and custom behaviour (Read 2216 times)
Gravity
Junior Member
**
Offline


I Love MindFusion!

Posts: 52
Joined: Sep 21st, 2016
Registering custom items and custom behaviour
Sep 21st, 2016 at 11:46am
Print Post  
Hello,

I am trying out these diagrams. I have kind of a problem finding info on Diagram.RegisterItemClass

how do you register custom shapeNode?

For example i saw with Scheduler you have methods for handling item class registration it has IsClassRegistered, RegisterItemClass and UnregisterClass. Which i am missing in web forms.


  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3154
Joined: Oct 19th, 2005
Re: Registering custom items and custom behaviour
Reply #1 - Sep 21st, 2016 at 12:01pm
Print Post  
Hi,

If you need to create custom types for default Canvas mode, you must create classes in both .NET and JavaScript, and also a JavaScriptConverter to transfer them in JSON format between client and server. You tie them all together using DiagramView's RegisterItemType and RegisterConverters methods, as shown in IconNodes sample project for the CustomNode class.

Diagram.RegisterItemClass is used mostly in the desktop version of the control which shares an assembly with ASP.NET one, and it's called internally by DiagramView's method.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Gravity
Junior Member
**
Offline


I Love MindFusion!

Posts: 52
Joined: Sep 21st, 2016
Re: Registering custom items and custom behaviour
Reply #2 - Sep 21st, 2016 at 12:27pm
Print Post  
Thank you very much. During that time I've read documentation, that's the answer thanks : )
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint