Displaying a connector label when using DataTemplates

3 posts, 1 answers
  1. kilhoffer
    kilhoffer avatar
    40 posts
    Member since:
    May 2007

    Posted 21 Feb 2012 Link to this post

    I'm using DataTemplates to build out my nodes, very similar to how it's done in the OrgChart example. I now need to have the connector lines to display a label. How is this done when using a template?
  2. Answer
    Miro Miroslavov
    Admin
    Miro Miroslavov avatar
    588 posts

    Posted 21 Feb 2012 Link to this post

    Hello,

     You can use the same approach as with the Shapes. First define your DataTemplate.

    <DataTemplate x:Key="ConnectionTemplate">
     <TextBlock Text="{Binding Text}" />
    </DataTemplate>

    and then just set it to the Diagram. 
    <telerik:RadDiagram x:Name="diagram" ConnectionTemplate="{StaticResource ConnectionTemplate}" />

    Hope this is what you need.

    Greetings,
    Miro Miroslavov
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. kilhoffer
    kilhoffer avatar
    40 posts
    Member since:
    May 2007

    Posted 21 Feb 2012 Link to this post

    Perfect. Thank you!
Back to Top