title: WPF databinding issue for itemsControl in usercontrol
body: <p>I have two classes and a usercontrol.</p>
  
  <pre><code>class pvalue
  {
      public string value;
      public bool selected;
      public pvalue(string v, bool s)
      {
          value = v;
          selected = s;
      }
  }
  
  class param
  {
      public string name { get; set; }
      public string prefix { get; set; }
      public IList&lt;pvalue&gt; values { get; set; }   
  
      public param(string _name, string _prefix, IList&lt;pvalue&gt; _values)
      {
          name = _name;
          prefix = _prefix;
          values = _values;
      }
  }
  
  
  &lt;UserControl DataContext="{Binding param}" &gt;
   &lt;Grid&gt;...
      &lt;ItemsControl x:Name="itemctl" ItemsSource="{Binding Path=values}"&gt;
      ...
         &lt;ItemsControl.ItemTemplate&gt;
               &lt;DataTemplate&gt;
                  &lt;ToggleButton IsChecked="{Binding Path=selected}"&gt;
                      &lt;TextBlock Text="{Binding Path=value}" /&gt;
                  &lt;/ToggleButton&gt;
              &lt;/DataTemplate&gt;               
          &lt;/ItemsControl.ItemTemplate&gt;
      &lt;/ItemsControl&gt;
   &lt;/Grid&gt;
  &lt;/UserControl&gt;
  </code></pre>
  
  <p>My intention is to create the class in the application, and set it up as the datacontext of the usercontrol. But I'm very new to WPF, this is a bit over my head. The databinding isn't working - "BindingExpression path error: 'value' property not found on 'object' ''pvalue'".</p>
  
  <p>Can I get some help sort out the databinding for the usercontrol? Thanks a lot.</p>