text outside shapes

4 posts, 0 answers
  1. Manuel
    Manuel avatar
    32 posts
    Member since:
    Sep 2013

    Posted 30 Sep 2013 Link to this post

    Is there the ability to put the text outside his shape?
    Attached expected vs actual.
    Thanks
  2. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 30 Sep 2013 Link to this post

    Hi Manuel,

    You can create a ContentTemplate for the Content of a RadDiagramShape and apply custom Margin and Horizontal/VerticalAlignment settings to move the label of the shape outside its geometry. However, I'd recommend using text shapes instead. With the TextTool you can easily create labels and add them next to any DiagramItems - shapes or connection, in your diagramming structure.

    Please give the tool a try and let us know if it helps.

    Regards,
    Tina Stancheva
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Manuel
    Manuel avatar
    32 posts
    Member since:
    Sep 2013

    Posted 01 Oct 2013 Link to this post

    TextTool seems really powerful but doesn't fit my needs...
    Can you post a sample of the ContentTemplate solution?

  5. Manuel
    Manuel avatar
    32 posts
    Member since:
    Sep 2013

    Posted 02 Oct 2013 Link to this post

    in the end, this template works fine:


    <Canvas DataContext="{Binding Content}" ClipToBounds="False">
         <TextBlock Text="{Binding Label}" />
    </Canvas>

    Canvas & ClipToBounds="True" made the trick.
Back to Top