Unplanned
Last Updated: 13 Sep 2024 15:21 by Martin Ivanov
Martin Ivanov
Created on: 13 Sep 2024 15:21
Category: Diagram
Type: Feature Request
2
Diagram: Add a property on RadDiagramConnection that returns the the middle point of the line

The middle point in this context is a point that is located on the line segment that is positioned after the middle length of the line. Add a property on the RadDiagramConnection class that returns the middle point. The property should be DependencyProperty so it can be bound with OneWayToSource mode in order to be able to notify the bound view model (if such is presented).

Currently, you can get this information by combining the CalculateMiddlePointOfLine and AllPoints methods of the ConnectionUtilities class.

var allConnectionPoints = Telerik.Windows.Diagrams.Core.ConnectionUtilities.ConnectionUtilities.AllPoints(radDiagramConnection);
var startAndEndPoints = new Tuple<Point, Point>(radDiagramConnection.StartPoint, radDiagramConnection.EndPoint);
Point middlePoint = Telerik.Windows.Diagrams.Core.ConnectionUtilities.CalculateMiddlePointOfLine(startAndEndPoints, allConnectionPoints);

0 comments