Issue
i'am trying to make a button that's make me go to another page. but every time i pess the button my app crashes D: looking for help!
My Code.
Page 1 named "LoginPage"
public LoginPage()
{
InitializeComponent();
MainPage = new NavigationPage(new Signup());
}
async void SignupProcedure(object sender, EventArgs e)
{
await Navigation.PushAsync(new Signup());
}
<Button x:Name="Btn_Signup" Text="Sign up" Clicked="SignupProcedure"/>
Page 2 Named "Signup"
async void OnPreviousPageButtonClicked(object sender, EventArgs e)
{
await Navigation.PushAsync(new LoginPage());
}
Solution
Ensure your MainPage is declared in App.xaml.cs and not the constructor of your LoginPage like in your example.
Like the following:
public App()
{
InitializeComponent();
MainPage = new NavigationPage(new Signup());
}
Answered By - Megadec
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.