this doesnt work ,i have an item “Area” in my listBox1,but code is not producing MessageBox in wp7 runtime,
private void button1_Click(object sender, RoutedEventArgs e)
{
if( listBox1.SelectedItem=="Area")
{
MessageBox.Show("hi");
}
}
try:
You are missing the cast.