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. Image for the cookie policy date

Custom Ports

When I create a custom port it shows a blue X on the node. Is there a way to make the port not have a symbol associated with it?

Dim pp As ConnectionPoint = New ConnectionPoint()
pp.Position = Position.BottomCenter
pp.VisualType = PortVisualType.Custom
pp.ConnectionPointType = ConnectionPointType.IncomingOutgoing
fromnode.Ports(fromnode.Ports.Add(pp)).Connect(line.TailEndPoint)


1 Reply

AD Administrator Syncfusion Team March 6, 2008 09:43 PM UTC

Hi Matt ,

Sorry for the delay. If you want to show the ports without the symbol, then you have to set the node's FillStyle.Color and LineStyle.LineColor to Transparent. Please refer to the following code snippet.

Dim con As ConnectionPoint = New ConnectionPoint()
con.VisualType = PortVisualType.Custom
Dim m_rect As Syncfusion.Windows.Forms.Diagram.Rectangle = New Syncfusion.Windows.Forms.Diagram.Rectangle(120, 30, 60, 30)
m_rect.Ports.Add(con)
Me.diagram1.Model.AppendChild(m_rect)
m_rect.FillStyle.Color = Color.Transparent
m_rect.LineStyle.LineColor = Color.Transparent

Please refer to the attached sample that illustrates this.

http://websamples.syncfusion.com/samples/Diagram.Windows/F72007/main.htm

Please let me know if you have any questions.

Regards,
Nagaraj



Loader.
Live Chat Icon For mobile
Up arrow icon