title: wpf - window freezes
body: <p>Parent window freezes when I open a window on click of a button. It works properly again if I minimize and maximize parent window again. </p>
  
  <p>System configuration</p>
  
  <ul>
  <li>Windows 7, 64 bit OS.  </li>
  <li>.Net framework 3.5 SP1</li>
  <li>Visual studio express 2008</li>
  </ul>
  
  <p>Following is the simple application where I can reproduce this issue.</p>
  
  <p>Window1.xaml</p>
  
  <pre><code>&lt;Window x:Class="WpfApplication1.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Window1" Height="300" Width="300"&gt;
    &lt;StackPanel&gt;
      &lt;TextBox Width="200"/&gt;
      &lt;Button Content="click" Click="Button_Click"/&gt;
    &lt;/StackPanel&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p>Window1.xaml.cs</p>
  
  <pre><code>namespace WpfApplication1 {
  /// &lt;summary&gt;
  /// Interaction logic for Window1.xaml
  /// &lt;/summary&gt;
  public partial class Window1 : Window {
      public Window1() {
          InitializeComponent();
      }
  
      private void Button_Click(object sender, RoutedEventArgs e) {
          (new Window2()).ShowDialog();
      }
  }
  }
  </code></pre>
  
  <p>Window2.xaml</p>
  
  <pre><code>&lt;Window x:Class="WpfApplication1.Window2"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  Title="Window2" Height="300" Width="300" WindowStyle="ToolWindow"&gt;
  &lt;Grid&gt;
  
  &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p>It works fine if I remove <strong>WindowStyle="ToolWindow"</strong>  !!!!!!</p>
  
  <p>App.xaml</p>
  
  <pre><code>&lt;Application x:Class="WpfApplication1.App"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  StartupUri="Window1.xaml"&gt;
  &lt;Application.Resources&gt;
  
  &lt;/Application.Resources&gt;
  &lt;/Application&gt;
  </code></pre>