No text wrapping required in the new telerik RadDiagram.

2 posts, 1 answers
  1. Eugene
    Eugene avatar
    2 posts
    Member since:
    Oct 2012

    Posted 15 Oct 2014 Link to this post

    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.
  2. Answer
    Martin Ivanov
    Martin Ivanov avatar
    1406 posts

    Posted 17 Oct 2014 Link to this post

    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.


    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.

Back to Top