public class NewTab: MultiPage<ContentPage> {
public NewTab() {
Button b = new Button ();
b.Text = "Go Content B";
b.Clicked += (object sender, EventArgs e) => {
this.CurrentPage = this.Children[1];
};
this.Children.Add (new ContentPage () { Content = new Label() { Text = "Content A" }});
this.Children.Add (new ContentPage () { Content = new Label() { Text = "Content B" }});
this.Children.Add (new ContentPage () { Content = b});
NavigationPage.SetHasNavigationBar(this, false);
}
protected override ContentPage CreateDefault (object item){
return new ContentPage ();
}
protected override void OnCurrentPageChanged ()
{
base.OnCurrentPageChanged ();
}
}
How does the object multipage?
How do I change the front page?
Thanks for any suggestions.