Open abrull opened 5 years ago
Howdy @abrull. I can't seem to reproduce this with 1.46.0-dev.2340
. Do you have a screenshot?
Android:
UWP:
<Page
x:Class="App5.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:App5"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" Padding="48">
<Grid Background="Black">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="60"/>
<ColumnDefinition Width="120"/>
<ColumnDefinition Width="240"/>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0"
Foreground="Red"
Text="Extra long text"
MaxLines="1"
TextTrimming="WordEllipsis"
TextWrapping="WrapWholeWords"/>
<TextBlock Grid.Column="1"
Foreground="Orange"
Text="Extra long text"
MaxLines="1"
TextTrimming="WordEllipsis"
TextWrapping="WrapWholeWords"/>
<TextBlock Grid.Column="2"
Foreground="Yellow"
Text="Extra long text"
MaxLines="1"
TextTrimming="WordEllipsis"
TextWrapping="WrapWholeWords"/>
<TextBlock Grid.Column="3"
Foreground="Green"
Text="Extra long text"
MaxLines="1"
TextTrimming="WordEllipsis"
TextWrapping="WrapWholeWords"/>
<TextBlock Grid.Column="4"
Foreground="Blue"
Text="Extra long text"
MaxLines="1"
TextTrimming="WordEllipsis"
TextWrapping="WrapWholeWords"/>
<TextBlock Grid.Column="5"
Foreground="Violet"
Text="Extra long text"
MaxLines="1"
TextTrimming="WordEllipsis"
TextWrapping="WrapWholeWords"/>
</Grid>
</Page>
@ghuntley Hey, I reproduced the issue with version 1.46.0-dev.2340. Here is a screenshot..
The sample has MaxLines="1" so I don't think there's any wrapping involved. The property that comes into play is TextTrimming, Enum is WordEllipsis, CharacterEllipsis or None. Or an issue with textmeasurement in some devices or fonts. Is this issue only occuring with the last character? Is is possible to get it to display "lo..." instead of "lon..." ?
@MatFillion Sorry about that. Yeah the issue is with TextTrimming with WordEllipses and yes, it's possible to get it to break at any letter of the work given the width of the TextBlock. I updated the title and details of the issue and the version of Uno.UI that I used
@MatFillion also here is another issue related to MaxLines with a fixed Width => https://github.com/unoplatform/uno/issues/3714
Hello @abrull . I heard from your team that this issue may no longer be needed. Could you please confirm, and if so, close the issue please. Thanks in advance.
@sasakrsmanovic This issue is no longer blocking us. I'm not saying that the issue resolved. Should I leave it open so it gets addressed in the future?
I took a look and it seems this is not natively supported in Android and iOS.
Issue still exists in 2024. Will this be addressed in any way? Or is there a way to warn users, that the property will not work on ios and android or something like that?
Current behavior
When using
TextTrimming="WordEllipsis"
words get broken upExpected behavior
The trimming should happen between words not breaking up words
How to reproduce it (as minimally and precisely as possible)
Environment
Nuget Package: Uno.UI
Package Version(s): 3.0.12 Affected platform(s):
Visual Studio
Relevant plugins
Anything else we need to know?