We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Unhandled Exception when setting the Nodes Collection

Thread ID:





120921 Oct 27,2015 10:14 PM UTC Nov 5,2015 04:43 AM UTC WinRT 4
Tags: SfDiagram
Asked On October 27, 2015 10:14 PM UTC


I'm trying to use the SfDiagram control by creating a hierarchical collection of nodes (represented by their viewmodel) and setting the Nodes property. The issue is that when I call

ObservableCollection<IsolationStep> isolationSteps = (ObservableCollection<IsolationStep>)e.NavigationParameter;

diagram.Nodes = isolationSteps;

I get:

System.NullReferenceException: Object reference not set to an instance of an object.
   at Syncfusion.UI.Xaml.Diagram.Layout.DirectedTreeLayout.GetLastChild(INode parent)
   at Syncfusion.UI.Xaml.Diagram.Layout.DirectedTreeLayout.AdjacentRight(IInternalNode shape)
   at Syncfusion.UI.Xaml.Diagram.Layout.DirectedTreeLayout.AllocateSpace(IInternalNode v, IInternalNode a, IInternalNode parent, IInternalNode prev, IInternalNode next)
   at Syncfusion.UI.Xaml.Diagram.Layout.DirectedTreeLayout.DoFirstWalk(IIn

Can you please provide with some guidance on what should be wrong regarding the Nodes collection that I'm using?

Thank you in advance.

Ranjitha Amirthalingam [Syncfusion]
Replied On October 28, 2015 10:23 AM UTC

Hi Stergios,

Thanks for contacting Syncfusion Support.

Reported Scenario: Issue with Null Reference Exception.

We have analyzed the provided stack trace. We have suspect that the Info property of Node returns null value, which causes “Null Reference Exception”.

It would be better for us, if you would provide the sample to represent the reported scenario. This helps us to serve you better.

Ranjitha A.

Replied On November 1, 2015 08:10 AM UTC


I have attached a sample app that generated the problem.


Attachment: App1_e5ece0a5.zip

Ranjitha Amirthalingam [Syncfusion]
Replied On November 3, 2015 01:09 AM UTC

Hi Stergios,

Reported Issue:Issue with Null Reference Exception.

Layout defines the relationship between Parent and Child Nodes. LineConnector  is used to create the relationship between Parent and Child Nodes. After analyzing your sample ,we came to know that Connector Collection is not created which causes the reported issue.

Ranjitha A.

Ranjitha Amirthalingam [Syncfusion]
Replied On November 5, 2015 04:43 AM UTC

Hi Stergios,

We considered this “Null reference exception with Connector Collection” as an issue and a support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.


Ranjitha A.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon