Hello,
Can you please confirm for this to be the case, i.e., no breaking change with StyleId property and x:Name ?
Yes, you can still use StyleId
to get to the x:Name
identifier. For testing, I set a x:Name
and TapGestureRecognizer
for Label
in the XAML, then I can get StyleId
in TapGestureRecognizer
.
The value of StyleId
is the same as the value of X:Name
.
private void TapGestureRecognizer_Tapped(object sender, EventArgs e)
{
var obj = sender as Label;
Console.WriteLine("------" + obj.StyleId);
}
Best Regards,
Leon Lu
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.