Articles in this section
Category / Section

Why save and load functionality for nodes and connectors in Blazor Diagram?

2 mins read

In Blazor Diagram, it is crucial to bind the Nodes and Connectors properties at the tag level to ensure proper saving and loading of the diagram. If these properties are not bound, an empty diagram will be displayed upon loading.

To achieve proper synchronization, you need to utilize two-way binding, denoted by @bind, for both nodes and connectors. This guarantees that any changes to these properties are correctly reflected in the diagram’s state.

Code snippet:

<SfDiagramComponent @ref="@diagram" Height="500px" Width="500px" @bind-Connectors="@connectors" @bind-Nodes="NodeCollection"></SfDiagramComponent>

To learn more about save and load functionality, refer to the following link:
https://blazor.syncfusion.com/documentation/diagram/serialization#two-way-binding

You can download the complete working sample from here.

Conclusion

We hope you enjoyed learning about the importance of save and load functionality for nodes and connectors in Blazor Diagram.

You can refer to our Blazor Diagram feature tour page to learn about its other groundbreaking features, documentation, and how to quickly get started with configuration specifications. You can also explore our Blazor Diagram example to understand how to create and manipulate data.

For current customers, our Blazor components are available on the License and Downloads page. If you are new to Syncfusion®, you can try our 30-day free trial to evaluate our Blazor Diagram and other Blazor components.

If you have any questions or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied