Multiple TimelineElements?

May 15, 2011 at 12:49 PM

I need to place multiple timelineelements in my player - however I don't really seem to be able to do this?

My current workaround is databinding the value of the second TimelineElement to the value of the first one - allowing me to have two visual timelines - however this doesn't allow me to scrub/change play position of the media element from the second timeline as it is not really "registrered" as a TimelineElement. If I try "make a part of player" option the second one works great, but then the first TimelineElement loses the capability of being able to control the media.

I am pretty sure it is because the TimelineElement is bound into the player by the Name property - any suggestions on what I could do?

May 16, 2011 at 11:37 AM

The SMFPlayer control only recognizes 1 TimelineElement, being the one named "TimelineElement". This control is hooked up to eventhandlers automatically by the SMFPlayer control. This means that you can't have two timeline controls out of the box. Maybe it can be done by subclassing the control and setup the eventhandlers for the second control from there ....

BUT ... the question is: why would you want 2 timelines? Isn't that very confusing for the end user?

May 16, 2011 at 11:58 AM

Thanks - that was my current conclusion as well .. I might have to look into doing the subclassing/eventhandler stuff if I can't find another workaround.

That's true - it would be confusing if both were to be shown at the same time - but they won't. I have a auto-hiding ControllerContainer with the standard TimelineElement in it. When the ControllerContainer is being hidden, a separate TimelineElement should be shown in the bottom of the player window (different styling - only a two pixel height progress bar with no thumb). Right now it works just fine with databindings and a "view-only" timeline, since when the mouse is moved - the normal (and scrub-able) ControllerContainer is shown anyways.. I however suspect I might need to implement a "dont-show-ControllerContainer" mode where I would then need to be able to navigate/scrub with the second TimelineElement.

Thanks for your input!

May 16, 2011 at 3:27 PM

I wouldn't do it like that. Just change the style of the timeline, maybe even with a storyboard. That's the way to do it with Silverlight.

May 16, 2011 at 3:51 PM

How will that work - the TimelineElement is located inside the ControllerContainer which is being hidden .. so I'm not really able to show it with any style changes unless I move it completely outside the ControllerContainer. This would however give me a lot of issues when trying to align the rest of the functioncontrols?

Or do you know a trick, I don't know ? ;)

May 16, 2011 at 6:36 PM

How about using states in the template of the control and setting the state when needed?

May 24, 2011 at 1:39 PM

Just tried it. I have a timeline like in the YouTube player. After some time the timeline transforms where the thumb disappears. I did this with the help of new Visual States in the slider control and setting that with behaviors in the template on certain triggers. No code, all XAML.


May 25, 2011 at 9:58 PM


just trying to make the same effect (no code behind) without success...would it be possible to share an example?


May 26, 2011 at 4:57 PM

Just wrote a blogpost explaining a few of the learnings with downloads of a sample project or just the resource-file. See


Sep 9, 2011 at 9:24 PM
Edited Sep 9, 2011 at 9:24 PM

HI I am migrating my video player from Expression Player to MMP and I find that i am not able to seek to a new position (the scrubber bar is disabled in normal mode). But i am able to use the scrubber bar in the full screen mode. But when i just added a player in a sample project i am able to use the scrubber bar, i am not sure what is stopping me from using it in my main application. Is there any setting that can disable. I am able to use other controls though.