Bug 54042 - TabbedPage contents stop rendering when both changing current tab and going to another page in navigation
Summary: TabbedPage contents stop rendering when both changing current tab and going t...
Status: RESOLVED ANSWERED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.3.3
Hardware: PC Windows
: Normal major
Target Milestone: ---
Assignee: Rui Marinho
URL:
Depends on:
Blocks:
 
Reported: 2017-03-27 13:21 UTC by Milan Laslop
Modified: 2017-05-25 17:24 UTC (History)
3 users (show)

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

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:
Status:
RESOLVED ANSWERED

Description Milan Laslop 2017-03-27 13:21:12 UTC
git clone https://github.com/milan11/xamarin_forms_tabs_test

There are 2 tabs: Page 1 and Page 2

Observe 3 buttons on Page 1:
"Go to page 2 - using SelectedItem":
- this uses SelectedItem property to change current tab - this does not work and I am not sure if it should (but this is not the main problem, but it maybe should be examined)
"Go to page 2 - using CurrentPage":
- this uses CurrentPage property to change current tab - this works correctly and switches to Page 2 tab
"Go to page 2 - through problematic code":
- this both changes current tab and opens another page (additionalContentPage)
- after returning from the additionalContentPage using Continue button, the tabs contents do not render
-- but they are clickable
-- but they start rendering after resizing the application window (UWP app ran on local machine has a normal resizable window)

Notes:
- ProblematicCode() has to contain both lines for this to be reproducible
- when moving tp.CurrentPage change from ProblematicCode() to Continue button handler (either before or after PopToRootAsync), it behaves correctly (and the observable state of the application is the same)

Reproduced with both Xamarin Forms versions tested: 2.3.3.193, 2.3.5.73-nightly
Comment 1 Paul DiPietro [MSFT] 2017-03-27 13:46:39 UTC
Note that resizing the window causes the content to appear so it maybe stems from some sort of wrapper/re-measuring issue.
Comment 2 Rui Marinho 2017-05-25 17:24:36 UTC
Hi, after deeply analizing this we can't really fix this in Xamarin.Forms as the issue seems be related with UWP pivot animation from one item to the other, if you navigate to other page while the animation is happening Pivot get's crazy. 

as a workaround you can change your code to handle for the animation to finish 

private async Task ProblematicCode()
{
   tp.CurrentPage = tp.Children[1];
   await Task.Delay(150);
   await MainPage.Navigation.PushAsync(additionalContentPage);
}