title: Why can't I place an array of objects in of in the resources of my root control?
body: <p>Suppose I have a normal Xaml file with two extra xmlns, one to a "Person" Class with two CLR properties "Name" and "Age", and one to a String object:</p>
  
  <pre><code>&lt;Window x:Class="WpfPractice.ListBinding"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:local="clr-namespace:WpfPractice"
      xmlns:sys="clr-namespace:System;assembly=mscorlib"        
      Title="ListBinding" Height="200" Width="600"&gt;
  </code></pre>
  
  <p>I can place an array of strings in the Resources collection of my root window element:</p>
  
  <pre><code>    &lt;Window.Resources&gt;  
          &lt;x:Array x:Key="ThisWorks" Type="{x:Type sys:String}"&gt;  
              &lt;sys:String&gt;John&lt;/sys:String&gt;  
              &lt;sys:String&gt;Andy&lt;/sys:String&gt;  
          &lt;/x:Array&gt;  
      &lt;/Window.Resources&gt;
  </code></pre>
  
  <p>I can also instantiate an object in the resources of the root control:</p>
  
  <pre><code>    &lt;Window.Resources&gt;  
          &lt;local:Person x:Key="ThisAlsoWorks" Name="Michael" Age="40"/&gt;  
      &lt;/Window.Resources&gt;
  </code></pre>
  
  <p>But VS won't let me build if I instantiate an array of ojects in the resources of the root control: </p>
  
  <pre><code>    &lt;Window.Resources&gt;  
          &lt;x:Array x:Key="ThisWontBuild" Type="{x:Type local:Person}"&gt;  
              &lt;local:Person Name="Michael" Age="40"/&gt;  
              &lt;local:Person Name="Jim" Age="30"/&gt;   
          &lt;/x:Array&gt;
      &lt;/Window.Resources&gt;
  </code></pre>
  
  <p>Howwver VS will build if I instantiate the array of ojects in the resources of a child control such as a grid: </p>
  
  <pre><code>    &lt;Grid.Resources&gt;  
          &lt;x:Array x:Key="ThisWillBuild" Type="{x:Type local:Person}"&gt;  
              &lt;local:Person Name="Michael" Age="40"/&gt;  
              &lt;local:Person Name="Jim" Age="30"/&gt;   
          &lt;/x:Array&gt;
      &lt;/Grid.Resources&gt;
  </code></pre>
  
  <p>Anybody know why?</p>