Not able to maintain Timer control values on Back Button Click in Windows Phone 7 App Development RRS feed

  • Question

  • HI ,

    I have cretaed on page for displaying time countdown just like stopwatch. In this page i am using textblock to display this time.

    But when i nvaigate from this page to another page using back button, the timer control is working fine and when i debugging the code the statement just as mentioned below:

    elapsedTime = DateTime.UtcNow - (DateTime)App.StartTime;
                txtStartTimeDisp.Text = string.Format("{0:D2}:{1:D2}:{2:D2}", elapsedTime.Hours,
                                               elapsedTime.Minutes, elapsedTime.Seconds);
    In above statement txtStartTimeDisp.Text is getting value . But when page load is completed , th textblock txtStartTimeDisp doesn't show the time.

      Please tell me, what  is wrong with my code

    Thanks in Advance...

    Wednesday, February 22, 2012 1:24 PM