Event on mouse hover on a marker

Jan 29, 2010 at 12:58 PM

Hi,

 

When a user hover the mouse on a marker, i want catch this event.

Is it possible ?

 

Regards,

Guillaume

Coordinator
Jan 29, 2010 at 5:42 PM

Hello Guillaume,

This is not something that is supported out of the box in SMF right now however,  you could implement this feature by creating a custom Marker class.  I recommend following the "Creating Custom Timeline Markers" video on the home page to get an idea for how to do this.

Kevin.

Jan 29, 2010 at 8:14 PM

I created a custom Marker class like your video but i have one question :

 - Is it possible to create one custom class which have a visible representation ( like the yellow rectangle in your video) and a second custom class which is not visible ?

I need it to display and hide an ad banner.

 

Guillaume

Coordinator
Jan 29, 2010 at 10:33 PM

Guillaume,

It sounds like what you want is to do is make a Marker invisible based on some data about the marker.  My recommendation:

-Subclass the MarkerControl class

-Add 2 Visual States (Visible/Invisible)

-Inside your MarkerControl class switch to the Invisible visual state based on the Marker it is bound to

-In Blend make your MarkerControl class invisible when the VisualState is Invisible

-Change the DataTemplate of the MarkersElement (inside the Scrubber template) to instantiate your custom MarkerControl class instead of MarkerControl

I think that ought to do it but let me know if you have any trouble.

Kevin.

Feb 3, 2010 at 11:23 AM
Edited Feb 3, 2010 at 12:45 PM

Hello Kevin,

 

I tried your recommendation but i can't do the bind between my sub MarkerControl class and my Marker class.

In my CustomMarker class i have a property which is setted at the instantiating, but with that property i can't access and change the state of my MarkerControl class.

 

Can you help me ?

Guillaume

 

Coordinator
Feb 5, 2010 at 9:16 PM

If you can attach an example project demonstrating the challenges you are having I will try to find a solution.