Skip to content

[Featur] Add IsTextTrimmed property to TextBlock #21162

@Tirehar

Description

@Tirehar

Is your feature request related to a problem? Please describe.

Avalonia's TextBlock supports trimming text with an ellipsis, but there's no built-in way to know if trimming actually occurred. Without this, it's hard to conditionally show a tooltip or trigger other UI behaviors only when text is clipped.

Describe the solution you'd like

Add a readonly IsTextTrimmed property to TextBlock that returns true when the text is trimmed due to layout constraints.

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions