{
_navigationPage.BarBackgroundColor = Color.Default;
_navigationPage.BarTextColor = Color.Default;
+
var imageRed = new StackLayout()
{
HorizontalOptions = LayoutOptions.CenterAndExpand,
VerticalOptions = LayoutOptions.CenterAndExpand,
HeightRequest = 100,
WidthRequest = 400,
-
- Children =
- {
- new Label()
- {
- VerticalOptions = LayoutOptions.Center,
- Text = "Go To Page2 >>",
- HorizontalTextAlignment = TextAlignment.Center,
- //Font = Font.BoldSystemFontOfSize(NamedSize.Large)
- }
- }
};
-
var imageBlue = new StackLayout()
{
HorizontalOptions = LayoutOptions.CenterAndExpand,
VerticalOptions = LayoutOptions.CenterAndExpand,
HeightRequest = 100,
WidthRequest = 400,
- BackgroundColor = Color.White,
-
- Children =
- {
- new Label()
- {
- VerticalOptions = LayoutOptions.Center,
- Text = "Go To Page3 >>",
- HorizontalTextAlignment = TextAlignment.Center,
- //Font = Font.BoldSystemFontOfSize(NamedSize.Large)
- }
- }
};
var imageGreen = new StackLayout()
{
VerticalOptions = LayoutOptions.CenterAndExpand,
HeightRequest = 100,
WidthRequest = 400,
- BackgroundColor = Color.White,
-
- Children =
- {
- new Label()
- {
- VerticalOptions = LayoutOptions.Center,
- Text = "<< Back To Page1",
- HorizontalTextAlignment = TextAlignment.Center,
- //Font = Font.BoldSystemFontOfSize(NamedSize.Large)
- }
- }
};
NavigationPage navigationPage = new NavigationPage(new ContentPage
Content = imageGreen
};
- var tapGestureRecognizerRed = new TapGestureRecognizer();
- tapGestureRecognizerRed.Tapped += async (s, e) =>
+ var button1 = new Button
+ {
+ VerticalOptions = LayoutOptions.Center,
+ Text = "Go To Page2 >>",
+ };
+ button1.Clicked += async (s, e) =>
{
await navigationPage.PushAsync(page2);
await Task.Delay(2000);
};
- imageRed.GestureRecognizers.Add(tapGestureRecognizerRed);
+ imageRed.Children.Add(button1);
- var tapGestureRecognizerBlue = new TapGestureRecognizer();
- tapGestureRecognizerBlue.Tapped += async (s, e) =>
+ var button2 = new Button
+ {
+ VerticalOptions = LayoutOptions.Center,
+ Text = "Go To Page3 >>",
+ BackgroundColor = Color.Black,
+ };
+ button2.Clicked += async (s, e) =>
{
await navigationPage.PushAsync(page3);
await Task.Delay(2000);
};
- imageBlue.GestureRecognizers.Add(tapGestureRecognizerBlue);
+ imageBlue.Children.Add(button2);
- var tapGestureRecognizerGreen = new TapGestureRecognizer();
- tapGestureRecognizerGreen.Tapped += async (s, e) =>
+ var button3 = new Button
+ {
+ VerticalOptions = LayoutOptions.Center,
+ Text = "<< Back To Page1",
+ BackgroundColor = Color.Black,
+ };
+ button3.Clicked += async (s, e) =>
{
await navigationPage.PopToRootAsync();
await Task.Delay(2000);
};
- imageGreen.GestureRecognizers.Add(tapGestureRecognizerGreen);
+ imageGreen.Children.Add(button3);
await ManualTest.WaitForConfirm();
}
navigationPage.Pushed -= OnPushed;
}
}
-}
\ No newline at end of file
+}