Bug 43302 - NavigationPage does not display long title correctly in UWP
Summary: NavigationPage does not display long title correctly in UWP
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows ()
Version: 2.3.1
Hardware: Other Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2016-08-12 11:50 UTC by Patrick
Modified: 2016-10-04 17:29 UTC (History)
3 users (show)

Tags: ac
Is this bug a regression?: ---
Last known good build:

NavigationPage issue on Windows 10 Mobile (44.57 KB, image/png)
2016-08-12 11:50 UTC, Patrick

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

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.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Patrick 2016-08-12 11:50:36 UTC
Created attachment 17006 [details]
NavigationPage issue on Windows 10 Mobile

When setting a page title with a long text in Xamarin Forms, it does not display the title correctly in UWP.

Steps to Reproduce
- Create a new Blank Xaml App (Xamarin.Forms Portable) project
- Update Xamarin.Forms nuget package to version=""
- Change App.xaml.cs (Portable) to initialize MainPage as NavigationPage

MainPage = new NavigationPage(new MainPage())
     BarBackgroundColor = Color.FromHex("03A9F4"),
     BarTextColor = Color.White

- Change MainPage.xaml.cs to set the title

this.Title = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed a pretium nibh. Pellentesque fringilla est non lacinia sollicitudin. Vestibulum pharetra mauris vitae lectus dignissim, vitae auctor libero luctus. Curabitur in";

- Deploy it into a Windows 10 Mobile device

Expected behavior
The NavigationPage title displays correctly the text using wrap/truncate/Ellipsis if necessary

Current behavior
The NavigationPage title displays only the middle part of the text (fringilla est non lacinia sollicitudin. Vestibulum pharetra) and the botton of the second line is cut. See the image attached
Comment 1 Paul DiPietro [MSFT] 2016-08-18 17:27:48 UTC
Could you possibly upload your own reproduction and let me know what device or simulator you're using? The one I have doesn't exactly do what you describe -- the text starts at Lorem and runs off screen, but stays as one line.
Comment 2 Patrick 2016-08-25 12:38:25 UTC
Hi Paul. I added the sample code at https://github.com/ptedeschi/Xamarin. I hope it can help you. About the device, I am using a Nokia Lumia 830 Windows 10 Mobile (10.0.14393.67).
Comment 3 Paul DiPietro [MSFT] 2016-10-04 17:29:50 UTC
Please try using the latest stable version of Forms and make sure all packages are up to date (and clean/rebuild completely uninstall the app as well before redeploying). It seems to stop this issue from occurring based on what I can tell.