Connector Content/Text overlaps connector line

4 posts, 1 answers
  1. Andrew
    Andrew avatar
    15 posts
    Member since:
    Apr 2013

    Posted 01 Sep 2014 Link to this post

    The documentation shows Content/Text changing the color of the connector line (greying it out)

    http://www.telerik.com/help/silverlight/media/RadDiagram_Features_Connection_UIControls.png

    However in the online demos this does not occur.

    Is this a special property that needs to be switched on, rather than default behavior?
  2. Answer
    Zarko
    Admin
    Zarko avatar
    755 posts

    Posted 02 Sep 2014 Link to this post

    Hello Andrew,
    Our default connection style is not like the one showed on the picture but you can easily change this with a custom connectionTemplate:
    <telerik:RadDiagram.ConnectionTemplate>
        <DataTemplate>
            <Grid >
                <Border Background="White" Opacity="0.7" />
                <TextBlock Text="{Binding }" />
            </Grid>
        </DataTemplate>
    </telerik:RadDiagram.ConnectionTemplate>
    I hope I was able to help you and if you have more questions feel free to ask.

    Regards,
    Zarko
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. DevCraft banner
  4. Andrew
    Andrew avatar
    15 posts
    Member since:
    Apr 2013

    Posted 13 Oct 2014 in reply to Zarko Link to this post

    Great, thanks. FWIW I used a slightly different style to get the same effect

    <DataTemplate x:Key="contentTemplateConnection">
                    <Border Background="White" Opacity="0.7" >
                    <TextBlock Text="{Binding Content}" FontSize="14"
                                    FontWeight="Bold"
                                    Foreground="Black"/>
                    </Border>
                </DataTemplate>
                <Style TargetType="telerik:RadDiagramConnection" x:Key="ConnectionStyle">
                    <Setter Property="TargetCapType" Value="Arrow1Filled" />
                    <Setter Property="StrokeThickness" Value="2" />
                    <Setter Property="ContentTemplate" Value="{StaticResource contentTemplateConnection}"/>
                    <Setter Property="EditTemplate" Value="{StaticResource editTemplate}"/>
                </Style>
  5. Zarko
    Admin
    Zarko avatar
    755 posts

    Posted 14 Oct 2014 Link to this post

    Hello Andrew,
    I'm glad I was able to help you. As for your code - yes this is another way to achieve the same thing and the only difference is that the ConnectionTemplate property of the RadDiagram is with higher priority than the style setter. This means that if your diagram has a ConnectionTemplate it will be applied.
    If you have more questions feel free to ask.

    Regards,
    Zarko
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top