Bug 60577 - PrefersLargeTitles issue with NavigationPage inside TabbedPage
Summary: PrefersLargeTitles issue with NavigationPage inside TabbedPage
Status: ASSIGNED
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS ()
Version: 2.5.0
Hardware: PC Mac OS
: --- blocker
Target Milestone: ---
Assignee: Rui Marinho
URL:
Depends on:
Blocks:
 
Reported: 2017-11-08 19:16 UTC by Paul DiPietro [MSFT]
Modified: 2018-01-18 15:27 UTC (History)
3 users (show)

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


Attachments
Sample project (18.47 KB, application/zip)
2018-01-18 15:27 UTC, Cameron Swanson
Details


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 for Bug 60577 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
ASSIGNED

Description Paul DiPietro [MSFT] 2017-11-08 19:16:45 UTC
Cross reference to this forum post: https://forums.xamarin.com/discussion/comment/305152/#Comment_305152

The NavigationPage background becomes visible when scrolling up. The reporter has provided this basic code (along with screenshots) in that post for reproduction:

using System;
using Xamarin.Forms;
using Xamarin.Forms.PlatformConfiguration.iOSSpecific;

namespace LargeTitlesWithTabs
{
public class App : Application
{
public App()
{
var navigationPage = new Xamarin.Forms.NavigationPage(new HighPage()) 
{ 
BackgroundColor = Color.Red 
};
navigationPage.On<Xamarin.Forms.PlatformConfiguration.iOS>().SetPrefersLargeTitles(true);

        var tabs = new TabbedPage();
        tabs.Children.Add(navigationPage);
        MainPage = tabs;
    }
}

public class HighPage : ContentPage
{
    public HighPage()
    {
        Title = "Hello World";
        Content = new Xamarin.Forms.ScrollView 
        { 
            Content = new BoxView 
            { 
                HeightRequest = 2000, 
                WidthRequest = 500, 
                BackgroundColor = Color.Lime 
            } 
        };
    }
}
}
Comment 1 Cameron Swanson 2018-01-18 15:27:17 UTC
Created attachment 26094 [details]
Sample project

I'm also interested in seeing this fixed.  I've added a sample project to replicate the issue.  You can see in the tab page renderer, the Y value of the TabbarFrame is changing when the listview is scrolled.

Also, when you change tabs, the large title size is just copied from the previous tab, so if you've already scrolled the first page and the title is small, than it will be small on the next tab you choose.  Apple specifically says in their documentation that the large title feature was added to differentiate pages when they have simliar scrolling content, so it would be nice if the title size stayed large on a tab switch.