wpftextcharacterellipsistrim

how to add CharacterEllipsis at the beginning of the textblock in wpf?


I have a TextBlock with TextTrimming = TextTrimming.CharacterEllipsis and I want the dots to appear at the beginging. Is there a property for this?

For example if I have the text "123456789ABCDEF" it is displayed "12345678...", but I want it "...89ABCDEF".

Thanks


Solution

  • I had a go at messing about with FlowDirection, it renders the ... at the beginning but still started with 1234 etc.

    I did however come across this very similar question:

    Ellipsis at start of string in WPF ListView

    Someone there has a routine to do it manually. Hope that helps :)