Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

MultiPage

$
0
0
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.


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>