Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Suggestion] TextBlockAttach.AutoTooltip should not change the TextTrimming property #827

Closed
GF-Huang opened this issue May 12, 2021 · 2 comments

Comments

@GF-Huang
Copy link
Member

ctl.TextTrimming = TextTrimming.WordEllipsis;

It will overwrite the user defined TextTrimming, in my case it will overwrite my CharacterEllipsis to WordEllipsis.


TextTrimming.WordEllipsis

image


TextTrimming.CharacterEllipsis

image

@NaBian
Copy link
Member

NaBian commented May 24, 2021

you are right

@NaBian NaBian closed this as completed in c9fb7a2 May 26, 2021
@GF-Huang
Copy link
Member Author

GF-Huang commented Sep 24, 2021

@NaBian 没看懂加了 CalcTextWidth(textBlock) > width 这个判断有什么意义:

if(textBlock.RenderSize.Width > width || textBlock.ActualWidth < width || CalcTextWidth(textBlock) > width)

去掉 CalcTextWidth(textBlock) > width 之后反而正常,不去掉的话,某些情况下明明可以足够显示完整的文本还是弹出 Tooltip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants