Xamarin 自定义 Navigation Bar

using System;
using Xamarin.Forms;
using Xamarin.Forms.PlatformConfiguration;
using Xamarin.Forms.Xaml;
using IOSNavigationPage = Xamarin.Forms.PlatformConfiguration.iOSSpecific.NavigationPage;

[assembly: XamlCompilation(XamlCompilationOptions.Compile)]

namespace poetry
{
    public partial class App : Application
    {
        public App()
        {
            InitializeComponent();

            MainPage = new NavigationPage(new MainPage())
            {
                BarBackgroundColor = Color.Bisque,
            };
            IOSNavigationPage.SetHideNavigationBarSeparator((MainPage as NavigationPage)?.On<iOS>(), true);
        }

        protected override void OnStart()
        {
            // Handle when your app starts
        }

        protected override void OnSleep()
        {
            // Handle when your app sleeps
        }

        protected override void OnResume()
        {
            // Handle when your app resumes
        }
    }
}