title: How to create a static TabControl in XAML WPF
body: <p>I need to create a TabControl in MainWindow, and then I need to make a Property in MainWindow that returns that TabControl. I don't know how to access TabControl from another window because it says "An object reference is required bla bla..." when I try like this:</p>
  
  <pre><code>MainWindow.tabcontrol.Items.Add("tabitem");
  </code></pre>
  
  <p>and the Property I made in MainWindow is:</p>
  
  <pre><code>public TabControl tabcontrol
  { get { return tabc; } set{ tabc = value;} }
  </code></pre>
  
  <p>Values are:</p>
  
  <pre><code>"tabcontrol" is name of Property
  "tabc" is name of TabControl that I need in another window
  </code></pre>
  
  <p>Please, how do I do this? How to add items to a TabControl that is in MainWindow from another window?</p>
  
  <p>this code returns error saying : "An object reference is required..."</p>