title: DispatcherTimer Stop not stopping
body: <p>Update: I put the complete code for reference</p>
  
  <p>I'm trying to use Dispatcher method instead of Forms.Timer()</p>
  
  <p>I have stop at the end of the method, but it kept looping multiple times before stopping. What went wrong?</p>
  
  <p>By the way, I have to mention that I do use a MessageBox.Show() inside the timer if statement. Don't know if this is the cause or not.</p>
  
  <pre><code>    private DispatcherTimer mytimer = new DispatcherTimer();
  
      public MainWindow()
      {
          InitializeComponent();            
      }
  
      void  mytimer_Tick(object sender, EventArgs e)
      {            
          if (mytimer.Interval == new TimeSpan(0,0,2))
          {
              mytimer.Stop();
              if (textBox1.Text.Length &lt;= 1)
              {
                  MessageBox.Show("0");
                  mytimer.Stop();
              }
              else
              {
                  //do code
                  MessageBox.Show("more than 0");
                  mytimer.Stop();
              }                
          }
  
      }
  
      private void textBox1_TextChanged(object sender, TextChangedEventArgs e)
      {
          mytimer.Interval = new TimeSpan(0, 0, 2);
          mytimer.Tick += new EventHandler(mytimer_Tick);                
          mytimer.Start();        
      }
  </code></pre>