Xamarin 简单的 TabbedPage
using System;
using Xamarin.Forms;
namespace one
{
public class PageC : TabbedPage
{
public PageC()
{
this.Title = "TabbedPage";
this.Children.Add(new ContentPage {
BackgroundColor = Color.Orange,
Title = "Blue",
Icon = "monkeyicon.png",
Content = new BoxView {
Color = Color.Blue,
HeightRequest = 100,
VerticalOptions = LayoutOptions.Center
}
});
this.Children.Add(new ContentPage {
Title = "Blue abd Red",
Icon = "monkeyicon.png",
Content = new StackLayout {
Children = {
new BoxView {
Color = Color.Blue
},
new BoxView {
Color = Color.Red
}
}
}
});
}
}
}
效果: