How to change the Milestone background color

2 posts, 0 answers
  1. Jacky
    Jacky avatar
    10 posts
    Member since:
    Feb 2017

    Posted 15 Aug 2017 Link to this post

    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?





  2. Martin
    Martin avatar
    121 posts

    Posted 18 Aug 2017 Link to this post

    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. 

    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.
Back to Top