title: How to remove child from UserControl?
body: <p>It's maybe stupid question but I just cant figure out how to do this. I have a UserControl named "ReportUserControl" and inside of it I have a Grid named "ReportGrid" . I want to remove ReportGrid from ReportUserControl children. I tried this:</p>
  
  <pre><code>ReportUserControl control = new ReportUserControl();
  control.Children.Remove(...);
  </code></pre>
  
  <p>Problem is that there is no .Children.Remove() option for UserControl. How can i manage this?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I want to "send" this grid to another class and use it there. Problem is that when I send the grid and try to use it in another class I get this: "Specified element is already the logical child of another element. Disconnect it first." so I have to remove it from my UserControl but don't know how.</p>
  
  <p><strong>ReportUserControl XAML:</strong></p>
  
  <pre><code>&lt;UserControl x:Class="WPFReportTest.ReportUserControl "
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
           mc:Ignorable="d" 
           Height="29.7cm" Width="21cm"&gt;
  
       &lt;Grid Name="ReportGrid"&gt;
            ****GridContent***
       &lt;/Grid&gt;
  
  &lt;/UserControl&gt;
  </code></pre>
  
  <p><strong>ReportClass:</strong></p>
  
  <pre><code>public class ReportingClass
  {
     Grid reportGrid;
     public ReportingClass(Grid tempGrid)
     {
         reportGrid = tempGrid;
     }
  
     public Page SetPageContent()
     {
         Page page = new Page();
         page.Content = reportGrid;
     }      
  
  }
  </code></pre>
  
  <p><strong>InstanceWindow</strong></p>
  
  <pre><code> public partial class MainWindow : Window
   {
      public MainWindow()
      {
          InitializeComponent();
          ReportUserControl userControl = new ReportUserControl();
          ReportingClass report = new ReportingClass(userControl.ReportGrid);
      }
   }
  </code></pre>
  
  <p>This is not the full code only small part to get idea of what I'm trying to manage. Line "page.Content = reportGrid;" is where the exception happens.</p>