I am new to expression blend and defining some templates to my items in a WP7 page. I have a listbox and I want to use EB to define the template of my items, the value (the text that should go in the listboxitem) is stored in a ObservableCollection which is itemsource of my listbox.
I opened my project in expression blend. I opened the page, selected the listbox and right-clicked, then I chose ItemTemplate (in another try I chose ItemContainerStyle). a new page appeared and I added a textbox to my template.
When I ran the project, in both cases (using ItemTemplate and ItemContainerStyle), I got a list with "TextBox" written, which is logic because of textbox I added to the template.
I imagine I have to change the TextBox's Text property to define a binding. But how can I define that the value used is stored in the Listbox.ItemSource property?
Thanks!
Just found it!
<TextBlock TextWrapping="Wrap" Text="{Binding}" TextAlignment="Center" FontWeight="Bold"/>
Text={Binding} solved my problem :)