private void Add(object sender, RoutedEventArgs e) { if (MyList == null) return; PPLCG.MyString ms = new PPLCG.MyString(); MyList.Add(ms); MyString myString = new MyString(); myString.Init(ms); stackPanel1.Children.Add(myString); }
public void Init(List<PPLCG.MyString> myList) { MyList = myList; foreach(PPLCG.MyString ms in MyList) { MyString myString = new MyString(); myString.Init(ms); stackPanel1.Children.Add(myString); } }