title: Silverlight 4 - Declare/Populate a control's collection property via XAML?
body: <p>First of all I wanted to thank all of you for all the wonderful input you have provided. I have to admit - StackOverflow has been the greatest peer-tutor resource available, and as such it has provided me with more knowledge, than ... the 4 years in "college". Thanks!</p>
  
  <p>I am working with a control that has a property which is a collection of objects.</p>
  
  <pre><code>public class UserParameter
  {
      string DisplayName { get; set; }
      string Property { get; set; }
      string Type { get; set; }
  }
  
  public class ParameterBuilder: UserControl
  {
      private ObservableCollection&lt;UserParameter&gt; parameters;
  
      //alright - this is really dependency property.
      //described as property just for simplicity.
      public ObservableCollection&lt;UserParamter&gt; Parameters
      {
          get { return this.parameters; }
          set { this.parameters = value; }
      }
  }
  </code></pre>
  
  <p>So the meat of this question is to figure out how to create this collection in Xaml. For example:</p>
  
  <pre><code>&lt;custom:ParameterBuilder Name="Parameter"&gt;
      &lt;custom:ParameterBuilder.Parameters&gt;
          &lt;custom:UserParameter DisplayName="Test 0" Property="Size"  Type="String"/&gt;
          &lt;custom:UserParameter DisplayName="Test 1" Property="Value" Type="Decimal"/&gt;
      &lt;/custom:ParameterBuilder.Parameters&gt;
  &lt;/custom:ParameterBuilder&gt;
  </code></pre>
  
  <p>Is this possible and if so, how do I go about doing it?</p>