private void Cp_OnRemove(CustomParameter c)
        {
            if (graph != null)
            {
                graph.CustomParameters.Remove(c.Param);
            }

            Stack.Children.Remove(c);
        }
 void Populate()
 {
     foreach (var p in graph.CustomParameters)
     {
         CustomParameter cp = new CustomParameter(p);
         cp.OnRemove += Cp_OnRemove;
         Stack.Children.Add(cp);
     }
 }
 private void AddParam_Click(object sender, RoutedEventArgs e)
 {
     if (graph != null)
     {
         int    index           = graph.CustomParameters.Count;
         string name            = "Param" + index;
         GraphParameterValue gp = new GraphParameterValue(name, 0, "", NodeType.Float);
         graph.CustomParameters.Add(gp);
         CustomParameter cp = new CustomParameter(gp);
         cp.OnRemove += Cp_OnRemove;
         Stack.Children.Add(cp);
     }
 }