开发者

WPF TextBlock custom wrapping : on the left and after a "."

I'm trying to display a text that would be wrapped on the left and only after special characters in the string.

I Hope the first part could be done in XAML, and I'm pretty sure the second part cannot.

The aim is to wrap a text this 开发者_高级运维way :

- Original text : "Object1.Object2.Object3.Property1"

- Wrapped text could be (depending on the width available for the text):

- - "....Object2.Object3.Property1"

- - "....Object3.Property1"

- - "....Property1"

Do you know anyway to do that? I tried to use the TextBlock "TextWrapping" and "TextTrimming" properties, without success.

Thank you for your answers


You cannot do that with TextWrapping nor another WPF property. Instead you can write a custom converter and send the width of textblock as a binding parameter.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜