This is a migrated thread and some comments may be shown as answers.

Setting background color on summary tasks

3 Answers 173 Views
GanttView
This is a migrated thread and some comments may be shown as answers.
Anne Lyon
Top achievements
Rank 1
Anne Lyon asked on 06 Sep 2013, 08:08 AM
I need to be able to set the background color for summary tasks in my Gantt Diagram. The below code sets the color on the child-tasks fine, see attached screenshot, but how do I change the color for the summary tasks (green ones)?
,
<telerik:RadGanttView.Resources>
    <Style TargetType="telerik:EventContainer">
        <Setter Property="Background" Value="Yellow" />
    </Style>
</telerik:RadGanttView.Resources>

Anne

3 Answers, 1 is accepted

Sort by
0
Polya
Telerik team
answered on 10 Sep 2013, 09:57 AM
Hi Anne Lyon,

In order to change the background color of the summary tasks you have to change the SummaryContainer style.
<Style TargetType="telerik:SummaryContainer">
    <Setter Property="Background" Value="Green"/>
</Style>

You can find more information on styling and templating the RadGanttView in this article.

Hopefully this helps. Feel free to contact us in case you have any problems or concerns.

Regards,
Polya
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Anne Lyon
Top achievements
Rank 1
answered on 11 Sep 2013, 08:38 AM

Thanks,

That changed the color of the bar of summary bars, but the "start-end tags" on the bars are now strangely enough orange. See the attached screenshot.

Actually, if I add the tag : <Style TargetType="telerik:SummaryContainer"> without setting any properties, all the summary bars change color to orange.

How can I set the background color for the whole summary bar including the triangle tags?

0
Anne Lyon
Top achievements
Rank 1
answered on 11 Sep 2013, 08:45 AM

Found the answer myself, If I let the SummaryContainer inherit from the SummaryContainerStyle then I get the expected result:

<telerik:RadGanttView.Resources>
    <Style TargetType="telerik:SummaryContainer" BasedOn="{StaticResource SummaryContainerStyle}">
        <Setter Property="Background" Value="HotPink" />
    </Style>
</telerik:RadGanttView.Resources>
Tags
GanttView
Asked by
Anne Lyon
Top achievements
Rank 1
Answers by
Polya
Telerik team
Anne Lyon
Top achievements
Rank 1
Share this question
or