简体   繁体   中英

Xamarin ContentPage under Navigation

I created a Xamarin Forms app from the Shell project template.

The first page seems to be loaded from App.xaml:

<ShellContent ContentTemplate="{DataTemplate FirstPage}" />

If I navigate to any page after that, the title bar / navigation bar seems to cut off or hover over the content:

await Navigation.PushAsync(new AboutPage());

导航下的 Xamarin ContentPage

I have tried wrapping the pages in a ScrollView, but that doesn't seem to help.

I personally think this is an issue with a conflict between Shell and the Application level navigation now while using shell you do not use the Application Navigation what you do is something like what the documentation mention.

Like for eg you give the ShellContent a Route:

 <ShellContent ...
                  Route="defRoute" />

Or

Routing.RegisterRoute("defRoute", typeof(DefaultPage));

And then you navigate something like

await Shell.Current.GoToAsync("defRoute");

For a detailed understanding, I would suggest you check the documentation

I just test the sample and I can confirm this issue has been fixed in the latest Xamarin.Forms version 4.2.0.848062 .

Please update your Xamarin.forms to the latest Version.

You can also see the issue on Github has been closed:

Shell content layout hides page and Fix content offset when you navigate to second page on Shell

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM