Hey,
So i have a View that i have bound to a List of Timer objects called Timers (custom class i have made), and in the view i have added a start and remove button. when a user clicks start i want them to be able to call the relevant timer object associated with the button underlying method startTimer(). How can i do this?
View code:
<ListView.ItemTemplate>
Timer Class:
public class Timer
{
public int _startTime { get; set;}
public bool _hasStarted{ get; set; }
public string _name { get; set; }
public Timer (string name, int startTime, bool hasStarted = false)
{
_name = name;
_startTime = startTime;
_hasStarted = hasStarted;
}
public void startTimer(){
//do something here
}
}