我正在尝试通过单击弹出窗口内的按钮导航到新页面。这是我所拥有的:
<StackLayout>
<Label FontSize="15" Margin="20" Text="An account with this phone number doesn't exist. Do you want to create new account?" VerticalOptions="CenterAndExpand" HorizontalOptions="CenterAndExpand"/>
<StackLayout Orientation="Horizontal">
<Button BackgroundColor="{StaticResource SystemGreen}" CornerRadius="20" Margin="20" Text="Enter again"/>
<Button BackgroundColor="{StaticResource SystemGreen}" CornerRadius="20" Margin="20" Text="Yes" Clicked="Button_Clicked"/>
</StackLayout>
</StackLayout>
这是我的代码:
private async void Button_Clicked(object sender, EventArgs e)
{
await Navigation.PushAsync(new RegisterNumberEntryPage());
}