Customise RadDiagramTextShape Text Alignment

3 posts, 0 answers
  1. Robbie
    Robbie avatar
    5 posts
    Member since:
    Mar 2012

    Posted 18 Nov 2013 Link to this post

    RadDiagramTextShape seems to only centre its text content.  Is it possible to change the alignment to include either: left, right or stretch?
    The control doesn't seem to respond to the HorizontalContentAlignment or even the HorizontalAlignment property.

    Can anyone help me please?



  2. Stefan
    Admin
    Stefan avatar
    89 posts

    Posted 21 Nov 2013 Link to this post

    Hi Robbie,

    If you want to edit the alignment of the RadDiagramTextShape's content you have to edit its ControlTemplate. On the other hand if you use implicit styles you can edit only the xaml file from which you get the RadDiagramTextShape's style.

    I attached a sample project where I have extracted the RadDiagramTextShape's style in order to show you the first mentioned approach. On line 152 in the XAML file there are the HorizontalAlignment and VerticalAlignment properties which you need to change in order to manipulate the alignment of the RadDiagramTextShape's content.

    Regards,
    Stefan
    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. Chris
    Chris avatar
    10 posts
    Member since:
    Aug 2010

    Posted 25 Nov 2013 Link to this post

    Thankyou for such a prompt reply!  I will try this very soon

Back to Top