--- a/src/FingersDance.Actions/ActionStartOrEndAnnotation.cs Thu Nov 19 15:35:46 2009 +0100
+++ b/src/FingersDance.Actions/ActionStartOrEndAnnotation.cs Thu Nov 19 18:37:26 2009 +0100
@@ -2,6 +2,16 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
+using System.IO;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Navigation;
+using System.Windows.Controls.Primitives;
using FingersDance.Control.TimeLine;
@@ -25,7 +35,15 @@
public ActionStartOrEndAnnotation(Object[] param)
{
- myTimeline = (UserControlTimeLine)param[0];
+ // The context param[0] is the userPanel, so we have to get the timeline's instance.
+ UserControl userPanel = (UserControl)param[0];
+ // Its content...
+ Grid o = (Grid)userPanel.Content;
+ // and the UserControlSyncSource within the grid...
+ UserControl syncSrc = (UserControl)((Grid)o.Children[1]).Children[0];
+ // and finally the timeline
+ myTimeline = (UserControlTimeLine)((Grid)((Grid)syncSrc.Content).Children[0]).Children[0];
+
_Text = (String)param[1];
}