This exception was originally thrown at this call stack:
System.Linq.Enumerable.ToList
Syncfusion.UI.Xaml.Diagram.Layout.FlowchartLayout.CreateVertex(Syncfusion.UI.Xaml.Diagram.IInternalNode)
Syncfusion.UI.Xaml.Diagram.Layout.FlowchartLayout.UpdateLayout()
Syncfusion.UI.Xaml.Diagram.Panels.DiagramPage.ArrangeOverride(System.Windows.Size)
System.Windows.FrameworkElement.ArrangeCore(System.Windows.Rect)
System.Windows.UIElement.Arrange(System.Windows.Rect)
System.Windows.ContextLayoutManager.UpdateLayout()
System.Windows.ContextLayoutManager.UpdateLayoutCallback(object)
System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
...
[Call Stack Truncated]
Do you have any idea why it happens? I created the diagram according to "Getting started with WPF diagram" tutorial on your site.
Thanks in advance,
Dennis.
|
S.No |
Query |
Response | |
|
1 |
I want to disable infinite scrolling (the diagram should be only 300x300 for ex.)
I found the solution in this forum (ScrollLimit = ScrollLimit.Diagram) but it still stays scrollable and infinite.
|
Requirement: How to stop infinite scrolling in SfDiagram?
We have KB document for your requirement. Please refer to the document from the following link.
For more details about ScrollLimit, please visit our online hep documentation.
| |
|
2 |
How can I prevent from user to change the diagram (moving/resizing nodes, he should only select it) but I should be able to change it programmatically? |
Requirement: Need to restrict interaction for node except selection.
We have support to achieve your requirement using NodeConstraints. Please set the Nodeconstraints as NodeConstraints.Select for the desired or all NodeViewModel to restrict other actions like dragging, resizing, rotation.
Code Example:
For more details about constraints, please visit our online hep documentation.
| |
|
3 |
I am receiving exception while resizing nodes: |
Reported Issue: Exception occurs while resizing the node.
We could notice that you have faced exception while resizing the node in flowchart layout from the stack trace. So, we have tried to replicate the issue in flowchart, but issue not reproduced in our end. We have provided video to represent this.
Video Link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/flowchart1202909841.zip
If the scenario represented in the video is different from the reported scenario, please provide us issue replicable video or sample to reproduce the issue in our end. This helps us to serve you better.
|
Both options do not prevent the diagram resizing.
Constraints = NodeConstraints.Default & ~(NodeConstraints.Menu | NodeConstraints.InheritMenu)
|
Query |
Response | |
|
It happens even in the example you have provided.
When you are moving the node outside the diagram limits, the diagram grows and the scrollbar appears.
I have tried using:
Both options do not prevent the diagram resizing.
|
We have prepared a simple sample for your requirement. In the sample we have used ScrollLimit as Limited and it worked properly for us. In the sample we have provided the code to limit Auto Scroll (Scrolling of Page by click and drag diagram element over the edge of the viewport) and Scroll (Mouse wheel scroll for Vertical and Shift + Mouse wheel scroll for Horizontal). Please find the code snippet below.
Code Snippet :
| |
|
I have another issue - I am disabling right click menu for the node:
Constraints = NodeConstraints.Default & ~(NodeConstraints.Menu | NodeConstraints.InheritMenu)
but it still appears.
|
We are able to reproduce the reported issue. We will fix the issue in our upcoming Volume release. For your requirement of ContextMenu not shown for Node can be achieved by Menuopening event. Please find the code snippet below.
|