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

Connector Content/Text overlaps connector line

3 Answers 90 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 01 Sep 2014, 05:17 PM
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?

3 Answers, 1 is accepted

Sort by
0
Accepted
Zarko
Telerik team
answered on 02 Sep 2014, 11:26 AM
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.
 
0
Andrew
Top achievements
Rank 1
answered on 14 Oct 2014, 01:23 AM
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>
0
Zarko
Telerik team
answered on 14 Oct 2014, 03:18 PM
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.

 
Tags
Diagram
Asked by
Andrew
Top achievements
Rank 1
Answers by
Zarko
Telerik team
Andrew
Top achievements
Rank 1
Share this question
or