title: Is it possible to put static XAML elements into an array?
body: <p>I have static XAML elements... let say:</p>
  
  <pre><code>x:Name="elem1"
  x:Name="elem2"
  </code></pre>
  
  <p>Is there a way to put them into an array to use them dynamic with C#? Something like:</p>
  
  <pre><code>"var_type"[] elements = {elem1, elem2};
  </code></pre>
  
  <p>Or is there a way to use this static elements somehow by using a string? Somehow in this way:</p>
  
  <pre><code>Convert."ToXAML-Element"("elem1").Width = 200;
  </code></pre>
  
  <p>Thank you in advanced for any help!</p>
  
  <p>EDIT:</p>
  
  <p>This works for me now:</p>
  
  <pre><code>object wantedNode = Parentelement.FindName("string");
  if (wantedNode is FrameworkElement)
  {
      FrameworkElement wantedChild = wantedNode as FrameworkElement;
      wantedChild.DataContext = pathdata[a];
      wantedChild.Width = 200;
  }    
  </code></pre>
  
  <p>But it is a bit cumbersome...</p>