如何在Xaml中添加标签文本的链接?

时间:2015-11-04 19:27:31

标签: c# xaml mvvm app.xaml

我有一个xaml移动项目,在滚动视图中有一个标签。在标签的文本中,我想链接到我的应用程序中的另一个xaml页面。当点击这个文本时,我如何调用函数我是我的代码? “免费注册!”

    <?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="Mobile.Views.Welcome"
             Title="Welcome!!!!">
  <Grid>
    <Grid.RowDefinitions>
      <RowDefinition Height="Auto"/>
      <RowDefinition Height="*"/>
      <RowDefinition Height="Auto"/>
      <RowDefinition Height="Auto"/>
    </Grid.RowDefinitions>

    <Image Source="(iOS: ImageSource.FromFile('Logo.png'), Android: ImageSource.FromFile('Logo.png'), WinPhone: ImageSource.FromFile('Images/Logo.png'))" />
    <ScrollView Grid.Row="1" HorizontalOptions="Center">
      <Label Font="15"  HorizontalOptions="Center">
       With your free account you can: 
        Search Colleges, College programs and careers. 

        Use out interest profiler to get a personalized list of careers that may interest you. Take a survey to find career clusters that are in line with your interests. 

        Store your favorite careers, colleges, programs, and more in your personal locker.

        Yes, I want to do this! Sign up for free!</Label>
    </ScrollView>
    <Button Grid.Row="2" BackgroundColor="Blue" Text="Log In" TextColor="White" FontAttributes="Bold" ></Button>
    <Button Grid.Row="3" BackgroundColor="Aqua" Text="Browse as Guest" TextColor="White" FontAttributes="Bold"></Button>
 </Grid>

</ContentPage>

0 个答案:

没有答案
相关问题