BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
Hi,
The sample code provided in documentation for adding nodes from code is as follows:
NodeViewModel node = new NodeViewModel()
{
// Unique Guid for NodeViewModel
ID=Guid.NewGuid()
};
nodes.Add(node);
diagramcontrol.Nodes = nodes;
How do I add nodes through code in the diagram builder sample for below source code?
http://www.syncfusion.com/downloads/support/forum/116072/DiagramBuilder_modified_e8901a9c.zip
Hi,
The sample code provided in documentation for adding nodes from code is as follows:
NodeViewModel node = new NodeViewModel()
{
// Unique Guid for NodeViewModel
ID=Guid.NewGuid()
};
nodes.Add(node);
diagramcontrol.Nodes = nodes;
How do I add nodes through code in the diagram builder sample for below source code?
http://www.syncfusion.com/downloads/support/forum/116072/DiagramBuilder_modified_e8901a9c.zip
Adding points to the above post
In StencilView.xaml there is a data template called "SansStar".
How to programmatically add node "SansStar" using code in the Diagram Control as mention in the link (http://help.syncfusion.com/UG/winrt/Documents/nodes.htm)?
http://www.syncfusion.com/downloads/support/forum/116072/DiagramBuilder_modified_e8901a9c.zip
Hi Madhu,
As you requested we have modified the sample. We can add nodes, groups and connections to DiagramVM.Nodes, DiagramVM.Groups and DiagramVM.Connectiosn respectively. We have added two nodes to DiagramVM.Nodes collections in DiagramVM constructor. And also we have added one resource dictionary named NodeTemplates, in which we have added node styles and templates, which in turn applied to nodes. For more information kindly refer the modified sample from attachment.
As Madhu requested we have added one node with SansStar data template applied, by adding those templates in NodeTemplates resource dictionary.
As Alaguraja requested, we have shown how to add nodes in code behind. Kindly refer the DiagramVM constructor from DiagramVM.cs file
Regards,
Parthiban