Question

I'm currently working on a program that sends data to an external device based on how the user animates a 3d model of that device in my software. I'm using C# WPF MVVM and now I'm trying to create a set of controls that allow me to create a timebar similar to the ones known from programs like Adobe After Effects / Flash or other products.

I started out by creating a Timebar Control inheriting from ContentControl that will contain a display of current time along the bar and the time "scroller" and below that a Stackpanel which shall then contain Timestrips to represent the value of each property that can be animated.

I have created one or two controls and read a few tutorials on codeproject and wpftutorials on that matter already, but I still lack quite a bit of understanding on how all the different parts (class, template, style) etc. work together. I also looked at some Timebar WPF Controls but they weren't quite what I was looking for and I'm having a hard time understanding their code.

The point I'm stuck on now is how do I get the Timestrips defined as sub-elements of the Timebar in XAML to be displayed in the StackPanel that I defined in the Timebar's ControlTemplate?

I don't really have any code yet except a very basic ControlTemplate of the TimeStrip but that really just contains the Stackpanel. When its completed I want to be able to create a Timebar like this

<Controls:Timebar ... >
    <Controls:Timestrip ... />
    <Controls:Timestrip ... />
</Controls:Timebar>

As well as from the code behind.

No correct solution

OTHER TIPS

You can look at the code for this one--it is an open source timeline control for WPF. I have used it before and it is pretty nice.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top