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

How to style Relation Arrow in GanttView

1 Answer 82 Views
GanttView
This is a migrated thread and some comments may be shown as answers.
Premkumar
Top achievements
Rank 1
Premkumar asked on 24 Jan 2018, 11:10 AM

Hi Progress Telerik,

I would like to change the look of the Relation Arrow between tasks. Is there any way to style the relation arrow in GanttView? Please provide the solution to achieve the same.

 

Thanks and Regards,

Muhammad Azhar Shah

MSC Technology

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 29 Jan 2018, 08:30 AM
Hello,

You can find the style and extract the template for the RelationContainer in the theme you are using. In it you can find an EndArrowHost grid with the paths with different colors which you can change. The foreground of the style should be the one responsible for the color of the line and the normal arrow. However, I strongly advice against changing the margins (Margin, SummaryContainerMargin, MilestoneContainerMargin) as they might break the appearance of the connections. If you want to change only the color, you can create an implicit style for the RelationContainer and change its foreground.

<!-- xmlns:gantt="clr-namespace:Telerik.Windows.Controls.GanttView;assembly=Telerik.Windows.Controls.GanttView" -->
<Style BasedOn="{StaticResource RelationContainerStyle}" TargetType="gantt:RelationContainer">
   <Setter Property="Foreground" Value="your custom brush" />
</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
Premkumar
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or