I have created a listView that by default shows 6 elements with a field Nombre
and another Def
in this way:
listView.Items.Add(new grafica(){Nombre = "Seno de x", Def = "a * sen(b*x)" });
listView.Items.Add(new grafica(){Nombre = "Coseo de x", Def = "a * cos(b*x)" });
listView.Items.Add(new grafica(){Nombre = "Potencia de x", Def = "a*xn" });
listView.Items.Add(new grafica(){Nombre = "Multiplo de x", Def = "a*x +b" });
listView.Items.Add(new grafica(){Nombre = "Polinomio de x", Def = "a*x2+ b*x +c"});
listView.Items.Add(new grafica(){Nombre = "Inversa de x", Def = "a/(b*x)" });
grafica()
is just a class with its set and get.
My question is, how can I know in listView
that one of those elements is selected? Is there a way to name a item
and use the nombre.isChecked
property to perform operations with that item
?
Thank you!