Work on resize of the annotations
authorsarias
Thu, 24 Sep 2009 18:09:01 +0200
changeset 115 1e87bcfec117
parent 114 8262d9756231
child 116 42702f8fa007
Work on resize of the annotations
src/FingersDance.Control.TimeLine/UserControlTimeLine.xaml
src/FingersDance.Control.TimeLine/UserControlTimeLine.xaml.cs
src/FingersDance.Views/TimelineView.xaml
--- a/src/FingersDance.Control.TimeLine/UserControlTimeLine.xaml	Thu Sep 24 17:48:07 2009 +0200
+++ b/src/FingersDance.Control.TimeLine/UserControlTimeLine.xaml	Thu Sep 24 18:09:01 2009 +0200
@@ -780,6 +780,6 @@
 	<Grid x:Name="LayoutRoot" Width="Auto" Height="Auto" Background="{x:Null}">
 		<Custom:SurfaceSlider  Height="Auto" x:Name="slider" Value="0.5" Width="Auto" 
                                Thumb.DragStarted="sliderPosition_DragStarted" Thumb.DragCompleted="sliderPosition_DragCompleted" ContactTapGesture="slider_ContactTapGesture" Background="#19FFFFFF" Style="{DynamicResource FingersDance.Control.Slider}" />
-        <vw:TimelineView x:Name="tv" Margin="0,30,0,0"/>
+        <vw:TimelineView x:Name="tv" Margin="0,30,0,0" Width="{Binding Path=ActualWidth, ElementName=slider, Mode=Default}" Background="#FF69E32E"/>
     </Grid>
 </UserControl>
\ No newline at end of file
--- a/src/FingersDance.Control.TimeLine/UserControlTimeLine.xaml.cs	Thu Sep 24 17:48:07 2009 +0200
+++ b/src/FingersDance.Control.TimeLine/UserControlTimeLine.xaml.cs	Thu Sep 24 18:09:01 2009 +0200
@@ -196,7 +196,7 @@
             cutvm.AnnotList.Add(new AnnotationViewModel(new Annotation(180 + (numAnnot - 6) * 20 - ((numAnnot - 1) * annotWidth), 10, numAnnot.ToString())));
             tv.DataContext = null;
             tv.DataContext = cutvm;
-            numAnnot++;
+            numAnnot++; 
         }
 
 	}
--- a/src/FingersDance.Views/TimelineView.xaml	Thu Sep 24 17:48:07 2009 +0200
+++ b/src/FingersDance.Views/TimelineView.xaml	Thu Sep 24 18:09:01 2009 +0200
@@ -5,7 +5,7 @@
     >
     <Grid>
         <ListView DataContext="{Binding Path=AnnotList}"
-                  ItemsSource="{Binding}" Background="{x:Null}" BorderThickness="0" >
+                  ItemsSource="{Binding}" Background="{x:Null}" BorderThickness="0" x:Name="listview" >
 
             <ListView.ItemTemplate>
                 <DataTemplate>