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.
Unfortunately, activation email could not send to your email. Please try again.

How to set Settings for a Shape on Palette

Thread ID:

Created:

Updated:

Platform:

Replies:

132263 Aug 23,2017 10:11 AM Aug 24,2017 05:22 AM ASP.NET MVC 2
loading
Tags: Diagram
Stephan Thiel
Asked On August 23, 2017 10:11 AM

Hallo

i have created a Palette with shapes in it.
Palette.Items.Add(new FlowShape() { Name = "Frage", Height = 40, Width = 44, Shape = FlowShapes.Process, AddInfo = new Dictionary<string, string>() { { "ssgdata", "datenssg" } } });

All work fine bit the AddInfo will not set when I Drag&Drop a Shape form the Palette to Diagram.


Shyam G [Syncfusion]
Replied On August 24, 2017 02:12 AM

Hi Stephan, 
 
Please refer to the code example below in which we have shown how to set addInfo(custom property) to an node. 
 
Code example: 
 
//define addInfo property 
Dictionary<string, object> addinfo = new Dictionary<string, object>(); 
addinfo.Add("ssgdata", "datenssg"); 
 
Palette.Items.Add(new FlowShape() { Name = "Frage", Height = 40, Width = 44, Shape = FlowShapes.Process, AddInfo = addinfo }); 
 
 
Regards, 
Shyam G 


Shyam G [Syncfusion]
Replied On August 24, 2017 05:22 AM

Hi Stephan, 
 
Please ignore our previous update 
 
Please use Dictionary<string,object>() instead of Dictionary<string,string>() to resolve your reported issue. 
 
Code example: 
 
 Palette.Items.Add(new FlowShape() { Name = "Frage", Height = 40, Width = 44, Shape = FlowShapes.Process, AddInfo = new Dictionary<string, object>() { { "ssgdata", "datenssg" } } }); 
 
Regards, 
Shyam G 


CONFIRMATION

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.

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.

;