Programmatic Events

May 5, 2010 at 11:16 PM

Hi,

Firstly, this is a great silverlight control!

Does the control / is there any plans to allow events to be added using code?  I don't want to create an XML fragment and save this to disk each time..

Also, when I use the control within a ChildWindow, it works the first time but if I then close the window and reopen it the events don't seem to be picked up. Is this a known issue?

 

Cheers

Coordinator
May 5, 2010 at 11:38 PM

You can add events from code using ClearEvents/ResetEvents methods. If you found issue with ChildWindow please create issue and attach sample project. Thanks!

May 6, 2010 at 11:57 AM

Hi,

 

Thanks; I did see those methods but found that when calling any of them I get an exception in TimelineTray.cs because there is no object assigned to m_mainBand at the point I'm trying to create the list of events.

What I'm trying to do is set the events using an XDocument object in the ChildWindow constructor.  The problem can be reproduced by trying to call timeline.ClearEvents() after the call to InitialiseComponent() in the silverlight project supplied with the source code.  At that point in time the "m_mainBand" object doesn't point to anything so it falls over in RefreshEvents( ).  I'm just not sure exactly when I can programatically set the events.  I also tried on the "Loaded" event but the same deal.

 

Cheers

Coordinator
May 6, 2010 at 3:49 PM
Try to use TimelineReady event. If this is not working please create issue and attach sample project.
May 12, 2010 at 1:08 PM

Hi,

Sorry I've been working on something else for a few days so not been able to try this.  I'm unable to find an event "TimelineReady".  On which object is this event?

Cheers

Coordinator
May 12, 2010 at 7:57 PM
It is on TimelineTray