Basp
Topic Author
Posts: 22
Joined: 08 May 2014, 10:09

[Unity] TextTrimming causes extra vertical whitespace

18 Aug 2014, 15:00

If I have a bunch of textblocks in a stackpanel with Textwrapping set to NoWrap and TextTrimming set to CharacterEllipsis or WordEllipsis, I expect the result to be something like this:
Line that fits within the bounds.
Line that doesn't fit within th...
Another line that fits.
Another line that doesn't fit w..
Another line.
Instead, I get the following:
Line that fits within the bounds.
Line that doesn't fit within th...

Another line that fits.
Another line that doesn't fit w..

Another line.
In other words, the textblocks get trimmed as they are supposed to, but the ones that get trimmed take up extra space below the text. Is this a bug or am I doing something wrong?
 
User avatar
jsantos
Site Admin
Posts: 4219
Joined: 20 Jan 2012, 17:18
Contact:

Re: [Unity] TextTrimming causes extra vertical whitespace

18 Aug 2014, 15:05

If the result you are getting is different from the one you get in KaXaml or Blend it is a bug. Could you provide a simple XAML with the problem?
 
Basp
Topic Author
Posts: 22
Joined: 08 May 2014, 10:09

Re: [Unity] TextTrimming causes extra vertical whitespace

18 Aug 2014, 16:20

Sure. I used this XAML:
        <StackPanel Width="130" Grid.ColumnSpan="2">
            <TextBlock TextWrapping="NoWrap" TextTrimming="CharacterEllipsis">Short line of text.</TextBlock>
            <TextBlock TextWrapping="NoWrap" TextTrimming="CharacterEllipsis">Longer trimmed line of text.</TextBlock>
            <TextBlock TextWrapping="NoWrap" TextTrimming="CharacterEllipsis">Another short line.</TextBlock>
            <TextBlock TextWrapping="NoWrap" TextTrimming="CharacterEllipsis">Longest line of text imaginable.</TextBlock>
            <TextBlock TextWrapping="NoWrap" TextTrimming="CharacterEllipsis">Short line of text.</TextBlock>
        </StackPanel>
This is what it looks like in Blend/Visual Studio:

Image

This is what it looks like in the Unity application:

Image

(Font size is super small, but you get the idea.)

Should I submit a bug report?
 
User avatar
jsantos
Site Admin
Posts: 4219
Joined: 20 Jan 2012, 17:18
Contact:

Re: [Unity] TextTrimming causes extra vertical whitespace

18 Aug 2014, 16:29

Yes, please, file a bug, our implementation is not correct.

Could you also verify your account here? Thanks!
 
User avatar
jsantos
Site Admin
Posts: 4219
Joined: 20 Jan 2012, 17:18
Contact:

Re: [Unity] TextTrimming causes extra vertical whitespace

01 Sep 2014, 16:58

We have fixed this issue. It will work fine in the next version (v1.1.11).

Thanks for reporting!

Who is online

Users browsing this forum: Google [Bot], Semrush [Bot] and 14 guests