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

Corrupted nav bar when pushing new page from ItemSelected handler

$
0
0

Howdy,

I have a tabbed page, and from one of the pages in the tabbed page, I have a ListView where I want to go to another page when the click one of the items in the list:

installation.ItemSelected += (sender, args) =>
                    {
                        Navigation.PushAsync(new LightGroupInfoPage(args.SelectedItem as LightGroup));
                    };

When this code is run, the app does go to the LightGroupInfoPage but the nav bar gets confused, showing the page's title as both the title and the nav back arrow name. In the application output Xamarin says:

"nested push animation can result in corrupted navigation bar"
"Finishing up a navigation transition in an unexpected state. Navigation Bar subview tree might get corrupted."

Which seems like what is happening. So I'm doing something bad. If I click back on the nav button it will eventually crash.

How do I navigate to a new page when the user clicks an item? (Ideally also it would retain the original tabs at the bottom of the screen, but this is optional at this point. Note that the new page I am pushing is not one of the pages in the tabbed page.)

Thanks!


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>