Unplanned
Last Updated: 25 Nov 2020 09:51 by Robby

The exception throws when you use RadDiagram in a data binding scenario by populating its GraphSource and you want to draw a shape using the RadDiagramRibbon's ShapeTool. 

InvalidOperationException: 'Cannot modify the Items collection when the GraphSource is set.'

To work this around, use the PreviewMouseDown, PreviewMouseMove and PreviewMouseUp events of RadDiagram in order to prevent the default logic executed by the ShapeTool. Then, in the event handlers, implement a custom logic that works with the diagram GraphSource.

private void RadDiagramRibbon_Loaded(object sender, RoutedEventArgs e)
{
	var toolService = diagram.ServiceLocator.GetService<IToolService>() as ToolService;
	this.shapeTool = (ShapeTool)toolService.ToolList.FirstOrDefault(x => x is ShapeTool);
}

private Point startPoint;
private bool isShapeCreationInProgress;
private MyNode currentShapeModel; // where MyNode derives from NodeViewModelBase and expose an additional Geometry property 
private ShapeTool shapeTool;

private void RadDiagram_PreviewMouseDown(object sender, MouseButtonEventArgs e)
{			
	if (this.shapeTool.IsActive && !this.isShapeCreationInProgress)
	{
		this.isShapeCreationInProgress = true;
		this.startPoint = this.diagram.GetTransformedPoint(e.GetPosition(this.diagram));

		this.currentShapeModel = new MyNode()
		{
			Geometry = this.shapeTool.Geometry,
			Position = this.startPoint,
			Width = 0,
			Height = 0
		};
		var source = (MyGraphSource)this.diagram.GraphSource;
		source.AddNode(this.currentShapeModel);
		e.Handled = true;
	}
}

private void RadDiagram_PreviewMouseMove(object sender, MouseEventArgs e)
{
	if (this.shapeTool.IsActive && this.currentShapeModel != null && this.isShapeCreationInProgress)
	{
		var transformedPoint = this.diagram.GetTransformedPoint(e.GetPosition(this.diagram));
		var width = Math.Abs(this.startPoint.X - transformedPoint.X);
		var height = Math.Abs(this.startPoint.Y - transformedPoint.Y);
		var x = Math.Min(this.startPoint.X, transformedPoint.X);
		var y = Math.Min(this.startPoint.Y, transformedPoint.Y);

		this.currentShapeModel.Width = width;
		this.currentShapeModel.Height = height;
		this.currentShapeModel.Position = new Point(x, y);
		e.Handled = true;
	}
}

private void RadDiagram_PreviewMouseUp(object sender, MouseButtonEventArgs e)
{
	this.isShapeCreationInProgress = false;
	e.Handled = true;
}

Completed
Last Updated: 16 Nov 2020 13:54 by ADMIN
Release LIB 2020.3.1116
Completed
Last Updated: 16 Nov 2020 13:36 by ADMIN
Release LIB 2020.3.1116
RadDiagram with virtualization turned off.

Randomly positioned 5000 shapes are added in Diagram.

For the test, Shapes are with simplified template consisting pretty much of a single Border and nothing else.

On maximized WPF window, Diagram Load for about 3-3.5 seconds.

On normal WPF window, DIagram loads for about 15 seconds.

Completed
Last Updated: 02 Oct 2020 07:20 by ADMIN
Release LIB 2020.3.912
In some cases, a RadDiagramConnection with its UseFreeConnectors property set to True is not loaded correctly from xml.
Unplanned
Last Updated: 14 Sep 2020 09:17 by ADMIN
Created by: David
Comments: 1
Category: Diagram
Type: Feature Request
1

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...

 

 

 

Completed
Last Updated: 31 Aug 2020 10:33 by ADMIN
Release LIB 2020.2.831
The BackgroundGrid.CellSize attached property is not applied when in NoXAML scenario or when the theme changes with StyleManager
Completed
Last Updated: 26 May 2020 08:34 by ADMIN
Release LIB 2020.2.525 (5/26/2020)

While performing Cut operation inside RadDiagram, an exception in the MS Clipboard occurs with the following message:

System.Runtime.InteropServices.COMException: 'OpenClipboard Failed (Exception from HRESULT: 0x800401D0 (CLIPBRD_E_CANT_OPEN))'

Unplanned
Last Updated: 11 May 2020 11:17 by Petar
ADMIN
Created by: Petar Mladenov
Comments: 3
Category: Diagram
Type: Feature Request
24
Currently large diagrams are hard to export with good quality because of the memory limitation in WritableBitmap when the DPI is increased.

 -- One option is to use BitMapCacheBrush (discussed here http://www.telerik.com/forums/low-resolution-using-exporttoimage-on-big-diagram)

 -- Another option is to export multiple images of the diagram which cover it all. Then possibly combine these pictures into one.

 -- Also , you can try increasing the operating memory of your Visual Studio
Completed
Last Updated: 13 Feb 2020 09:02 by ADMIN
Release R1 2020 SP1

If we have a custom shape that derives from RadDiagramShapeBase and we rotate it at some degree (90) for example, and then resize it the diagram's selection adorner is misplaced with the shape. Workaround:

Set RenderTransofrmOrigin = new Point(0.5, 0.5) to the shape.

Other workaround: Derive the custom shape from RadDiagramShape, instead of RadDiagramShapeBase.

Completed
Last Updated: 11 Feb 2020 13:11 by ADMIN
Release R1 2020 SP1
In DiagramRibbon the buttons, numerics, combos, selectors which are not bound to Diagram or DiagramRibbon Commands, fail to execute their actions in Simplified mode.
Unplanned
Last Updated: 05 Feb 2020 08:06 by ADMIN
An API could be created so that an Image can be added to the Background or Grid of the Diagram so that the user can zoom and pan over the image.
Completed
Last Updated: 02 Sep 2019 13:42 by ADMIN
Release R3 2019
Setting ContainerMargin constant to 0 will make the margin 0 on the left, bottom and right side of the content. However, the shapes in the content of the container, will overlap its header. Expected is child shapes do not overlap any borders in the container.
Unplanned
Last Updated: 27 Aug 2019 13:58 by ADMIN
Add API so that the user can prevent the auto close popup wrapper behavior.
Unplanned
Last Updated: 16 Aug 2019 10:15 by ADMIN
Created by: Dinko
Comments: 0
Category: Diagram
Type: Feature Request
1
Support out of the box Fishbone diagram.
Completed
Last Updated: 22 Jul 2019 06:44 by ADMIN
Release LIB 2019.2.722 (7/22/2019)

To reproduce this use the following code snippet:

<telerik:RadDiagram>
    <telerik:RadDiagramShape Content="Shape 1" Position="100, 100"/>
    <telerik:RadDiagramShape Content="Shape 2" UseGlidingConnector="True" Position="300, 100"/>
</telerik:RadDiagram>

Steps to reproduce:

1. Start a new connection from Shape 1, by dragging one of its connectors.
2. Drag the connection over Shape 2. 

Expected: The connector closest to the mouse should get highlighted and when you drop the connection it should get attached to the shape.
Actual: The closest connector is not highlighted. Also, when you drop the connection over the target shape it doesn't get attached.


Completed
Last Updated: 17 May 2019 15:15 by ADMIN
Release LIB 2019.2.520 (05/20/2019)

The exception is thrown for the RotationAngle property.

The issue can be observed also in the opposite direction - the diagram is serialized on a machine with some culture (for example Portugal Porguese - pt-PT) and then restored on a machine with an English culture.

The issue reproduces only when saving and loading between cultures which numeric separators are different. For example, with Bulgarian culture, the number 4.5 is represented as 4,5 (with a comma). With English culture the number will be represented as 4.5 (with a period).

To work this around, create a custom RadDiagramShape and override its Deserialize() method. Then parse the RotationAngle manually, and set it to the RotationAngle property of the shape. After this, set the RotationAngle of the SerializationInfo to null, in order to prevent the default restoring of the property.

public partial class CustomShape : RadDiagramShape, IEquatable<BaseShape>
{
    public override void Deserialize(SerializationInfo info)
    {
        if (info["RotationAngle"] != null)
        {
            var angle = Convert.ToDouble(info["RotationAngle"].ToString(), CultureInfo.InvariantCulture);
            this.RotationAngle = angle;               
            info["RotationAngle"] = null;
        }
        base.Deserialize(info);
    }
}

Unplanned
Last Updated: 26 Mar 2019 11:56 by ADMIN

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)

Unplanned
Last Updated: 19 Mar 2019 14:39 by ADMIN
ADMIN
Created by: Telerik Admin
Comments: 1
Category: Diagram
Type: Feature Request
15
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.
Unplanned
Last Updated: 19 Mar 2019 14:39 by ADMIN
ADMIN
Created by: Petar Mladenov
Comments: 0
Category: Diagram
Type: Feature Request
8
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.
Unplanned
Last Updated: 04 Mar 2019 11:39 by ADMIN
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>
1 2 3 4 5 6