title: C# UserControl in WPF
body: <p>Unfortunately, the UserControl is not displayed in my ToolBox.
  Since I have worked but with Windows Form, I have back remembers that you can create this UserControl also by code. And also tested in Windows Form where it has worked.</p>
  
  <pre><code>public partial class Einstellungcs : UserControl
  {
      public Einstellungcs()
      {
          InitializeComponent();
          this.Dock = DockStyle.Fill;
      }
  }
  </code></pre>
  
  <hr>
  
  <pre><code>public partial class MainWindow : Window
  {
      Einstellungcs settings = new Einstellungcs();
      public MainWindow()
      {
          InitializeComponent();
      }
              ......
  }
  </code></pre>
  
  <hr>
  
  <pre><code>private void Button_Click(object sender, RoutedEventArgs e)
  {
      panel.ContentMenu(settings );
  }
  </code></pre>
  
  <p>These Code snippets Should sometimes illustrate what I mean.
  Unfortunately, there is no more panel in WPF.
  So how can I do this in WPF? I currently use Canvas, but this is not the right one. How would someone have the solution what I must use or how I have to make it?</p>
  
  <p>I would like to change the content area by clicking the button
  with a UserControl.Can someone explain to me how I can use the UserControl in WPF?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p><a href="https://i.stack.imgur.com/CT0vS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CT0vS.png" alt="enter image description here"></a></p>
  
  <p>If I click on the button "Vorschau" is to change the red area with a content. If I click on the button "Einstellung" a different content appears than before. It should change as the content always only in the red area, the rest should remain as it is.</p>