public partial class HomePage : ContentPage { public HomePage() { InitializeComponent(); } private void NavigateButton_OnClicked(object sender, EventArgs e) { Navigation.PushAsync(new NavigationPage(new SectionA_Form())); } }
<?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="WalgreensVaccine.Pages.HomePage"> <ContentPage.Content> <StackLayout BackgroundColor="WhiteSmoke"> <!-- Header--> <StackLayout VerticalOptions="Start" BackgroundColor="AntiqueWhite" Margin="0,10,0,0" > <Label Text="Walgreens Covid Form" FontAttributes="Italic" FontSize="Header" TextColor="Red" HorizontalOptions="Center" /> </StackLayout> <!-- Content --> <StackLayout VerticalOptions="CenterAndExpand"> <Button x:Name="sectionA" Clicked="NavigateButton_OnClicked" Text="Section A" BorderWidth="2" BorderColor="CadetBlue" FontSize="Medium" BackgroundColor="DarkRed" TextColor="White" HorizontalOptions="Center" WidthRequest="500" HeightRequest="50"></Button> </StackLayout> </StackLayout> </ContentPage.Content> </ContentPage>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)