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

Customise RadDiagramTextShape Text Alignment

2 Answers 25 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Robbie
Top achievements
Rank 1
Robbie asked on 18 Nov 2013, 09:56 AM
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 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 21 Nov 2013, 08:47 AM
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 >>
0
Chris
Top achievements
Rank 1
answered on 26 Nov 2013, 05:32 AM
Thankyou for such a prompt reply!  I will try this very soon

Tags
Diagram
Asked by
Robbie
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Chris
Top achievements
Rank 1
Share this question
or