0
I’m creating an app where I have a TableLayout
, in which I add TableRow
dynamically with Spinners
and TextEdit
.
It is possible to create a EventHandler
common to all Spinners
?
0
I’m creating an app where I have a TableLayout
, in which I add TableRow
dynamically with Spinners
and TextEdit
.
It is possible to create a EventHandler
common to all Spinners
?
2
I don’t know if this is what you want, but you can assign the events of multiple objects to the same function:
FindViewById<Spinner>(Resource.Id.Spn1).Click += EventoClick_Click;
FindViewById<Spinner>(Resource.Id.Spn2).Click += EventoClick_Click;
private void EventoClick_Click(object sender, EventArgs e)
{
//Aqui você pode manipular o objeto que chamou o evento usando o sender
}
Thank you was right.
Browser other questions tagged c# xamarin.android
You are not signed in. Login or sign up in order to post.
Even for Winforms, see this post from Microsoft. How to connect multiple events to a single event handler in Windows Forms
– Ismael