Events with different Styles

Dec 15, 2011 at 8:45 PM

I noticed that the Style for the TimelineEvents is defined on the level of the TimelineBand. For a customer requirements I would like to give TimelineEvents different border colors based on some criteria. With the current approach that does not seem to be possible.

Do you see a way how TimelineEvents on the same TimelineBand could have different Styles?

Thank you


Dec 16, 2011 at 4:25 PM

Yes, TimelineDisplayEvent should have necessary visual information (color in your case), I think to make it generic this should be some sort of delegate which assigns object VisualInfo property (this is object type property). Now, as you have it in TimelineDisplayInfo, you can bind BorderBrush to TimelineDisplayEvent.VisualInfo.BorderBrush.

So, simple and generic solution would be:

- Add VisualInfo object property

- Create hook function (this hook should be for TimelineBand), function that customizes TimelineDisplayEvent every time new instance is created;

- Create custom style for TimelineEvent and bind border color to VisualInfo.YourPropertyNameBrush

Makes sense?

Jan 11, 2012 at 8:05 AM

I implemented the proposed solution and submitted the changes.

Please verify the changes and let me know if you prefer to do it different. For people that do not need this, there should be no impact.

Thank you


Jan 17, 2012 at 10:48 PM

Looks good to me. Thanks!