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

RadGanttView StartFinish arrow reversal

1 Answer 35 Views
GanttView
This is a migrated thread and some comments may be shown as answers.
Adam
Top achievements
Rank 1
Adam asked on 06 Aug 2015, 11:17 AM

Afternoon all.

I have read a recent post regarding the complexities of updating GanttTask dependancies when another GanttTask has changed (or been added, ect)...

I believe I have gotten around this by reversing the DependancyType and assigning the new Dependancy to the parent, rather that the child GanttTask.

 #

My question, however, is: How can I change the GanttView.xaml file's "EndArrow" Path so that it is on the opposite end of the PathData?

I have reversed the arrowhead here;

<Grid x:Name="EndArrowHost" Height="7" Margin="0 -3" Width="5" RenderTransformOrigin="1, .5">
    <Path x:Name="EndArrow" Data="M4.50,0.50 L0.50,3.51 L4.50,6.50 z" Fill="{TemplateBinding Foreground}" Stretch="None"/>
<!--Data="M0.50,0.50 L4.50,3.51 L0.50,6.50 z"-->
<Path x:Name="HighlightEndArrow"
Visibility="Collapsed"
Data="M0.50,0.50 L4.50,3.51 L0.50,6.50 z"
Fill="{StaticResource RelationContainerBorderBrush_Highlighted}"
Stretch="None"/>
</Grid>

1 Answer, 1 is accepted

Sort by
0
Polya
Telerik team
answered on 07 Aug 2015, 02:57 PM
Hello Adam,

In the current implementation of RadGanttView the EndArrow is measured and arranged internally and its position is always drawn at the end of the Relation. When making these calculations the FromTask's position is taken into account and considered as the start of the Relation container, whilst the EndArrow is drawn at the end of the Relation container.

If I understand correctly - you are creating a custom IDependency that has a StartToFinish DependencyType and uses the FromTask as a ToTask. However, this implementation will not affect the way the Relation containers are drawn: logically, the FromTask might be used as a ToTask, but when the visual elements are drawn it will still be considered as the start of the Relation container. Unfortunately, this behavior cannot be changed.

If, when adding a GanttTask, you only have information about its ToTask, I suggest creating a custom IDependency but instead of changing the DependencyType, you can add an additional property - ToTask and populate it (as well as the FromTask property) when creating your TasksSource. Then you can use it to search for the correct GanttTask to relate to the newly added GanttTask.

Hope this helps and is suitable for your scenario.

Regards,
Polya
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
GanttView
Asked by
Adam
Top achievements
Rank 1
Answers by
Polya
Telerik team
Share this question
or