title: Databinding to LINQ query result in Silverlight
body: <p>I am retrieving simple LINQ query, but I am joining with two table and binding data with ListBox.
  I am not able to properly show the item into the ListBox. </p>
  
  <p>once I remove new item and select only keyword using it will work properly, but I want to join two table with select new key word it wil not allow to bind data with ListBox.
  my code is like.
  This will not allow to bind with ListBox.</p>
  
  <pre><code>var newPeople = (from p in clsGeneral.db.Table&lt;SmartFXAttribes&gt;()
                   join q in clsGeneral.db.Table&lt;CategoryAttribes&gt;() on p.catId equals q.ID
                   where p.catId == ((SmartFX.CategoryAttribes)((ComboBox)cmbPrintSize).SelectedValue).ID
                   select new 
                   {
                       p.ID,
                       p.ImageHeight,
                       p.Imageoutline,
                       p.ImageUnit,
                       p.ImageWidth,
                       p.NoofPic,
                       p.TextboxCaption,
                       p.CanvasPixelHeight,
                       p.CanvasPixelWidth,
                       p.CanvasUnit,
                       p.catId,
                       q.FileName
                   }).ToList();
  lstThumbnail.ItemsSource = newPeople;
  </code></pre>
  
  <p>This code will work fine.</p>
  
  <pre><code>var newPeople =
      (from p in clsGeneral.db.Table&lt;SmartFXAttribes&gt;()
       join q in clsGeneral.db.Table&lt;CategoryAttribes&gt;() on p.catId equals q.ID
       where p.catId == ((SmartFX.CategoryAttribes)((ComboBox)cmbPrintSize).SelectedValue).ID
       select p).ToList();
  
  lstThumbnail.ItemsSource = newPeople;
  </code></pre>
  
  <p>Thanks!</p>