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.

Customize Polygon tool

Thread ID:

Created:

Updated:

Platform:

Replies:

100400 Aug 4,2011 03:18 AM Aug 8,2011 01:34 AM Windows Forms 3
loading
Tags: Diagram
John Previn Kumar
Asked On August 4, 2011 03:18 AM

Is it possible to create a polygon drawing tool which draws polygons with transparent background and blue border line?
The vertices of the polygon should be visible and editable.



Amsath Ali M [Syncfusion]
Replied On August 5, 2011 02:03 AM

Hi Bose,

Thanks for your interest in Syncfusion products.

Yes, it is possible to create polygon tool which draws polygons with transparent background and blue border line. We suggest you to create the ‘CustomPolygonTool’ and ‘CustomPolygonNode’ classes which inherit from ‘PolygonTool’ and ‘PolygonNode’ Classes respectively to achieve your requirement.

For your convenience, we have created a simple sample to demonstrate this.
Please try the below sample and let us know if you have any queries.
inc82236- EnableShading-647450407.zip

Regards,
Amsath Ali. M




John Previn Kumar
Replied On August 5, 2011 06:58 AM

Thanks. How do I add these polygons drawn by the polygon tool to a particular layer?


Amsath Ali M [Syncfusion]
Replied On August 8, 2011 01:34 AM

Hi Bose,

Thanks for the update.

We suggest you to set the Layer’s ‘Enabled’ property to ‘true’ and add that layer to the Diagram.Model’s ActiveLayer’s collection. If a node is added to the Diagram.Model, then it will automatically added to that Activelayer.

Here is the Code snippet:
[C#]
Layer layer1 = new Layer();
layer1.Visible = true;
layer1.Enabled = true;
this.diagram1.Model.ActiveLayers.Add(layer1);

For more information, please see the below online documentation UG link:
http://help.syncfusion.com/ug_93/User%20Interface/Windows%20Forms/Diagram/Documents/444layers.htm

For your convenience, we have modified the sample to achieve your reuirement.
Please try the below sample and let us know if you have any queries.

forum custom polygontool2130668387.zip

Regards,
Amsath Ali. M








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.

;