Bug 42519 - Text Truncation in UWP
Summary: Text Truncation in UWP
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows (show other bugs)
Version: 2.3.0
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2016-07-13 13:37 UTC by Anubhav Ranjan
Modified: 2016-10-04 19:53 UTC (History)
6 users (show)

See Also:
Tags: ac
Is this bug a regression?: No
Last known good build:


Description Anubhav Ranjan 2016-07-13 13:37:49 UTC
I believe I am experiencing a bug on UWP with Xamarin Forms. Setting LineBreakMode to TailTruncation doesn't seem to work correctly on UWP. This <http://i.imgur.com/0JaI0rv.png> is what a simple listview looks like with long text set to TailTruncation. It instantly truncates without consideration for what space it has. If you rotate the device, this<http://i.imgur.com/VjPvPIO.png> is what happens, it extends the text as far as it can and truncates, but doesn't add an ellipse.
I have a workaround with a custom renderer that sort of works:

I need to set the platform specific truncation for the control, Control.TextTrimming = Windows.UI.Xaml.TextTrimming.CharacterEllipsis;
And I need to set the minimum in GetDesiredSize, I guess this forces it do a size calculation and displays the label correctly, this <http://i.imgur.com/r68HhUT.png> is what it looks like.

But it has the same issue where if I rotate, it will truncate, but won't show the ellipse.


#Version Info:
Microsoft Visual Studio Enterprise 2015
Version 14.0.25123.00 Update 2
Microsoft .NET Framework
Version 4.6.01038

Installed Version: Enterprise

Architecture and Modeling Tools   00322-80000-00000-AA004
Microsoft Architecture and Modeling Tools
UML® and Unified Modeling Language™ are trademarks or registered trademarks of the Object Management Group, Inc. in the United States and other countries.

Visual Basic 2015   00322-80000-00000-AA004
Microsoft Visual Basic 2015

Visual C# 2015   00322-80000-00000-AA004
Microsoft Visual C# 2015

Visual C++ 2015   00322-80000-00000-AA004
Microsoft Visual C++ 2015

Windows Phone SDK 8.0 - ENU   00322-80000-00000-AA004
Windows Phone SDK 8.0 - ENU

Application Insights Tools for Visual Studio Package   5.209.60613.1
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2015.1   14.1.20512.0
ASP.NET and Web Tools 2015.1

ASP.NET Web Frameworks and Tools 2012.2   4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.40314.0
For additional information, visit http://www.asp.net/

Azure App Service Tools v2.8.1   14.0.11123.0
Azure App Service Tools v2.8.1

Common Azure Tools   1.7
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

JetBrains ReSharper Ultimate 10.0.2   Build 104.0.20151218.120627
JetBrains ReSharper Ultimate package for Microsoft Visual Studio. For more information about ReSharper Ultimate, visit http://www.jetbrains.com/resharper. Copyright © 2016 JetBrains, Inc.

KofePackagePackage Extension   1.0
KofePackagePackage Visual Studio Extension Detailed Info

Microsoft .NET Core Tools (Preview 1)   14.1.20512.0
Microsoft .NET Core Tools (Preview 1)

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

NuGet Package Manager   3.4.4
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools   14.0.60311.1
Microsoft SQL Server Data Tools

TypeScript tools for Visual Studio

Visual Studio 2015 Tools for Docker - Preview   0.21
The Visual Studio 2015 Tools for Docker Preview enables developers to edit and refresh an ASP .NET 5 Web Application running in a Docker container and to publish an ASP .NET 5 Web or Console application to a Docker container running on a Linux or Windows Virtual Machine on Azure.

Visual Studio Tools for Universal Windows Apps   14.0.25219.00
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

Xamarin (a532c82)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android (804c6cb)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.iOS (3afb4af)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 2 FieldstrikeMobile 2016-07-29 07:43:41 UTC
This bug is a duplicate of: https://bugzilla.xamarin.com/show_bug.cgi?id=42559
Comment 3 E.Z. Hart [MSFT] 2016-08-25 21:16:24 UTC
This bug is *not* a duplicate of 42559. 42559 is about wrapping text, not truncating it.
Comment 4 Jacob Ebey 2016-09-27 22:41:25 UTC
What is the progress on this? We are in need of this functionality.
Comment 5 E.Z. Hart [MSFT] 2016-10-04 19:53:37 UTC
Should be fixed in 2.3.3-pre3

Notice (2018-05-21): bugzilla.xamarin.com will be switching to read-only mode on Thursday, 2018-05-25 22:00 UTC.

Please join us on Visual Studio Developer Community and GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs and copy them to the new locations as needed for follow-up. The See Also field on each Bugzilla bug will be updated with a link to its new location when applicable.

After Bugzilla is read-only, if you have new information to add for a bug that does not yet have a matching issue on Developer Community or GitHub, you can create a follow-up issue in the new location. Copy and paste the title and description from this bug, and then add your new details. You can get a pre-formatted version of the title and description here:

In special cases you might also want the comments:

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Note You need to log in before you can comment on or make changes to this bug.