Hi folks,
I am currently using a Linq template with SubSonic3 to create my models. I have a simple Member class, which has a collection of Notes. A Note class has a PublishedDate and Title properties.
I have a UserControl which has a collection of Members for its DataContext. There are two ListBoxes and a bunch of TextBoxes and other controls on it. The first ListBox (membersList) gets its ItemsSource from the UserControl DataContext and it displays a few Member properties in each item. I would like the second ListBox (notesList) to display the Notes collection of the Member selected in the first ListBox.
So far on notesList I have:
<ListBox ... ItemsSource="{Binding Notes}"...>
<DataTemplate>
<TextBox Text="{Binding Title}"/>
</DataTemplate>
It partially works. When I selected a Member which has Note items there is the correct number of items in notesListBox but this is only visible in the alternating row colours - nothing else! The DataTemplate fails to render the Title of the Note. Basically all the visual styles in the ListBox and ListBoxItem works - alternating colours, selection border, mouseover, etc. but the content is not shown. I have a feeling the problem is my Binding syntax but I can't figure out what's wrong.
Any suggestions would be greatly appreciated.
Cheers, Dany.