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

How to set Settings for a Shape on Palette

Thread ID:

Created:

Updated:

Platform:

Replies:

132263 Aug 23,2017 02:11 PM UTC Aug 24,2017 09:22 AM UTC ASP.NET MVC 2
loading
Tags: Diagram
Stephan Thiel
Asked On August 23, 2017 02:11 PM UTC

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 06:12 AM UTC

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 09:22 AM UTC

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.

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

;