I am having a problem naming listbox items in a silverlight listbox. The listbox is bound to a DTO collection so the items are determined dynamically at run time. The listbox, itself, is easily named with the x:Name tag in the xaml in this way:
<Client:OurListBox Grid.Row="3" Grid.Column="0" x:Name="OurListBox"
ItemsSource="{Binding DTO.SomeObjectCollection, Mode=OneWay}"
SelectedItem="{Binding SelectedSomeObjectItem, Mode=TwoWay}" />
(OurListBox is just derived from the standard Silverlight ListBox control) However, I can not get the items in that list box to be named so that our QA dept can identify them in their automated tests. (they use UISpy to see what has been named).
We are using silverlight 3 and studio 2008 for development. The QA team is using Visual Studio 2010 Beta2 and unit testing using a Coded UI Test project, using UITestControls to the see the objects I'm trying to name.