private void LoadFromXML_Click(object sender, RoutedEventArgs e) { DS_XML file = new DS_XML(); var listFigur = file.Load(); foreach (myFigure fgg in listFigur) { this.canvas1.Children.Add(fgg); } }
private void SavetoXML_Click(object sender, RoutedEventArgs e) { var fg = canvas1.Children.OfType<myFigure>().ToList(); DS_XML file = new DS_XML(); file.Save(fg); }