public NodeListViewModel(string windowName) : base(windowName) { foreach (var t in Frame.MainFrameData.GetOneElementAllContent("Parameters", windowName)) { nodeList.Add(NodeViewModelBase.GetNodeViewModel(t)); } }
void CreateNode(string elementType, Point p) { Console.WriteLine("CreateNode"); string TestNodeName = allNodes.Count.ToString(); NodeModelBase nodeModel = NodeModelBase.GetNodeModel(TestNodeName, elementType); DiagramItem node = NodeViewModelBase.GetNodeViewModel(nodeModel).GetCompleteNode(); node.Width = 100; node.Height = 50; node.SetValue(Canvas.LeftProperty, p.X - 50); node.SetValue(Canvas.TopProperty, p.Y - 25); AddNode(TestNodeName, node); }