HI.
I trying to create a Connection in RadDiagram With VB.net
My use case is adding a handler to detect mouse right click on the connection. Although the following code does not give an error, it does not work either.
Blow is my simple test code.
Imports Telerik.WinControls
Imports Telerik.WinControls.UI
Public Class RadForm1
Private Sub RadForm1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim con As New RadDiagramConnection
con.Name = "Telerik_Connection"
con.StartPoint = New Point(10, 10)
con.EndPoint = New Point(100, 100)
con.StrokeThickness = 5
con.BackColor = Color.Blue
AddHandler con.MouseClick, AddressOf Con_click
End Sub
Private Sub Con_click(ByVal sender As Object, ByVal e As MouseEventArgs)
If e.Button = MouseButtons.Right Then
Me.Text = sender.name
End If
End Sub
End Class