Need solution for Text trimming Problem

Posted by Anshuman Khandelwal on Stack Overflow See other posts from Stack Overflow or by Anshuman Khandelwal
Published on 2010-04-13T07:20:43Z Indexed on 2010/04/13 7:23 UTC
Read the original article Hit count: 385

Filed under:

Hi Guys,

We are facing problem regarding Text trimming in TextBlock.

We have a Text "My very long label goes here" and we have to show it in following format:

[...g label goes here]

i.e right aligned and text should be trimmed from left (character ellipsis at left side)

We have used FlowDirection of TextBlock, ellipsis is correctly shown on the left side, but text is trimmed from the right side.

FlowDirection = "LeftToRight:"

[My very long lab...]

FlowDirection = "RightToLeft:"

[...My very long lab]

But we need:

[...g label goes here]

Please provide suggestions on this.

© Stack Overflow or respective owner

Related posts about wpf