title: 1 minute countdown timer
body: <p>I am trying to do a simple countdown timer from 1 minute, that is shown in the button text.  When the button is pressed I just want it to count down to 0, the show "times up".  I have been reading all the posts I can find trying to figure out how to do this and cannot.  Can someone tell me what I am doing wrong.</p>
  
  <p>This is in in visual c# windows phone application.  I hope I made the post appear correctly, this is my first time to ask a question on this site, I am new to this.  Thank you in advance for any advice.</p>
  
  <pre><code>void bTime_Click(object sender, RoutedEventArgs e)
      {
          DispatcherTimer timer1 = new DispatcherTimer();
          timer1.Interval = TimeSpan.FromSeconds(60);
          timer1.Tick += new EventHandler(timer_Tick);
          timer1.Start();
      }
  
      int tik = 60;
      void timer_Tick(object sender, EventArgs e)
      {
          bTime.Content = timer.ToString();
          if (tik &gt; 0)
              Countdown.Text = (timer--).ToString();
          else
              Countdown.Text = "Times Up";
          throw new NotImplementedException();
      }
  </code></pre>