public async Task CreateLinkedNode(CategoryItem MainGridItem) { var nodesContainer = await HostControl.GetNodesContainer(MainGridItem, false); if (nodesContainer == null) { throw new InvalidOperationException("nodesContainer is null"); } var nodeType = typeof(CodeDomNode.Particle.ParticleSystemControl); var node = nodesContainer.NodesControl.AddOrigionNode(nodeType, new CodeDomNode.Particle.ParticleSystemControlConstructionParams(), 50, 50); node.IsDeleteable = false; node.HostNodesContainer = nodesContainer.NodesControl; MainGridItem.AddInstanceNode(nodesContainer.NodesControl.GUID, node); }