我想知道如何从一个内容页移动到另一个内容页。请查看elseif()代码。我需要在该块中编写什么内容,以便能够移动到另一个内容页(命名为MainView.cs)。
button.Clicked += (sender, e) =>
{
if (String.IsNullOrEmpty(username.Text) || String.IsNullOrEmpty(password.Text))
{
DisplayAlert("Oops!!Validation Error", "Username and Password are required", "Re-try");
}
else if (username.Text == "kanak" && password.Text == "1234")
{
// your code here
}
else
{
DisplayAlert("Failed", "Invalid User", "Login Again");
}
};
任何帮助都受到欢迎。
<App-Root-name>
and<folder-name>
are the namespace of the class. In the able answer, it isFormsGallery
. And<Class-Name>
is the name of the content page, whereas in this case it isTableViewMenuDemoPage
. So for the above answer, it should be as follows.Navigation.PushAsync(new FormsGallery.TableViewMenuDemoPage());
- Curiosity