You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TextBlock TextTrimming=CharacterEllipsis with TextWrapping=Wrap and MaxLines="2" does not always show ellipsis
To Reproduce
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="MultiLineTextTrimmingBug.MainWindow"
Title="MultiLineTextTrimmingBug">
<TextBlock Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
TextWrapping="Wrap"
TextTrimming="CharacterEllipsis"
MaxLines="2" />
</Window>
Expected behavior
TextBlock TextTrimming=CharacterEllipsis with TextWrapping=Wrap show ellipsis when needed
Avalonia version
11.1.5, 11.2.2
OS
Windows, macOS
Additional context
The text was updated successfully, but these errors were encountered:
In WPF there is no MaxLines but tested with LineHeight/MaxHeight and it works correctly:
<TextBlock Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
TextWrapping="Wrap"
TextTrimming="CharacterEllipsis"
LineHeight="24"
MaxHeight="48" />
<!-- MaxLines="2" is done using LineHeight/MaxHeight -->
Describe the bug
TextBlock TextTrimming=CharacterEllipsis with TextWrapping=Wrap and MaxLines="2" does not always show ellipsis
To Reproduce
Expected behavior
TextBlock TextTrimming=CharacterEllipsis with TextWrapping=Wrap show ellipsis when needed
Avalonia version
11.1.5, 11.2.2
OS
Windows, macOS
Additional context
The text was updated successfully, but these errors were encountered: