This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ContentPage.Content> | |
<!--<StackLayout HorizontalOptions="Center" VerticalOptions="Center"> | |
<Button Text="When I Am Clicked" HorizontalOptions="Center" VerticalOptions="Center" | |
Clicked="Button_Clicked"/> | |
</StackLayout>--> | |
</ContentPage.Content> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public partial class Page1 : ContentPage | |
{ | |
public Page1() | |
{ | |
InitializeComponent(); | |
var button = new Button { Text = "Hello World", | |
BackgroundColor = Color.Black, | |
HorizontalOptions = LayoutOptions.Center, | |
VerticalOptions = LayoutOptions.Center, | |
TextColor = Color.White }; | |
button.Clicked += ButtoncbClicked; | |
Content = button; | |
this.Content = new StackLayout | |
{ | |
Children = | |
{ | |
button | |
} | |
}; | |
} | |
private async void ButtoncbClicked(object sender, EventArgs e) | |
{ | |
await Navigation.PushAsync(new Page2()); | |
} | |
//private async void buttoncbclicked(object sender, eventargs e) | |
//{ | |
// await navigation.pushasync(new page2()); | |
//} | |
// This is for Our Xaml Part Button Clicked | |
//private async void Button_Clicked(object sender, EventArgs e) | |
//{ | |
// await Navigation.PushAsync(new Page2()); | |
//} | |
} | |
} | |
//private void ButtoncbClicked(object sender, EventArgs e) | |
//{ | |
// await Navigation.PushAsync(new Page2()); | |
//} | |
//private void TapGestureRecognizer_Tapped(object sender, EventArgs e) | |
//{ | |
//} |
No comments:
Post a Comment