This is a migrated thread and some comments may be shown as answers.

Diagram ItemNodes Example

1 Answer 73 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Joel Palmer
Top achievements
Rank 2
Joel Palmer asked on 20 May 2014, 11:53 PM
I'm sorry to say this but, your documentation is lacking for the Diagram.  I start an example but it doesn't give me enough to actually get any success.

From your documentation, I created the following class.  Can you please tell me how I would link all of the nodes created in the loop to the baseN node?  Linking is not covered in this scenario and I can't find documentation or examples on the ObservableGraphSourceBase to understand it:
public class ItemNodes :
    ObservableGraphSourceBase<NodeViewModelBase,
        LinkViewModelBase<NodeViewModelBase>>
{
    public ItemNodes()
    {
        ItemNode baseN = new ItemNode("Base");
        this.AddNode(baseN);
 
        for (int i = 0; i < 10; i++)
        {
            ItemNode n1 = new ItemNode(String.Format("Item {0}", i));
            this.AddNode(n1);
            this.CreateLink(baseN, n1);
        }
    }
 
    public override void AddNode(
        NodeViewModelBase node)
    {
        if (!(node is ItemNode))
        {
            node = new ItemNode("New Item!");
        }
 
        base.AddNode(node);
    }

1 Answer, 1 is accepted

Sort by
0
Joel Palmer
Top achievements
Rank 2
answered on 21 May 2014, 05:54 PM
Never mind.  I found this link with helpful examples.

https://github.com/telerik/xaml-sdk
Tags
Diagram
Asked by
Joel Palmer
Top achievements
Rank 2
Answers by
Joel Palmer
Top achievements
Rank 2
Share this question
or