title: Inheritance recursion
body: <p>So I tried to implement some inheritance into my code because I have many classes that require the same instances of other classes which I pass as parameters, but now I encounter a recursion problem which I don't quite understand why.</p>
  
  <p>It breaks in the ParentScreen class (which is just a normal class, no XAML) - maybe this isnt the best way to solve my simple problem?</p>
  
  <pre><code>public partial class MainWindow : Window
  {
      public MainWindow()
      {
          InitializeComponent();
          ParentScreen ps = new ParentScreen();
          container.Children.Add(ps.ms);
      }
  }
  
  public class ParentScreen : UserControl
  {
      public MainScreen ms;
  
      public ParentScreen()
      {
          ms = new MainScreen(); // breaks here
      }
  }
  
  public partial class MainScreen : ParentScreen
  {
      public MainScreen()
      {
          InitializeComponent();
      }
  }
  
  &lt;runtime:ParentScreen x:Class="WpfApplication1.MainScreen"
          xmlns:runtime="clr-namespace:WpfApplication1"
          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" 
          Height="100" Width="200"&gt;
      &lt;Grid&gt;
          &lt;TextBox Height="23" Margin="12,12,0,0" Name="textBox1" VerticalAlignment="Top" HorizontalAlignment="Left" Width="120" /&gt;
      &lt;/Grid&gt;
  &lt;/runtime:ParentScreen&gt;
  </code></pre>