Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Problem with TabbedPage and CarouselPage

$
0
0

I have a strange problem with both types of pages. Whenever I set CurrentPage in code they lock that page. ie, when I click on another tab it switches to the new tab but immediately switches back to the one I set in code. Eg, in the xaml.cs

private void GotoView(string name)
{
  CurrentPage = AssignmentLinesView;
  // CurrentPage = null;
}

private void AssignmentView_OnCurrentPageChanged(object sender, EventArgs e)
{
  var p = CurrentPage;
  Debug.WriteLine("CurrentPage " + p.GetType().Name);
}

The GotoView is called from the message centre subscribe. I call it from the VM.

Also, in the CarouselPage, when GotoView is called it doesn't display the contents of the view, the TabbedPage does.


Viewing all articles
Browse latest Browse all 58056

Trending Articles