Wie tätige ich einen Anruf in Xamarin.Forms, indem ich auf ein Etikett klicke?

Hallo Ich habe eine App, an der ich in Xamarin arbeite. Formulare, die Kontaktinformationen von einem Webdienst abrufen und diese Informationen dann in Labels anzeigen. Ich möchte jedoch das Label erstellen, in dem die Telefonnummer aufgeführt ist, die beim Klicken angerufen werden soll. Wie mache ich das?

Hier in meiner 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="ReadyMo.ContactInfo">
  <ContentPage.Content>
     <Frame Padding="0,0,0,8" BackgroundColor="#d2d5d7">
            <Frame.Content>
              <Frame Padding="15,15,15,15"   OutlineColor="Gray" BackgroundColor="White">
                <Frame.Content>
        <ScrollView Orientation="Vertical" VerticalOptions="FillAndExpand">
           <StackLayout Padding="20,0,0,0"  Orientation="Horizontal" HorizontalOptions="CenterAndExpand">
            <StackLayout Orientation="Vertical" VerticalOptions="FillAndExpand">
              <Label Text="Emergency Coordinators"  HorizontalOptions="Center" FontFamily="OpenSans-Light"
                                       FontSize="20"
                                       TextColor="#69add1">
              </Label>
              <Label x:Name="CountyName"   HorizontalOptions="Center" FontFamily="OpenSans-Light"
                                   FontSize="16"
                                   TextColor="#69add1">
              </Label>
              <Label x:Name="FirstName" HorizontalOptions="Center">
              </Label>
              <Label x:Name ="LastName" HorizontalOptions="Center">
              </Label>
              <Label x:Name="County" HorizontalOptions="Center">
              </Label>
              <Label x:Name ="Adress" HorizontalOptions="Center">
              </Label>
                <Label x:Name ="City" HorizontalOptions="Center">
              </Label>

//This is the label that displays the phone number!
              <Label x:Name="Number"  HorizontalOptions="Center">
              </Label>           
            </StackLayout>
          </StackLayout>
        </ScrollView>
       </Frame.Content>
      </Frame>
     </Frame.Content>
    </Frame>
  </ContentPage.Content>
</ContentPage>

heres mein Code dahinter:

using Newtonsoft.Json;
using ReadyMo.Data;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;

using Xamarin.Forms;

namespace ReadyMo
{
    public partial class ContactInfo : ContentPage
    {
        private County item;

        public ContactInfo()
        {
            InitializeComponent();
            var contactpagetext = ContactManager.GetContactString(item.id);

        }

        public ContactInfo(County item)
        {
            InitializeComponent();
            this.item = item;

            //var contactpagetext = ContactManager.GetContactString(item.id).Result;
            //Emergency Coordinators Code
            ContactInfoModel TheContactInfo = ContactManager.CurrentContactInfo;
            CountyName.Text = TheContactInfo.name;
            FirstName.Text = TheContactInfo.First_Name;
            LastName.Text = TheContactInfo.Last_Name;
            Adress.Text = TheContactInfo.Address1;
            City.Text = TheContactInfo.Address2;
            Number.Text = TheContactInfo.BusinessPhone;





        }
    }
}

Danke im Voraus

Antworten auf die Frage(4)

Ihre Antwort auf die Frage