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);
In the Swimlane diagram example (Data Visualization -> Diagrams -> Swimlane) the application crashes, showing at least one but often more than one error message.
How to reproduce:
{DependencyProperty.UnsetValue} is not a valid value for the Property "Background"pop up (see other screenshot)
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:
Hi,
In project we have noticed that sometimes for RadDiagram.ConnectionManipulationCompleted we receive unexpected values in event.
This problem is not systematic but it occurs often at the drag of new connection.
To make it reproducible for you I used CustomConnectors sample project from Diagram.
For easier analysis I recorded a video with bug and changes to CustomConnectors project.
Best regards,
Bartosz
NullReferenceException is thrown when trying to save RadDiagram instance that contains a RadDiagramShape with its Geometry assigned to a GeometryGroup value.
To work this around, you can flatten the GeometryGroup before setting the shape's Geometry property. This is done by calling the GetFlattenedPathGeometry() method of the GeometryGroup.
shape.Geometry = group.GetFlattenedPathGeometry();
Implement support (or extensibility) for printing the whole diagram in a single page.