Hi All,
I have to identify which Switch
control was toggled to get the Id
of the corresponding row. So far I have this kind of implementation which is working as I want, but it is not elegant in my opinion. Any ideas how to make it better.
`Label idLabel = new Label(){};
idLabel.SetBinding(Label.TextProperty, "Id");
idLabel.IsVisible = false;
switcher.Toggled += (sender, e) =>
{
Console.WriteLine(idLabel.Text + " switch to " + e.Value);
};
mainGrid.Children.Add(idLabel, 0, 0);`