Hello,
Welcome to our Microsoft Q&A platform!
You could get the MenuItem via the sender, then get the BindingContext
of the menuItem to retrive the data.
Check the code:
void OnItemClicked(object sender, EventArgs e)
{
// The sender is the menuItem
MenuItem menuItem = sender as MenuItem;
var contextItem = menuItem.BindingContext as Employee;
DisplayAlert("Your Name is ",contextItem.Name,"Ok");
}
Best Regards,
Jarvan Zhang
If the response is helpful, please click "Accept Answer" and upvote it.
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.