Hello,
I need to add connection points to a certain connection and i need to do it with a single click and without the 'ctrl' key pressed. I've tried the AddConnectionPoint method but is not giving us the expected behavior (apparently the points need to be added in some specific order). This is my code:
1.void Connection_MouseDown(object sender, MouseButtonEventArgs e)2.{3. RadDiagramConnection Connection = sender as RadDiagramConnection;4.5. var transformedPoint = this.diagram.GetTransformedPoint(Mouse.GetPosition(this.diagram));6.7. Connection.AddConnectionPoint(e.MouseDevice.GetPosition(this.diagram)); 8.}I've tried this aswell:
01.void Connection_MouseDown(object sender, MouseButtonEventArgs e)02.{03. RadDiagramConnection Connection = sender as RadDiagramConnection;04. 05. var transformedPoint = this.diagram.GetTransformedPoint(Mouse.GetPosition(this.diagram));06. Connection.AddConnectionPoint(e.MouseDevice.GetPosition(this.diagram));07. 08. IList<Point> connPoints = Connection.ConnectionPoints.OrderBy(c => c.X).OrderBy(c => c.Y).ToList();09. 10. Connection.ConnectionPoints.Clear();11. foreach (Point point in connPoints)12. {13. Connection.AddConnectionPoint(point);14. } 15.}When i start to make points with one single click, this happens (Attached image).
We need to add connection points the same way we do with they ctrl key pressed. But without the 'ctrl' key pressed.
Thank you