i would like know how can i add a style when a item of the listbox is selected. I have the following listbox:
You have to change the style of the template ListBoxItem
which the ListBox
generates for each of the items that it renders. Your updated template needs to customise the Selected visual state. You can then associate this new template with your ListBox
via the ListBox.ItemContainerStyle
property.
There is a good tutorial, with sourcecode to download, here:
http://windowsphonegeek.com/tips/How-to-customize-the-WP7-ListBox-Selected-Item--Part1-Control-Template