If one subscribes to the TimelineItemElementCreating and provides custom item elements for the timeline these elements are not used and default item elements are used instead.
WORKAROUND:
Create a custom element provider:
public class CustomGanttViewTimelineElementProvider : GanttViewTimelineElementProvider
{
public CustomGanttViewTimelineElementProvider(GanttViewGraphicalViewElement owner)
: base(owner)
{ }
public override IVirtualizedElement<GanttViewTimelineDataItem> CreateElement(GanttViewTimelineDataItem data, object context)
{
GanttViewTimelineItemElement element = this.OnItemElementCreating(data);
if (element != null)
{
return element;
}
return new GanttViewTimelineItemElement(data, this.Owner);
}
}
and assign it to the timeline container element provider:
this.radGanttView1.GanttViewElement.GraphicalViewElement.TimelineContainer.ElementProvider = new CustomGanttViewTimelineElementProvider(this.radGanttView1.GanttViewElement.GraphicalViewElement);