/// <summary> /// /// </summary> private FlowGraphControlViewModel() { Network = new NetworkViewModel(); }
/// <summary> /// A function to conveniently populate the view-model with test data. /// </summary> private void PopulateWithTestData() { // // Create a network, the root of the view-model. // this.Network = new NetworkViewModel(); // // // // Create some nodes and add them to the view-model. // // // var node1 = CreateNode("Node1", new Point(10, 10)); // var node2 = CreateNode("Node2", new Point(200, 10)); // // // // // Create a connection between the nodes. // // // var connection = new ConnectionViewModel(); // connection.SourceConnector = node1.Connectors[1]; // connection.DestConnector = node2.Connectors[3]; // // // // // Add the connection to the view-model. // // // this.Network.Connections.Add(connection); }