title: How to use ContentTemplate to avoid "Specified element is already the logical child of another element. Disconnect it first" error
body: <p>I know this question has been asked countless number of times, but I don't understand half of what their problem is or how to follow their example. 
  The one I did find her name Rachel, posted a blog about it but her explanation was too brief..</p>
  
  <p><a href="http://rachel53461.wordpress.com/2011/07/17/wpf-error-specified-element-is-already-the-logical-child-of-another-element-disconnect-it-first/" rel="nofollow">http://rachel53461.wordpress.com/2011/07/17/wpf-error-specified-element-is-already-the-logical-child-of-another-element-disconnect-it-first/</a></p>
  
  <p>Here was what I had before trying to follow here example:</p>
  
  <pre><code>&lt;Window x:Class="Graph.View.MainView.Main"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:lc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
      Title="Main" Height="350" Width="525" 
  
      xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking"&gt;
  
  &lt;DockPanel LastChildFill="True"&gt;
         &lt;DockPanel&gt;
          &lt;Label  Content="{Binding ScreenContent}" Grid.Row="1" HorizontalContentAlignment="Stretch" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" VerticalContentAlignment="Stretch"/&gt;
          &lt;/DockPanel&gt;
      &lt;/DockPanel&gt;
  </code></pre>
  
  <p></p>
  
  <p>Because <code>ScreenContent</code> is having a logical parent I can't reuse it. After trying to follow Rachel's example:</p>
  
  <pre><code>&lt;Window x:Class="Graph.View.MainView.Main"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:lc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
          Title="Main" Height="350" Width="525" 
         &gt;
      &lt;Window.Resources&gt;
          &lt;Style     TargetType="{x:Type ContentControl}"&gt;
              &lt;Setter Property="ContentTemplate"&gt; 
                  &lt;Setter.Value&gt;
                      &lt;DataTemplate&gt;
                          &lt;DockPanel&gt;
                              &lt;Label   Content="{Binding ScreenContent}" Grid.Row="1" HorizontalContentAlignment="Stretch" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" VerticalContentAlignment="Stretch"/&gt;
                          &lt;/DockPanel&gt;
                      &lt;/DataTemplate&gt;
                  &lt;/Setter.Value&gt;
              &lt;/Setter&gt;
          &lt;/Style&gt;
      &lt;/Window.Resources&gt;
  
      &lt;DockPanel LastChildFill="True"&gt;            
          &lt;Label Style="{StaticResource MyCustomContentControl}"/&gt;
      &lt;/DockPanel&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p>How can I fix it? It isn't showing anything at all...
  Thanks.</p>