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

How to change the Milestone background color

1 Answer 78 Views
GanttView
This is a migrated thread and some comments may be shown as answers.
Jacky
Top achievements
Rank 1
Jacky asked on 15 Aug 2017, 10:34 PM

I can change the GanttTask item's background color by set its background property. but when I set the task to milestone. it didn't work. it shows original theming color.

How to change the Milestone background color?

 

Thanks,

-Jacky

 

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 18 Aug 2017, 02:36 PM
Hi Jacky,

You could change the Background of the Milestone by creating an implicit style for the MilestoneContainer since changing the task type, changes its container as well:
<Style BasedOn="{StaticResource MilestoneContainerStyle}" TargetType="gantt:MilestoneContainer">
  <Setter Property="Background" .... />

The gantt namespace is  xmlns:gantt="clr-namespace:Telerik.Windows.Controls.GanttView;assembly=Telerik.Windows.Controls.GanttView"

Note that if you are using Implicit styles with noXAML assemblies (merging resources in App.xaml), you need the BasedOn to have the rest of the style applied (control template, borders, sizes, etc.).

If you are using XAML-included assemblies with StyleManager, you would need to remove the BasedOn property from the Style. 

Regards,
Martin
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
GanttView
Asked by
Jacky
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or