title: Appropriate way to clear all of the content of a window
body: <p>I am searching for a way to clear the whole content of a window in WPF. So far I couldn't find a way which suits my needs on the net. However I came up with this:</p>
  
  <p>Let's say that I have <code>MainWindow</code> view, what I am doing is:</p>
  
  <pre><code>MainWindow.Content = null;
  MainWindow.Content = new UserControl();
  </code></pre>
  
  <p>It does work but I am unsure whether this approach is safe and correct.</p>