Skip to content

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

Closed

Description

@GF-Huang

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

Activity

  1. NaBian commented on May 24, 2021

    @NaBian
    Member

    you are right

  2. GF-Huang commented on Sep 24, 2021

    @GF-Huang
    MemberAuthor

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

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

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

  3. added a commit that references this issue on Mar 28, 2024
    c9fb7a2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ 换网址