Ellipsis at start of string in WPF ListView

前端 未结 6 1899
野的像风
野的像风 2020-12-06 06:05

I have a WPF ListView (GridView) and the cell template contains a TextBlock. If I add: TextTrimming=\"CharacterEllipsis\" TextWr

6条回答
  •  南笙
    南笙 (楼主)
    2020-12-06 06:40

    You could try to use a ValueConverter (cf. IValueConverter interface) to change the strings that should be displayed in the list box yourself. That is, in the implementation of the Convert method, you would test if the strings are longer than the available space, and then change them to ... plus the right side of the string.

提交回复
热议问题