Click Events - WPF Timeline Control

Feb 21, 2012 at 6:35 PM
Edited Feb 21, 2012 at 6:36 PM

Is there anyway to know when an event has the mouse down occur?

I am using the WPF timeline control and the only event i can when adding an event is the Propertychanged event.

If this requires editing the actual source does anybody have the wpf control compiled with this event already implemented? 


Feb 23, 2012 at 6:22 PM

subscribe to events you need using these 2 events of TimelineTray:

        public event TimelineEventDelegate              OnEventCreated;
        public event TimelineEventDelegate              OnEventDeleted;


Feb 23, 2012 at 7:05 PM

OK thanks. So these events should fire when you click on an event in the timeline?

Feb 24, 2012 at 8:21 PM

They fire when event is created (meaning it is in, or close, to visible area), and when it is destroyed (meaning it is off the visible area). You can += / -= any even, you interested in, from these events.

Mar 14, 2012 at 3:10 PM
Edited Mar 14, 2012 at 3:56 PM

Thanks for the reply.. I was able to get the mouse down event working but i was unable to cast back to get the id of the timelinedisplayevent that was clicked.

This is the code that i am using to get the mouse down event working when a timeline event is clicked:



addhandler mytimeline.oneventcreated, addressof myeventcreated

Private sub myeventcreated(byval element as frameworkelement, de as timeline displayevent)

Addhandler element.mouseleftbuttonup, addressof individualeventclicked

end sub

Private sub individualeventclicked

'This fires when i click on a timeline event but i cant seem to get hold of the timelineevents id (or anything for that matter).
End Sub


Is there a way to get to the or description from here?





I found that this would get me the timelineevent id = 


Dim temp1 = Directcast(sender, Grid)
Dim temp2 = temp1.datacontext
Dim myid =

Is this the correct way to do it or is there a better way?


thanks again.

Mar 14, 2012 at 6:32 PM

de is of TimelineDisplayEvent type and it has property Event which give you access to original even which has Id, etc. Let me know. Also DataContext of element should also be set to TimelineDisplayEvent.