title: Error adding new TextBlock to Canvas in WPF
body: <p>I want to add text to my canvas in WPF. The code runs until I want to add the TextBlock to the canvas as a child, giving me this:</p>
  
  <p>"Specified element is already the logical child of another element. Disconnect it first."</p>
  
  <p>Here is the relevant code:</p>
  
  <pre><code>private void txtbItemName_TextChanged(object sender, TextChangedEventArgs e)
          {
              TextBlock txtItemName = new TextBlock();
              txtItemName.Text = txtbItemName.Text;
              txtItemName.Margin = new Thickness(10, 10, 0, 0);
              cnvImage.Children.Remove(txtItemName);
              cnvImage.Children.Add(txtbItemName); //The error screen showed up when running this line
          }
  </code></pre>