Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No method with correct signature type found in Xamarin Forms

I am trying to add hyperlink in my Xamarin Forms and I get this error:

No method Handle_Tapped with correct signature found on type App.Greet

My xaml code:

 <Label LineBreakMode="WordWrap">
   <Label.FormattedText>
     <FormattedString>
       <Span Text="Google">
         <Span.GestureRecognizers>
         <TapGestureRecognizer Tapped="Handle_Tapped" />
         <Span.GestureRecognizers>
       </Span>
      </FormattedString>
    </Label.FormattedText>
 </Label>

.cs file:

public async void Handle_Tapped(object sender, EventArgs e)
    {
        String url = "www.google.com";
        await Browser.OpenAsync(new Uri(url), BrowserLaunchMode.SystemPreferred);
    }
like image 795
user Avatar asked Dec 24 '19 11:12

user


1 Answers

I restarted visual studio without changing any code, and there is no error now

like image 79
user Avatar answered Nov 15 '22 06:11

user