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.

Custom Symbols

Thread ID:

Created:

Updated:

Platform:

Replies:

38140 Dec 6,2005 02:49 PM Dec 14,2005 09:35 AM Windows Forms 3
loading
Tags: Diagram
Chris C
Asked On December 6, 2005 02:49 PM

We are using custom symbols in our application. We would like to have the ability to change the color of the symbol once it has been dragged to the diagram. The FillStyle properties that are displayed in the property editor do not match the actual properties of the symbol instance. Furthermore, when I change the properties in the editor, the symbol is not updated to reflect those changes. I modified the Custom Symbol sample to show all of the properties. I ran the sample and found that the FillStyle is wrong there as well. Is there something I am doing wrong here? Thanks in advance for your help. Chris

Administrator [Syncfusion]
Replied On December 7, 2005 06:46 PM

Hi Chris, Changing a Symbol''s FillStyle property value such as the FillStyle.Color will propagate that property down through the symbol''s child nodes collection and will apply that particular property to all child nodes that support it. For example, in the case of a symbol composed of an outer Rectangle and an inner Ellipse shape, setting the Symbol.FillStyle.Color to Black will result in the property being applied to both the Rectangle and the Ellipse child nodes, thus giving the Symbol the resultant FillStyle color. This property propagation mechanism will however work only if the symbol''s child nodes retain the default value for that particular property, and do not have an overriding assignment. If the child node''s FillStyle.Color property has been set to something other than the default, then that child node will retain its assigned property value, and will ignore the parent symbol''s fill style when it draws itself. This is likely to be the issue in your case. So please make sure that your symbol''s child nodes retain their default property values for those attributes that you intend to change at the symbol level. Thanks, Prakash Surendra Syncfusion Inc.,

Administrator [Syncfusion]
Replied On December 7, 2005 06:50 PM

Chris, Continuing the above exposition, if you want to change a non-default value for one of the symbol''s child nodes, then you will have to do this by directly the child node and applying the new property value directly to it. I hope this clears things up. Please let me know if the behavior that you are noticing is something other than this. Prakash Surendra Syncfusion Inc.,

Chris C
Replied On December 14, 2005 09:35 AM

Hi Prakash, Thanks for all of your help. Your detailed explanation helped us understand and solve our problem. Chris

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.

;