As the desired scenario is a bit complex, it took us some time to investigate whether it is possible and prepare a sample project ( please find the project attached ).
In order to add containers to the TimeRuler part of the RadGanttView we should:
1) Create a custom IEventInfo that contains the relevant information about the new container we want to add. In our case these are the MilestoneMarkerEventInfo
( for the timeline container ) and the TimeRulerMilestoneTickInfo
( for the timeruler container ).
2) Create the custom containers that we want to add and add styles for them:
( the container added in the timeline area - it represents a red vertical rectangle )
( the container added in the time ruler part - it contains a TextBlock with the GanttTask Title )
( the other container in the timeruler part that will contains a white rectangle and represents the blank part of the timeruler area)
3) Create a Custom ContainerSelectors and in the overriden GetContainerType return the corresponding containers based on the received IEventInfos - the CustomTimeLineVisualizationBehavior
and the TimeRulerMilestoneBehavior
4) Create custom DefaultGanttTimeLineVisualizationBehavior ( CustomTimeLineVisualizationBehavior
) and DefaultTimeRulerVisualizationBehavior( TimeRulerMilestoneBehavior
) that answer for generating the correct IEventInfos for each GanttTask.
As the desired scenario is that the vertical lines descent to the Milestone GanttTask and do not continue down we had to create a CustomGanttTask and include a property Order that holds on which row the corresponding GanttTask is located ( see SoftwarePlanning.CalculateOrders method ). We need this property as in the CustomTimeLineVisualizationBehavior we have no information where the HierarchicalItem is positioned - before or after the milestone.
Note that if reorder of tasks is available in your application - you should also recalculate the Order property each time a reorder is performed.
Hopefully this clarifies things better and that the proposed solution is suitable for your scenario.
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.