title: DispatcherTimer pauses when minimizing/maximizing/closing window
body: <p>I try to explain my problem on simple app:</p>
  
  <p>I have MainWindow with just one TextBlock. Property Text of this TextBlock is binded to property Seconds of my class CTimer. In MainWindow I also have a DispatcherTimer doing one simple thing every second - increments Seconds property of my object.</p>
  
  <p>MainWindow.xaml:</p>
  
  <pre><code>&lt;Window x:Class="Try.MainWindow"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      Title="MainWindow" Height="350" Width="525"&gt;
      &lt;Grid&gt;
          &lt;TextBlock Name="txtTime" Text="{Binding Seconds}" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="16" FontWeight="Bold"/&gt;
      &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p>MainWindow.xaml.cs:</p>
  
  <pre><code>public partial class MainWindow : Window
  {
      private CTimer timer = new CTimer();
      private DispatcherTimer ticker = new DispatcherTimer();
  
      public MainWindow()
      {
          InitializeComponent();
  
          ticker.Tick += AddSeconds;
          ticker.Interval = TimeSpan.FromSeconds(1);
          txtTime.DataContext = timer;
  
          ticker.Start();
      }
  
      public void AddSeconds(object sender, EventArgs e) 
      {
          timer.Seconds++;
      }
  }
  </code></pre>
  
  <p>CTimer.cs:</p>
  
  <pre><code>public class CTimer:INotifyPropertyChanged
  {
      private int seconds = 0;
  
      public int Seconds
      {
          get { return seconds; }
          set 
          { 
              seconds = value;
              OnPropertyChanged("Seconds");
          }
      }
  
      #region INotifyPropertyChanged Members
  
      public event PropertyChangedEventHandler PropertyChanged;
  
      protected virtual void OnPropertyChanged(string propertyName)
      {
          if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
      }
  
      #endregion
  }
  </code></pre>
  
  <p>My problem - when I press whichever of three window buttons (min/max/close) and keep it pressed, the DispatcherTimer pauses and stays paused until I release the pressed button.</p>
  
  <p>Do somebody know the cause of this behaviour?</p>