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

Text Alignment

3 Answers 182 Views
Diagram, DiagramRibbonBar, DiagramToolBox
This is a migrated thread and some comments may be shown as answers.
Valentino
Top achievements
Rank 1
Valentino asked on 24 Aug 2017, 12:02 AM

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.

3 Answers, 1 is accepted

Sort by
0
Valentino
Top achievements
Rank 1
answered on 24 Aug 2017, 12:09 AM
I'd like this right or left alignened. Maybe I've missed something obvious.
0
Accepted
Dimitar
Telerik team
answered on 24 Aug 2017, 10:14 AM
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.
0
Valentino
Top achievements
Rank 1
answered on 24 Aug 2017, 11:00 PM
Thanks, that worked for me.
Tags
Diagram, DiagramRibbonBar, DiagramToolBox
Asked by
Valentino
Top achievements
Rank 1
Answers by
Valentino
Top achievements
Rank 1
Dimitar
Telerik team
Share this question
or