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);
Currently, the print preview control provides only options for the current printer, the page orientation and the page size . Include the following options too:
- Paper Format (Lettre, A4, etc.)
- Paper Orientation (Portrait or Landscape)
- Number of copies (1, 2, 3, ...)
- Print Color Settings (Colors or Monochrome)
- Margins
- Resolution (DPI based on the capabilities of the printer)
Add an option to modify the StartPoint and EndPoint properties of RadDiagramConnection instances via the SettingsPane.
This functionality can be achieved by modifying the default ControlTemplate of the SettingsPaneView element to include an additional RadTabItem instance in the RadTabControl element. In the additional RadTabItem, input controls can be used, such as the RadNumericUpDown element. These elements should modify properties that will be present in a custom LinkViewModelBase<NodeViewModelBase>> class. More specifically, the X and Y properties of the StartPoint and EndPoint properties of the RadDiagramConnection element.
The attached sample project shows the implementation of the above approach for achieving this requirement.
Add an option to customize the available colors in the SettingsPane control:
Hundreds of Connections with ConnectionsBridges turned on in diagram. One on top of the others.
StackOverflowException between updating the Connections' Start/End points.
I looked at the RadDiagram options, but it doesn't have anything that compares to a circular relationship chart. Here's an example:
https://www.codeproject.com/KB/silverlight/342715/screenshot2.png
Part of this article:
https://www.codeproject.com/Articles/342715/Plotting-Circular-Relationship-Graphs-with-Silverl
I gave some thought at trying to rewrite the code into WPF, but I've got too many other irons in the fire. Figured I'd ask as this sort of visualization control doesn't appear in your current collection. I have a project that could benefit from displaying weighted relationships in such a manner, but my choices are either do something sub-par with the RadDiagram option, write one myself, find another controls collection and port everything, or leave the feature out for now. I'm going for the leave it out option for the moment, and see if your UI wizards can come up with something...
Just as a use case, one of the reasons for wanting this is to diagram conversations between individuals in email messages. Being able to show who's talking to whom and how frequently using one of these charts for visualization allows you to quickly find patterns...
Research and improve the virtualization performance. Currently, the virtualization in the diagram creates containers for all shapes and sets the Visibility of the containers outside of the viewport to Collapsed. This saves from the layout and rendering performance, but it is not optimal. Consider implementing a standard virtualization mechanism which adds containers in the visual tree only for the shapes within the viewport.
User scenario:
When zooming out on more than 500-600 shapes and then panning, if telerik:DiagramSurface.IsVirtualizing="True", the performance is slower. When virtualization is off, the performance is a little better.
Connect the Diagrams BackgroundGrid to the Ruler's Measurement Unit and ScaleDefinitions. Currently only in DPI measurement unit the scaledefinitions and diagram background grid look good and consistent.
A possible workaround is to use an attached property. Basically, we've added ConnectionPointsProperty in AttachedProperties class and added binding to this new property in the style of the connection. public class AttachedProperties { public static RadDiagram Diagram { get; set; } public static readonly DependencyProperty ConnectionPointsProperty = DependencyProperty.RegisterAttached("ConnectionPoints", typeof(List<Point>), typeof(AttachedProperties), new PropertyMetadata(null, OnConnectionPointsChanged)); public static IEnumerable<Point> GetConnectionPoints(DependencyObject obj) { return (IEnumerable<Point>)obj.GetValue(ConnectionPointsProperty); } public static void SetConnectionPoints(DependencyObject obj, IEnumerable<Point> value) { obj.SetValue(ConnectionPointsProperty, value); } private static void OnConnectionPointsChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { var connection = d as RadDiagramConnection; var connectionPoints = e.NewValue as List<Point>; if (connection != null && connectionPoints != null) { for (int i = 0; i < connectionPoints.ToList().Count; i++) { connection.ConnectionPoints.Add(connectionPoints.ToList()[i]); } connection.IsModified = true; (connection as IConnection).Update(); } } } <telerik:RadDiagram.ConnectionStyle> <Style TargetType="telerik:RadDiagramConnection"> <Setter Property="ConnectionType" Value="Polyline"/> <Setter Property="local:AttachedProperties.ConnectionPoints" Value="{Binding MyConnectionPoints}"/> </Style> </telerik:RadDiagram.ConnectionStyle>