Diagram ItemNodes Example

2 posts, 0 answers
  1. Joel Palmer
    Joel Palmer avatar
    164 posts
    Member since:
    May 2009

    Posted 20 May 2014 Link to this post

    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);
        }

  2. Joel Palmer
    Joel Palmer avatar
    164 posts
    Member since:
    May 2009

    Posted 21 May 2014 in reply to Joel Palmer Link to this post

    Never mind.  I found this link with helpful examples.

    https://github.com/telerik/xaml-sdk
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top