RadGanttView StartFinish arrow reversal

2 posts, 0 answers
  1. Adam
    Adam avatar
    25 posts
    Member since:
    Mar 2012

    Posted 06 Aug 2015 Link to this post

    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"
    Data="M0.50,0.50 L4.50,3.51 L0.50,6.50 z"
    Fill="{StaticResource RelationContainerBorderBrush_Highlighted}"

  2. Polya
    Polya avatar
    267 posts

    Posted 07 Aug 2015 Link to this post

    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.

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