我正在使用Visual Studio和Xamarin Forms。点击标签时,我试图打开一个新页面。我的xaml在下面,我只需要C#代码即可使其工作..请谢谢。
<Label x:Name="btn2" Text="Sign Up As Customer" Margin="20, 10, 20, 0" Grid.Row="1" TextColor="White" HeightRequest="20" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" BackgroundColor="#2F7DC0" FontSize="Micro">
<Label.GestureRecognizers>
<TapGestureRecognizer Tapped="btn2Clicked" NumberOfTapsRequired="1" />
</Label.GestureRecognizers>
</Label>