This sample demonstrate How to generate Layout with DataSource as NodeViewModel instead of business object class.
WPF Diagram (SfDiagram) can be populated with the nodes and connectors based on the information provided from an external data source. The DataSource property is used to define the data source either as a collection of any business objects or collection of Nodes. Here, diagram is generated as layout with DataSource as NodeViewModel.
Documentation: https://help.syncfusion.com/wpf/diagram/automatic-layouts#hierarchical-tree-layout
To run this application, you need to have the below two in your system
- Visual Studio 2019
- Syncfusion.SfDiagram.WPF nuget package. To install the package using NuGet Package Manager, refer this link.
- To debug the sample and then run it, press F5 or select Debug > Start Debugging. To run the sample without debugging, press Ctrl+F5 or selectDebug > Start Without Debugging.
KB article - Hierarchical Tree with datasource as nodeviewmodel sample