I have a singleton timer in my WP7 application however I have no idea how to get it to update a textblock everytime the timer ticks… Is there a way to get the event handler of the timer ticking and then update the textbox with the correct time?
Here is what I tried to use but wouldn’t work:
public _1()
{
InitializeComponent();
Singleton.TimerSingleton.Timer.Tick += new EventHandler(SingleTimer_Tick);
}
void SingleTimer_Tick(object sender)
{
textBlock1.Text = Singleton.TimerSingleton.TimeElapsed.TotalSeconds.ToString();
}
Here is my Timer.cs SingleTon:
The method above should be something like
And when you ask a question please get your terminology right and give more details. It’ll help you get the right answer faster. For example when you say “the application won’t let me call …” what you actually mean is the compiler gives you an error.