title: How To WPF DynamicResource + variable value for Label Content
body: <p>Hy Community,</p>
  
  <p>I have a rather simple poblem but I can't find the solution.</p>
  
  <p>I tried to simplifiy my code:</p>
  
  <pre><code>void myFunction()
      {
          StackPanel myStack = new StackPanel();
  
          for (int i = 0; i &lt; 10; i++)
          {
              Label myLabel = new Label();
              myLabel.SetResourceReference(Label.ContentProperty, "LableName");
              this.Resources["LableName"] = "Lable";
              myStack.Children.Add(myLabel);
          }
      }
  </code></pre>
  
  <p>Now the result should be:</p>
  
  <p>Label 0</p>
  
  <p>Label 1</p>
  
  <p>...</p>
  
  <p>Label 9</p>
  
  <p>How to do this by using Dynamic Resources?</p>
  
  <p>Thank you!</p>