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

No text wrapping required in the new telerik RadDiagram.

1 Answer 124 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Eugene
Top achievements
Rank 1
Eugene asked on 15 Oct 2014, 05:06 AM
There is an UI inconsistency of the RadDiagram between version 2013.1.220.45 and 2014.2.729.45.

The visual hierarchy of my application is roughly that RadDiagram has a ContentControl which contains a ListBox. And the ListBox has some Items as to show descriptions on it. (The ListBoxItem is just has a TextBlock to show the description.)

The problem is that in case of the old version (2013.1.220.45) the TextBlock doesn’t automatically wrap the text (a description) when it gets longer.
But it does with the new version (2014.2.729.45).

For the UI consistency of my application, it should not be allowed to wrap the text automatically.

The Snoop tool shows me that the TextWrapping property of the TextBlock is set to “Wrap” with Local as Value Source in case of the new version.
But the old one sets it to “NoWrap” with DefaultStyle as Value Source.

Any help would be appreciated.

1 Answer, 1 is accepted

Sort by
0
Accepted
Martin Ivanov
Telerik team
answered on 17 Oct 2014, 08:46 AM
Hi Eugene,

The reported behavior is caused by the fact that RadDiagram is setting the TextWrapping of the TextBlocks placed in its shapes internally. There is an attached property exposed for controlling the text wrapping. You can find it in the DiagramBehaviors class and the property is called TextWrapping.

<telerik:RadDiagramShape telerik:DiagramBehaviors.TextWrapping="NoWrap" />

In the older version (like 2013.1.220.45) this property was set directly on the text elements. On the other hand in the newer versions of our controls the property is set on the RadDiagramShapes and it is "inherited" by all its children TextBlocks elements.

I hope this helps.

Regards,
Martin
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Diagram
Asked by
Eugene
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or