Text Alignment

4 posts, 1 answers
  1. Valentino
    Valentino avatar
    28 posts
    Member since:
    Aug 2017

    Posted 23 Aug 2017 Link to this post

    I have diagram elements that are just text, and I noticed there's a RadDiagramTextShape so I'm using that. What I'm wondering is how to set the text alignment within the bounds. Currently the text is always centered, but I'd like to set it to Left or Right also. I've seen HorizontalAlignment and HorizontalContentAlignment properties but that's the closest I could find.

    Thanks.

  2. Valentino
    Valentino avatar
    28 posts
    Member since:
    Aug 2017

    Posted 23 Aug 2017 in reply to Valentino Link to this post

    I'd like this right or left alignened. Maybe I've missed something obvious.
  3. Answer
    Dimitar
    Admin
    Dimitar avatar
    2903 posts

    Posted 24 Aug 2017 Link to this post

    Hi Valentino,

    You need to set the TextAlignment of the DiagramShapeElement:
    shape1.DiagramShapeElement.TextAlignment = ContentAlignment.TopRight;

    I hope this will be useful. 

    Regards,
    Dimitar
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  4. Valentino
    Valentino avatar
    28 posts
    Member since:
    Aug 2017

    Posted 24 Aug 2017 in reply to Dimitar Link to this post

    Thanks, that worked for me.
Back to Top