Hello,
There is a known issue that has been fixed in .NET8.0.40 - TapGestureRecognizer does not work in label's span · Issue #8004 · dotnet/maui (github.com))
I try to new a label and add the span, the event can be triggered with latest VS and 8.0.70.
Please manage NuGetPackages, then update Microsoft.Maui.Controls and Microsoft.Maui.Controls.Compatibility.
FormattedString formattedString = new FormattedString();
formattedString.Spans.Add(sp2);
MyLabel.FormattedText = formattedString;
Best Regards,
Wenyan Zhang
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.