Make textblock show text according to listbox item
Hello!
I'm trying to make a listbox in C# (WP7 development) that will show text in a textblock according to which listbox item that has been selected.
So basically, it's like this (an example I made up now):
listBox1:
Energy Drink
Food
textBlock1:
(no text)
However, I want to update the textBlock1 with "Energy Drink might not be good for your health" when the listbox item "Energy Drink" is selected, and then another text if the "Food" item is selected.
I'm trying to do this with an "else IF", but it doesn't seem to be working, as no text is put into the textblock when an item is selected (in WP7 emulator mode).
Anyone got any good ideas for this? I've been searching for a maniac for this, and I found the ListBox.SelectedItem property @ Microsoft, but I don't even get that to work (http://msdn.microsoft.com/en-us/libr...ecteditem.aspx).
Re: Make textblock show text according to listbox item
Alright, so I gave up on this and started using buttons instead, after a quick chat with a programmer from Microsoft, saying that that the listbox isn't much used anymore as it's not optimized for phones.