title: Silverlight - how to programmatically select items in a data bound ListBox?
body: <p>I have a ListBox (AvailableDevicesListBox), which is populated using data-binding in Silverlight 3.  The binding is to a collection of objects of type <em>DeviceDTO</em>.  It is set up to allow multiple selections, and this all works fine.</p>
  
  <p>However, I'm trying to get a 'Select All' button working, and if I iterate through the AvailableDevicesListBox.Items collection, I'm returned <em>DeviceDTO</em> objects, not ListBoxItem objects, so I have no way of selecting / deselecting the items in the list box that I want.</p>
  
  <p>Can anyone offer any suggestions?</p>