ContentPage CreateContentPageOne() { var returnButton = new Button { Text = "Return to Platform-Specifics List" }; returnButton.Clicked += (sender, e) => _returnToPlatformSpecificsPage.Execute(null); return(new ContentPage { Title = "ContentPage One", Icon = "csharp.png", Content = new StackLayout { Margin = new Thickness(20), Children = { new Label { Text = "Toolbar Items", FontAttributes = FontAttributes.Bold, HorizontalOptions = LayoutOptions.Center }, WindowsPlatformSpecificsHelpers.CreateAddRemoveToolbarItemButtons(this), WindowsPlatformSpecificsHelpers.CreateToolbarPlacementChanger(this), returnButton } } }); }
ContentPage CreateContentPageOne() { var navigateButton = new Button { Text = "Navigate", HorizontalOptions = LayoutOptions.Center }; navigateButton.Clicked += async(sender, e) => await PushAsync(CreateContentPageTwo()); return(new ContentPage { Title = "ContentPage One", Content = new StackLayout { Margin = new Thickness(20), Children = { new Label { Text = "Toolbar Items", FontAttributes = FontAttributes.Bold, HorizontalOptions = LayoutOptions.Center }, WindowsPlatformSpecificsHelpers.CreateAddRemoveToolbarItemButtons(this), WindowsPlatformSpecificsHelpers.CreateToolbarPlacementChanger(this), navigateButton } } }); }
ContentPage CreateContentPageOne() { return(new ContentPage { Title = "ContentPage One", Content = new StackLayout { Margin = new Thickness(20), Children = { new Label { Text = "Toolbar Items", FontAttributes = FontAttributes.Bold, HorizontalOptions = LayoutOptions.Center }, WindowsPlatformSpecificsHelpers.CreateAddRemoveToolbarItemButtons(this), WindowsPlatformSpecificsHelpers.CreateToolbarPlacementChanger(this) } } }); }