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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Connectors in Symbol Palettes

Thread ID:

Created:

Updated:

Platform:

Replies:

82618 Jun 17,2009 05:45 PM UTC Jun 25,2009 10:54 AM UTC WinForms 6
loading
Tags: Diagram
Veaceslav Cosulet
Asked On June 17, 2009 05:45 PM UTC

Hi.
In one of your examples(Export Image) I saw a symbol palette with a connector symbol that when dragged and dropped can connect other symbols in the diagram. How is it done? What proprieties have I to set for a connector in order to obtain such an effect?
Thanks.
Best regards, Frank.

Gowri Manohari D [Syncfusion]
Replied On June 18, 2009 06:40 AM UTC

Hi Frank,

Thanks for choosing Syncfusion procducts.

In order to connect the nodes via connector, we have set the EnableCentralPort property to true for HeadNode and Tail Node of the connector. As well as set the connector.EnableCentralPort to true for exact connection.

Regards,
Gowri

Veaceslav Cosulet
Replied On June 18, 2009 09:01 AM UTC

Sorry Gowri, but where are those proprieties exactly? I can't find them in Symbol Designer -> Proprieties for a connector. Have you meant I have to set those properties in symbol designer for this connector symbol, or in code?
I can't find HeadNode and TailNode properties for the connector and respectively EnableCentralPort property for each of them. connector.EnableCentralPort is set to true by default.
Could you be more explicit?
I want a connector in symbol palette like in your example, so that when dragged and dropped on the diagram it can connect two other symbols.
Thanks.
Best regards, Frank.

Gowri Manohari D [Syncfusion]
Replied On June 22, 2009 03:38 AM UTC

Hi Frank,

Sorry for the inconvenience caused.

I have created sample for your requirement. The sample which I have created is for when dragged and dropped the Connector Symbol from Symbol Palette, will connect the Symbols in a diagram. In order to achieving the above, we should set the 'EnableCentralPort' Property for the Symbols to true.

In our sample we want to connect the Rectangle node and Ellipse node using Connector Symbol. In order to achieving this, we should set the 'EnableCentralPort' Property of Rectangle and Ellipse Symbol to true. And also set the 'EnableCentralPort' Property of Connector Symbol to true in property editor.

For more details please refer the sample.

http://files.syncfusion.com/support/Diagram.Windows/Forums/F82618/main.htm


Regards,
Gowri

Gowri Manohari D [Syncfusion]
Replied On June 22, 2009 03:40 AM UTC

Hi Frank,

Sorry for the inconvenience caused.

I have created sample for your requirement. The sample which I have created is for when dragged and dropped the Connector Symbol from Symbol Palette, will connect the Symbols in a diagram. In order to achieving the above, we should set the 'EnableCentralPort' Property for the Symbols to true.

In our sample we want to connect the Rectangle node and Ellipse node using Connector Symbol. In order to achieving this, we should set the 'EnableCentralPort' Property of Rectangle and Ellipse Symbol to true. And also set the 'EnableCentralPort' Property of Connector Symbol to true in property editor.

For more details please refer the sample.

http://files.syncfusion.com/support/Diagram.Windows/Forums/F82618/main.htm


Regards,
Gowri

Veaceslav Cosulet
Replied On June 23, 2009 10:23 AM UTC

Hi Gowri and thanks.
So creating and adding a symbol connector in a symbol palette is possible only dynamically, Symbol Designer utility has no such possibility? I mean to create and add a symbol connector during designing a symbol palette with Symbol Designer utility. Right?
Because I tried both, adding a symbol connector to a palette with Symbol Designer and another one in code. And in the first case the symbol connector is treated as a symbol with selection area around, and in the second case as a connector with possibility to connect symbols from palette.
Thanks and best regards, Frank.

Gowri Manohari D [Syncfusion]
Replied On June 25, 2009 10:54 AM UTC

Hi Frank,

We can create such connector Symbol in Symbol Designer utility by means of some code changes in Symbol Designer source. Please replace given set of code in the Source File.

In Symbol Designer source file under MainForm.cs , there is a method called “PreparePaletteToSave()”, the method contains the below lines of code for in order to save the Symbol into Palette.

if (nodes.Count > 0)
{
nodeTmp = new Group(nodes);
}
else
{
nodeTmp = null;
}

Please replace the above set of code with the below lines in “PreparePaletteToSave()” method.

if (nodes.Count > 1)
{
nodeTmp = new Group(nodes);
}
else if (nodes.Count > 0)
{
nodeTmp = nodes.First;
}
else
{
nodeTmp = null;
}
Run the sample and try to create the connector symbol in Symbol Designer, it will meets your requirement.

Regards,
Gowri

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

;