XF 标签页面

using System;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;

[assembly: XamlCompilation (XamlCompilationOptions.Compile)]
namespace App12
{
    public partial class App : Application
    {
        public App ()
        {
            InitializeComponent();

            MainPage = new TabbedPage1();//删除MainPage添加标签页面
        }

        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
        }
    }
}
 

 

<?xml version="1.0" encoding="utf-8" ?>
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="App12.TabbedPage1">
  <!--Pages can be added as references or inline-->
    <ContentPage Title="Tab 1">
        <BoxView BackgroundColor="AliceBlue"></BoxView>
    </ContentPage>
    <ContentPage Title="Tab 2" >
        <BoxView BackgroundColor="Red"></BoxView>

    </ContentPage>
    <ContentPage Title="Tab 3" >
        <BoxView BackgroundColor="Yellow"></BoxView>

    </ContentPage>
</TabbedPage>

posted @ 2018-08-05 16:58  dxm809  阅读(72)  评论(0编辑  收藏  举报