title: Stop countdown timer in Xamarin forms after a specific day
body: <p>I am new to C# and needed a countdown timer. I used this code with few modification.</p>
  
  <p><a href="https://stackoverflow.com/a/11146774/10496250">Link</a></p>
  
  <p>Original code....</p>
  
  <pre><code>DateTime endTime = new DateTime(2018,12,31,0,0,0);
  private void button1_Click(object sender, EventArgs e)
  { 
      Timer t = new Timer();
      t.Interval = 500;
      t.Tick +=new EventHandler(t_Tick);
      TimeSpan ts = endTime.Subtract(DateTime.Now);
      label1.Text = ts.ToString("d' Days 'h' Hours 'm' Minutes 's' Seconds'");
      t.Start();
  }
  
  void  t_Tick(object sender, EventArgs e)
  {
      TimeSpan ts = endTime.Subtract(DateTime.Now);
      label1.Text = ts.ToString("d' Days 'h' Hours 'm' Minutes 's' Seconds'");
  }
  </code></pre>
  
  <p>My code....</p>
  
  <pre><code>    DateTime endTime = new DateTime(2018,12,31,0,0,0);
      private void countDownTimer()
      {
          Timer t = new Timer();
          t.Interval = 1000;
          t.Elapsed += new ElapsedEventHandler(t_Tick);
          TimeSpan ts = endTime.Subtract(DateTime.Now);
          cTimer = ts.ToString("d' Days 'h' Hours 'm' Minutes 's' Seconds'");
          t.Start();
      }
  
      void t_Tick(object sender, EventArgs e)
      {
          TimeSpan ts = endTime.Subtract(DateTime.Now);
          cTimer = ts.ToString("d' Days 'h' Hours 'm' Minutes 's' Seconds'");
      }
  </code></pre>
  
  <p>This is working great and I wanna know how to stop the timer after the countdown. Now it is counting up after the countdown date.</p>