title: WPF List of object get property
body: <p>I've searched google and cannot find any answers to the particular problem.</p>
  
  <p>I have a listbox in my form which has got some custom objects in them. </p>
  
  <pre><code>foreach (Fixture fixture in FixtureLibrary)
              {
  
                  if (fixture.ModelName == "")
                  {
  
                      //Nothing 
  
                  }
                  else
                  {
  
                      lbxLibrary.Items.Add(fixture);
  
                  }
              }
  </code></pre>
  
  <p>In the listbox I would like to see the ModelName property. I can do this by changing the following:</p>
  
  <pre><code>lbxLibrary.Items.Add(fixture.ModelName);
  </code></pre>
  
  <p>But I need to be able to select an object at runtime from the list, so this approach wont work for me. </p>
  
  <p>Anybody got any ideas, all I've found is for winforms but that doesn't really help me as I'm using WPF. </p>
  
  <p>Cheers chaps</p>
  
  <p>Mike.</p>