client/src/Iri.Modernisation.Controls/View/BookTimeLine/BookTimeLine.xaml.cs
changeset 18 66911d0f0eb6
parent 7 de7ba61f66c7
child 24 c031f1132dde
--- a/client/src/Iri.Modernisation.Controls/View/BookTimeLine/BookTimeLine.xaml.cs	Thu Dec 03 16:05:57 2009 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/BookTimeLine/BookTimeLine.xaml.cs	Mon Dec 07 10:36:55 2009 +0100
@@ -35,6 +35,7 @@
         {
             BookTimeLineVM VM = (BookTimeLineVM)DataContext;
             BookTimeLineElementPanel.Children.Clear();
+            BookTimeLineAnnotationPanel.Children.Clear();
             foreach (List<SegmentIndex> LIndex in VM.SegmentIndex)
             {
                 foreach (SegmentIndex Index in LIndex)
@@ -45,6 +46,7 @@
                     pol.SetValue(Canvas.ZIndexProperty, 10);
                     pol.DataContext = new PolemicElementVM(Index);
                     BookTimeLineElementPanel.Children.Add(pol);
+                  
                     Canvas.SetLeft(pol, (Index.TimerIn.TotalMilliseconds * ScaleTimeLine.Value) / VM.TotalDuration);
                     pol.Width = (Index.Duration.TotalMilliseconds * ScaleTimeLine.Value) / VM.TotalDuration;
                 }
@@ -57,7 +59,7 @@
                     PolemicElementControl pol = new PolemicElementControl();
                     pol.SetValue(Canvas.ZIndexProperty, 10);
                     pol.DataContext = new PolemicElementVM(Annotation);
-                    BookTimeLineElementPanel.Children.Add(pol);
+                    BookTimeLineAnnotationPanel.Children.Add(pol);
                     Canvas.SetLeft(pol, (Annotation.TimerIn.TotalMilliseconds * ScaleTimeLine.Value) / VM.TotalDuration);
                     Canvas.SetTop(pol, basi);
                     basi += 10;