title: refreshing a WPF window on demand
body: <p>I noticed that if I move my WPF window through code, I will only see that changes when the window refreshes (if I minimize and then maximize it).<br>
  Is it possible to refresh the GUI of a WPF on demand?</p>
  
  <p>EDIT: I'm actually trying to make this window follow another window.  </p>
  
  <p>So I'm hooking to the other window's events:</p>
  
  <pre><code>    m_wndParent = parent;
      this.Owner = m_wndParent;
      m_wndParent.SizeChanged += ParentSizeChanged;
      m_wndParent.LayoutUpdated += ParentLocationChanged;
  </code></pre>
  
  <p>and then I change my window's position:  </p>
  
  <pre><code>   private void ParentLocationChanged(object sender, EventArgs e)
          {
              Window parent = sender as Window;
              this.Top = parent.Top;
              this.Left = parent.Left;
              this.UpdateLayout();
          }
  </code></pre>