public void Clear()
 {
     SelectedCurve = new Curve();
     Paint(true);
 }
        private void animationListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (e.AddedItems.Count != 1)
            {
                return;
            }
            Animation a = (Animation)e.AddedItems[0];

            Curve curve = new Curve(a.Name, a.points);
            curve.SaveChanges = () => SaveChanges();
            graph.SelectedCurve = curve;
            graph.Paint(true);
        }